Faster Scheduled API Workflows

Howdy folks, just looking for some strategy here, maybe not so much an issue as a technique question.

I have a pretty simple use-case with calling API data from a few different sources to update the User’s data. I do this after an OAuth login process takes place, by calling the Backend API to run at ‘Current Date/Time’ (see below.)

I have a flag set in the data to display a notification on the home page when this sync takes place, in addition to a few CSS elements that denote a sync is taking place. The issue I’m having is… it takes forever to start the backend workflow ~15 seconds, even though I have it set to ‘Current date/time’. Is there a better way to be working this? The workflow for the backend API is below:

I’ve even broken it down into an essential call and a background call to potentially alleviate workload but it didn’t really help at all.

Thanks!

I found the answer.

If you are using a 'Trigger API…" somewhere in your app and using ‘Current Date/Time’ to do it, there is a much faster way. My use case specifically, I’m using it to load data to the user from an API on page load, though I’m sure you could adjust this however you needed with an action.

Doing it how I previously had it setup (above,) I was averaging a wait time of ~12.7 seconds. With the adjustment below, I am only waiting ~2 seconds.

Super easy - just expose the backend API workflow, and trigger the workflow with a GET request. BUT The Bubble API plugin won’t work for some reason to trigger the GET request.

Since I’m calling mine on page load, I just threw it into an iframe’d HTML element and it worked like a charm.

1 Like

thanks for sharing.

1 Like

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