Date-Time Based Workflow Trigger

This has probably been asked a lot of times, I am just looking for the best approach, especially with all the updates recently.

The outcome is to send an email/SMS, to users if the condition is true. Say current date and user’s birthdate.

Initially, I did this using the regular workflow, and “Do When Condition is True”. But it did notwork. Upon reading, most say this is best done using Backend Workflow, but haven’t seen details about executing this.

Any lead or tip?

You’re correct about that…

This is simple to do, but you’re thinking about this the wrong way…

Regular”, on-page (client-side) worklfows run in the User’s browser…

so they will only work when the browser is open, and running your web page.

So, unless your User is intending to keep their computer on, and your web page loaded in their browser all year round (which they aren’t) then client-side workflows are not suitable for this type of thing.

Yep… this is the correct way to do this…

Well, the Bubble manual is the best place to start (there is plenty of documentation on backend workflows), but the forum is full of such discussions.

But, to get to the point, you can’t trigger a backend workflow based on a date/time condition.

Instead, all you need to do is schedule it to run at a specific date/time.

So, for your specific use-case (i.e. running a workflow on a Users birthday), all you need to do is, whenever you first become aware of their birthday (i.e. when the sign up), schedule a backend workflow to run on that date, at a specific time (e.g. 7am).

An alternative option, is to run a backend workflow every day, and search for Users who’s birthday is today, and then run the action on each of those Users. (if you have a very large number of Users, this might be more efficient, but you sacrifice some accuracy on the scheduling, plus you can run into a whole world of issues related to time-zones)

@adamhholmes Thank you Adam for your replying.

Will this work on a Recurring Event workflow? But it seems such option is limited to schedule a recurring trigger/event?

You could use a daily Recurring Event for this…

But personally I wouldn’t recommend it (unless your user-base is such that you have hundreds/thousands of birthdays every day… and even then I probably would still avoid it due to time-zone complications and spikes in WU - better to spread the workload out, only triggering the actions when you actually need them to happen).

(I’ve been using Bubble, both personally and professionally, for almost 5 years… and I’ve literally never once used a recurring event in all that time).

Just schedule the workflows to run at the exact time you need them to (i.e. on the Users’ birthdays).

Thanks Adam! So Scheduled APIs it is.

I am looking at the New API workflow coupled with email send and Scheduled API. Is this the right direction?

You don’t need to schedule another API workflow from within that one (unless that is what you’re trying to do?)….

The API workflow just needs to send the email.

Hi adam! Thanks for all your info, it’s good to have people like you here. I want so send invoices the 1st of each mont, that’s why I’d like to have a better idea about how to do it. Do you have som example? I alrealy create all the invoices but triggering with a button.

1 Like

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