Schedule API Workflow Action Erroneously Reports Completion, Return Value is Always Null String

Bubble pushed an update today to fix this bug, and I can confirm that this now works properly. Schedule API Workflow now reports its value at the correct time.

Note that this may have some performance impacts now that it’s fixed. There are cases where you might schedule an API workflow, but (in the meantime) rely on values the API workflow that may change based on the workflow’s actions. If those actions are downstream of the Schedule API workflow step, they will now not execute until the workflow has been scheduled. (This is usually desirable, but isn’t always.)

If, like me, you sometimes just kick off an API workflow regardless of whether you care if the values change or not, this may cause a little performance degradation if that step appears upstream of the values you’re fine with being temporarily out-of-date. The solution is to parallelize things by moving the Schedule API Workflow step out of the workflow in question and into its own workflow that triggers on the same condition.

(It’s very hard for me to explain why you might do this, but an example is that when I load my Calendar Widgets or Booking Widgets, I load them with existing database values. I simultaneously kick of a workflow that goes and checks if external synced calendars have changed. This happens quite fast, so I do not choose to delay loading of the “existing” data, even though it may be mildly out of date. I had to move the “update” schedule API workflow action to its own Workflow square in a few cases where I did not desire to wait for scheduling to be confirmed (this can take a noticeable amount of time).

(As far as I can tell, Schedule API Workflow has been working improperly for as long as I’ve had such steps in deployment. The fixed version is essential for some features of my app. But I also at times enjoy NOT making things wait.

I suspect that Schedule API Workflow’s improper functioning may have been introduced as a “performance enhancement”, but if so it was a poor decision and this fix undoes that – allowing you to actually KNOW when Schedule API Workflow has finished scheduling the API Workflow in question.)

1 Like