API call in recurring workflow

Hello,

I call an API in a recurring workflow. However, since bubble does not run the workflows in order, the recurring workflow recurs without waiting for the API call inside it to finish.

So my question is: how can I ensure that the next recurring workflow runs only after the API call inside it is finished?

thanks

@adamhholmes again any help would be appreciated :slight_smile:

Try adding an ‘only when’ condition to the action that rescheduled the workflow, with a reference to something from the API call - such as “only when result of step(whwtaver step the API call is made in)'s ID (or any returned field) is not empty”…

1 Like

You can tackle this different ways depending on how the workflow is setup. One way is to create a table that stores your workflow runs and check to make sure the last run has completed of the previous workflow, then start your next workflow.

I have previously posted a simple example of a Data Type structure that could be used. It also solves the problem of a workflow stalling/failing/not-completing for whatever reason and preventing the next one from running

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.