Does a workflow get triggered by a condition even if user is not logged in?

Hi Bubble Forum,

Over the last week I have desperately been trying to find a way to send notifications to users when a condition becomes true, even if they are not logged in.

My first questions is simply this: does the app run a condition when it becomes true (say 24 hours later) even if the user is not logged in.

In the bubble references it states it will run the condition once it become true. However this is a bit ambiguous, and seems to be relevant only if the page is still open.

The condition i’d like to work with is this: 48 hours after their last log-in (a field I updated every-time they open the page) send them an e-mail reminding them of an action they need to do.

I have made this work partially with scheduling a API workflow set 48 hours after they last log in. However, this creates/schedules a new workflow every time they log-in/open the page, which will get really annoying for the user. I can’t seem to figure out how to cancel said workflow if user logs-in again within 48 hours.

I have also thought of using recurring events, however this is not something that happens every 48hours, but only when they haven’t logged in in 48 hours.

Would greatly appreciate any insight, and support on this.

Cheers,

Conditions only run when the user’s page is open.

That said, there are solutions for the challenge you’re running into. Typically people will set a cron job to run, say, every hour which will hit your app and then you can run a workflow each time it’s hit. Often, the cron will be something like “when user has user done X” then send this email and store the fact that it’s been sent (so you can not send it the next time the cron runs).

If you search the forums there should be more some more specific examples of this.

Hi @maurice.

You are on the right track with scheduling an api workflow for 48 hours out…you just need the cancelation part. When you schedule an api, you can save the ID it returns and use that id to cancel when the user does a login.

Something like this:

Hi! That’s what I was looking for. Ok great will try it out.

Thank you soo much for your hep!

1 Like

Hi, thanks for that insight. I will look into that as there are a couple other workflow (besides this) I believe could use this!