When I’m running an API workflow on a list within an API workflow on a list, I keep getting duplicates. Let me explain.
I’m trying to copy an entire list of employees and each employees’ list of tasks.
Here’s the workflow:
Workflow #1: Schedule an API workflow on a list (original employees) -> create a new employee -> schedule an API workflow on a list (each original employee’s tasks) [workflow #2]
Workflow #2: Schedule an API workflow on a list (each original employee’s tasks) -> create a new task
The data source I’m using for workflow #2 is “employee’s tasks.” When I hover over “employee” it lets me know it is referring a singular employee, which is what I need. However, when the workflow runs, it takes ALL employees’ tasks and redistributes ALL to each employee. What I need instead is for EACH employee to have their own list of tasks, not each employee having ALL tasks.
On #1 the workflow list is scheduling a list to itself … not sure what this is looking to achieve … but it seems that a list on a list is not adequate
On #2 that one is ok because the list is going one by one … and it will finish when the list finishes
Perhaps what you want is to setup a recursive workflow. To do that just schedule an api endpoint that runs on itself until an extinguishable condition stops it. Bubble does a great job of doing one thing at a time in these … so … just set up the logic to create the copies you need this way. And ensure to place a brake to it so that it stops once it has gone through all of the records.(something like search for things:count < lenght of the list)
The purpose of the workflow is to create a demo account with all the account’s data attached (including the account’s employees and their tasks).
Unfortunately, a recursive workflow. wouldn’t be helpful since the workflow would need to be triggered each time the “create demo account” button is pressed.
Found out I wasn’t the only one encountering this: