I have intentions to create a looping workflow as follows:
API Workflow A:
GET paginated List of data from external service (100 items)
Trigger API Workflow B, send List to API Workflow B
Trigger API Workflow A for next page of 100 items
API Workflow B: This can either be a Workflow on a List or a Recursive Workflow
If Workflow on a List:
Create a Thing from each individual item in List from API Workflow A
If Recursive Workflow:
Create Thing from first item on List
Minus the first item from List
Trigger API Workflow B, repeat till 100 items are done
My question is how reliable is asynchronous workflows like the above in Bubble? Would you choose to do it with a Workflow on a List or a Recursive Workflow?
My concern with the Recursive Workflow approach is that I’m unsure if the continued runs of API Workflow A, where it continues to send to API Workflow B Lists of 100 items, would mess up the recursive flow of API Workflow B.
@felix1 Did you ever find a solution for this? I’m looking to do the exact same thing but havent been able to get it working. Any insight would be greatly appreciated!
I’m going to try to conditionally run step 2 if {offset_value} exist in the response from step 1, dynamically passing offset value into the GET request of step 2.
If {offset_value} is null, end workflow.
Once I test this, I’m happy to report back with any (seemingly) useful info.
Hi @felix1@SolMi , I’m having an issue in a similar recursive workflow where the thing operated on in step 1 is not being removed from the list of things when using :minus item to create the updated list of things for the workflow.
@mihira can you show your workflow? I will try to help. Maybe relevant, the next post in the above thread, deals with the :minus item quirk that it can remove more than one item.
Hi @rico.trevisan , Thanks for that. It’s pretty much the same as what you’ve done except the list is comprised of database things instead of texts. See below:
The recursive workflow is dependant on the “ItemSegList” and “ItemSeg” fields, where “ItemSeg” is the individual database thing that is being modified.
Problem is that the list never actually reaches count=0 so it goes on forever.
These expressions seem to be unreliable, because I have other recursive workflows setup which use :minus result of a previous step (to make sure that the previous step runs first) and those workflows work fine.
I feel like I need to now go back and change those to this format.
FYI, Items and Segment are just data that is needed for steps 1,2 and subsequent workflows.