Hi,
I need found a solution to Schedule API workflown on a list and that the processing occur in ordering way. The list should processing mandatory in certain ordering, but by my test I think this scheduling runs async every time, like a thread for each item of the list.
Is there any way to execute a list in Sync way?
Well, technically yes. In this case you would have to use a recursive workflow instead of a schedule workflow on a list.
Thanks for tour reply Marcelo.
And how is It works? I really donāt know.
In my case I need iterate a json result for an external api. This list of thing I need orderi by a date attibutte and so process in ordering way, sync.
For most use cases you can trust it to execute in order with an interval of 1 second. If youāre calling an external API inside the scheduled workflow, though, then delays in that API could cause it to not execute in order.
1 Like
Can you give us more details of what you are exactly trying to do? Be more especific about the order and datas you want to iterate over.
My problem is:
I built an external API that returns a list of data that I need process in bubble. This process could be: create new data, change a data or delete a data. For choose what action I need to to, the order that I read the JSON returned of API is mandatory. For exemple, imagine the following json api return (is an exemple, is not my real return, is for illustrate):
[
{
āidā: 1,
ānameā: āJoĆ£o Silvaā,
āactionā: ācreateā
},
{
āidā: 2,
ānameā: āJoĆ£o Silvaā,
ānewNameā: āJoĆ£o da Silvaā,
āactionā: āchangeā
},
{
āidā: 3,
ānameā: āJoĆ£o Silvaā,
āactionā: ādeleteā
}
]
Reading in order, at the final I have no data of āJoĆ£o Silvaā, because the last action was delete.
When the order is not obey, tha last result could be āJoĆ£o da Silvaā that is not the expected result
FYI: Recursive API workflows | Bubble Docs
@georgecollier 's suggestion is good & simple to start ā it might cover most of what you need. However if you want to be absolutely positive that it processes in order, use a recursive workflow.
Iām not sure if youāre able to handle a JSON natively in Bubble. You might need to
- first iterate over the incoming list, save that into the Bubble db
- after saving all (or some of the) items
- start off another recursive workflow that takes that newly created list and iterate over that actually performing the action you need.
Iām a fan of, in this scenario:
- Save each object to iterate over as a text (:format as text) that is a JSON object. Provide this list of texts (list of JSON objects as serialised strings)
- Within the recursive workflow, call your own backend using the current iterationās JSON string to get it as useable JSON
- Do what you want in the workflow
- Schedule next iteration
1 Like
Hello Guys,
I managed to implement the recursion, but the solution still doesnāt work, and all because the data source is an external API. Iāll try to bring more details.
My first step is to connect to an API through the API Connector. With the return from this API I create data in the DB.

The whole problem is in the asynchronous processing, because when calling the recursion the data has not yet been created in the database. This way I still have the same problem.
If I put the action in 2 buttons on the screen it would work, that is:
- step 1: search data and save
- step 2: process the data
But I need everything to be done only once.
Basicly, the step 5 occur before the step 3 is done and is incredible, but not works put a delay in schedule.
Sorry if Iām complicating something simple or if Iām not making myself clear.
I hope you can help me.