# I need run ordered Schedule API workflown on a list

**URL:** <https://forum.bubble.io/t/i-need-run-ordered-schedule-api-workflown-on-a-list/362660>\
**Category:** APIs\
**Created:** [March 9, 2025, 8:39pm UTC](https://forum.bubble.io/t/i-need-run-ordered-schedule-api-workflown-on-a-list/362660 "2025-03-09T20:39:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![samuelgubert](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/samuelgubert/32/243647_2.png) [@samuelgubert](https://forum.bubble.io/u/samuelgubert)\
**Post date:** [March 9, 2025, 8:39pm UTC](https://forum.bubble.io/t/i-need-run-ordered-schedule-api-workflown-on-a-list/362660/1 "2025-03-09T20:39:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![marcelo.bidoia.santos](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/marcelo.bidoia.santos/32/230876_2.png) [@marcelo.bidoia.santos](https://forum.bubble.io/u/marcelo.bidoia.santos)\
**Post date:** [March 9, 2025, 10:06pm UTC](https://forum.bubble.io/t/i-need-run-ordered-schedule-api-workflown-on-a-list/362660/2 "2025-03-09T22:06:16Z")

</div>

Well, technically yes. In this case you would have to use a recursive workflow instead of a schedule workflow on a list.

---

<div class="post-metadata">

**Author:** ![samuelgubert](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/samuelgubert/32/243647_2.png) [@samuelgubert](https://forum.bubble.io/u/samuelgubert)\
**Post date:** [March 9, 2025, 10:28pm UTC](https://forum.bubble.io/t/i-need-run-ordered-schedule-api-workflown-on-a-list/362660/3 "2025-03-09T22:28:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![georgecollier](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/georgecollier/32/182327_2.png) [@georgecollier](https://forum.bubble.io/u/georgecollier)\
**Post date:** [March 9, 2025, 10:50pm UTC](https://forum.bubble.io/t/i-need-run-ordered-schedule-api-workflown-on-a-list/362660/4 "2025-03-09T22:50:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![marcelo.bidoia.santos](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/marcelo.bidoia.santos/32/230876_2.png) [@marcelo.bidoia.santos](https://forum.bubble.io/u/marcelo.bidoia.santos)\
**Post date:** [March 10, 2025, 2:00am UTC](https://forum.bubble.io/t/i-need-run-ordered-schedule-api-workflown-on-a-list/362660/5 "2025-03-10T02:00:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![samuelgubert](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/samuelgubert/32/243647_2.png) [@samuelgubert](https://forum.bubble.io/u/samuelgubert)\
**Post date:** [March 10, 2025, 1:17pm UTC](https://forum.bubble.io/t/i-need-run-ordered-schedule-api-workflown-on-a-list/362660/6 "2025-03-10T13:17:09Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/2/b/2b01944447a20c243ab1ce45cb610bb8ffad6307.png)

---

<div class="post-metadata">

**Author:** ![rico.trevisan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rico.trevisan/32/170176_2.png) [@rico.trevisan](https://forum.bubble.io/u/rico.trevisan)\
**Post date:** [March 10, 2025, 2:10pm UTC](https://forum.bubble.io/t/i-need-run-ordered-schedule-api-workflown-on-a-list/362660/7 "2025-03-10T14:10:09Z")

</div>

> [@samuelgubert](#):
>
> And how is It works?

FYI: [Recursive API workflows | Bubble Docs](https://manual.bubble.io/help-guides/integrations/api/the-bubble-api/the-workflow-api/api-workflows/recursive-api-workflows)

@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

1. first iterate over the incoming list, save that into the Bubble db
2. after saving all (or some of the) items
3. start off another recursive workflow that takes that newly created list and iterate over that actually performing the action you need.

---

<div class="post-metadata">

**Author:** ![georgecollier](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/georgecollier/32/182327_2.png) [@georgecollier](https://forum.bubble.io/u/georgecollier)\
**Post date:** [March 10, 2025, 2:12pm UTC](https://forum.bubble.io/t/i-need-run-ordered-schedule-api-workflown-on-a-list/362660/8 "2025-03-10T14:12:58Z")

</div>

> [@rico.trevisan](#):
>
> I’m not sure if you’re able to handle a JSON natively in Bubble.

I’m a fan of, in this scenario:

1. 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)
2. Within the recursive workflow, call your own backend using the current iteration’s JSON string to get it as useable JSON
3. Do what you want in the workflow
4. Schedule next iteration

---

<div class="post-metadata">

**Author:** ![samuelgubert](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/samuelgubert/32/243647_2.png) [@samuelgubert](https://forum.bubble.io/u/samuelgubert)\
**Post date:** [March 12, 2025, 7:48pm UTC](https://forum.bubble.io/t/i-need-run-ordered-schedule-api-workflown-on-a-list/362660/9 "2025-03-12T19:48:28Z")

</div>

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.

![image](https://us1.discourse-cdn.com/bubble/original/3X/b/a/ba05bbbe886dd434d48aa0eae320c6d4873e873a.png)

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/f/a/faec8bf6bd2250738623508f28f736f8a5dde21c.png)

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.
