Scheduled API Workflows disappears


My application has several Scheduled API Workflows that are constantly executed at some frequency, for example every hour.

For some reason, it sometimes happens that a random Scheduled API Workflow simply stops executing, that is, disappears from the Scheduler section. I have logs and alerts configured to trigger when errors occur within these Workflows (because these Workflows works with External API), but I am not receiving any error information. That is, Workflow is simply automatically canceled at a random moment and disappears from the schedule.

Please tell me what could be causing this and how to solve this problem?

Hey @veazerocode :wave:

Welcome to the Bubble Community. :tada:

I have seen this in the past when looping a workflow that sometimes it will get cancelled if it starts looping too quickly and then Bubble will cancel it for you for safety.

Are you scheduling the workflow based off of a date that you are getting from the external API? Like an expiration date of a token?

If this becomes empty at some point, it will loop right away instead of when it is supposed to expire, causing a loop to run very quickly and then break.

Is that something that might be happening? It’s hard to tell without any screenshots. :man_shrugging: :blush: That is just my best guess.

Hey @J805!

Thank you for reply.

I understand what you’re talking about, and I know about this feature to automatically cancel Scheduled WF when it loops. But in my app it works like this:

  1. I have a server script which generates a random number between static min and max values. That number means number of minutes after which the Scheduled API WF will be restarted (i.e. Scheduled date = Current date time + minutes: Server script result).

  1. Next action triggers Scheduled API WF on the appointed Scheduled date if an “Only when” condition is met.

  1. Then I log “Only when” condition result to my app’s database.

And the issue is that this WF triggers hundreds of times per day and everything works well, but sometimes (maybe two times a week, maybe two times a month, absolutely by chance) it happens that “Only when” condition on Scheduled WF is met (I check it in logs), but Scheduled WF breaks/disappears/etc. I don’t know why it happens and how to fix it.

I attribute this to outages in the operation of Bubble, which periodically occur, judging by the info from But in any case it is very strange and it’s actually breaks my app.

Well, you aren’t catching if the lambda service fails so if it ever gets an error or it breaks then the date time would be 0 which would make it run instantly and then could have an issue. I think you could add some sort of back up where if it ever is 0 or empty, then force 16 minutes or something. I think that is what is happening. That’s my best guess. :man_shrugging: :blush: Hope that helps clarify what I mean.


It could also be the condition on your workflow but your screenshots are cut off so I can’t see the whole screen to see what is going on. :blush:

Thanks so much!

The issue couldn’t be in “Only when” condition because in all cases when Scheduled API WF didn’t run condition in logs was correct. I also added static number as a back up on Server script’s result. Apparently this is the best thing that can be done now.

Thank your for help!

1 Like

Sounds good. If the script doesn’t run though, it might still fail. You probably need the backup in the date OR the condition with a duplicate workflow. Does that make sense? :blush:

I added a static value in WF’s Scheduled date, so even if the Server script fails it should works well :slight_smile:

1 Like

There we go. I think that should help. :raised_hands:

1 Like

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