Is it possible to do this kind of recurring workflow with Bubble?

I’m on the Professional (Legacy) plan so mainly asking relating to this plan but can upgrade if necessary.

I have a data type called “SIM Cards” which has a field ICCID which is a unique ID for that SIM card. It then has a field period_usage, and a field status which is either active or inactive. period_usage is a number field.

What I’m looking to do, is have every 15 or 30 minutes (but whatever is realistic, ideally no longer than an hour apart) have a workflow that runs on ALL of the SIM Card records where the status is “Active” and:

  1. Use an API call to GET the current cellular data usage from an external system by sending the current SIM Cards ICCID
  2. Update the current SIM Cards period_usage field to this number
  3. Do a POST API call to a different external system, and send this number to that system
  4. Repeat for each SIM Card on the list

Both API calls work today manually, as in I can manually retrieve the data usage via the one API call and also manually post the data usage via the other.

It’s mainly the recurring workflow I want, as I want it to check all SIMs for usage every so often and update the other system.

I don’t necessarily need to know step by step how to do this, just more if it’s possible as I can always get one of our developers to do it for me. I know there’s Backend Workflows where this would probably be done, just not sure the best way. I also would like feedback if using Bubble for this makes sense, or if I should do my original plan of using a dedicated server running Linux that has this scripted. It’s possible that there could be 200-300 SIM cards that it would be running this on, but most likely will be less than 75 for the first year of use.

Hi @lmoreau

Backend is your solution, no need for another server now. Schedule a workflow that is called every 24 hours, from the moment you need that will call another API that will call himself every 15 minutes until the end of the desired time. Lots of possibilities and flexibility here.

1 Like

Great thanks! When you say call another API that will call himself every 15 minutes, is that all from one workflow? I set it up like this for now to test:

So this is a button that when pressed, starts the recurring event to run at 12:01am every day. The workflow it runs is:

Where I’ve just made 8 workflow steps set to run 3 hours apart (this is the stage I’m not sure if I can clean up into just 1 step every 3 hours or hourly etc).

Each of those workflows is then running an API Workflow on each of the items, which does an API call to get data and update the record.

I tried it this way yesterday setting the daily workflow to run at 7pm but it seemed to only schedule workflow items from that day, ending at midnight, so today I tried changing it so that the daily workflow runs at 12:01am, and then has the 8 workflow runs every 3 hours.

Hi @lmoreau

In this case, a last Schedule API action (itself) is missing at midnight to create the loop you need. This solution can be problematic if, say, your first program is not completed when the other program starts.