How to automatically perform a workflow every day

Hey guys, I’ve read through a lot of helpful posts on this subject and I think I know what I need to do, but would appreciate some verification…

Basically, I would like to have my app check for subscriptions which are renewing today and then bill the customer.

In my head it looks like this: Search for all subscriptions where the renewal date is current date and time rounded down to today, then try to charge each customer for the subscription.

Hopefully I’ll eventually have several hundred subscriptions, at least (thousands hopefully) for the workflow to go through.

The two methods I’m consider are:
Run API workflow on a list.
I’ll have a workflow that pulls the list I need and sends it to another API workflow to work on, then rescheduled itself for the next day…

Recursive Workflow (This is the one that makes my nose bleed, so bear with me)
Do a search for subscriptions where renewal is today: first item
Charge the subscription
Do this again in 5 seconds (or whatever)

Is that correct?

I understand I’ll need to trigger the first iteration manually and then it will schedule itself.

Any help or insight is greatly appreciated.

Recursive one is supposed to be more reliable as per Bubble.

Correct way (in my view) to go about recursive along with scheduling everyday is this:

Create two flows:

  1. Create a workflow “bill all due renewals today” (Let’s call it Flow1)
  2. Build another workflow “bill all due subscriptions” (Let’s call it Flow2) which would take a list of subscriptions as parameter

Flow1

  • Flow1 should do a “search for…” and call Flow 2 with the list you get from ‘search for…’.
  • After that Flow 1 should schedule itself for tomorrow.

Flow2

  • Flow 2 should take the first element out of the list and call the billing workflow. (Only if list has more than 0 elements)
  • Then Flow 2 should schedule Flow2 itself with list given to it minus the first element of the list. (Only if list has more than one element)
3 Likes

Beautiful. This is exactly the help I needed. Thank you so much.