Forum Academy Marketplace Showcase Pricing Features

Start recurring wf without user openning an app

So I had this problem 6 months ago and still didn’t find a solution.

I developed new functionality in my app based on recurring workflow. Imagine sending emails with reports every week. So each user has a recurring “send an email once a week” workflow with recipient email “Current user’s email”.

This works fine for new users - I start the recurring workflow right after the user signup and it works fine from there.

But how do I start these recurring workflows for old users who don’t log into the app often? How do I start recurring workflow for a user on their behalf without them opening an app? I need it to be started by the user itself so the “Current user’s email” field will be populated properly.

I’ve tried Database trigger event + changing db field by bulk action but it still doesn’t start without opening an app by the user

  1. Create an “admin” page that only you can access.
  2. Add a button which starts a backend workflow.
  3. The backend workflow will schedule another workflow “as a list” and the list will be the set of users you want to contact (e.g. it will be a filtered list of users)
  4. The last step of the original workflow should be to schedule itself (e.g. current date + 1 day). This will create a recursive workflow so you don’t have to manually start it again.

You only have to manually start it once (via the button on the admin page) but since it becomes a recursive workflow, it starts itself from then on.

Hi Anthony, thanks for the advice, but it didn’t work in my case.
I tried it with “self-scheduling workflow” as you proposed and with “Recurring event…” (available at Professional plan and above) but it didn’t schedule workflows for users from my list, only for the current user (who clicked the button on the admin page). Because of that “Current user’s email” also populated at all workflows with only my current email.


UPD: I just changed “Current user’s email” to “Current workflow user’s email” and it uses emails that I need, despite showing that all workflows started by the user who clicked the button. Not sure yet if it may be a problem that workflows scheduled not by user that need that workflow, but from “admin” user

Firstly you don’t need the professional plan to set up a recursive workflow. Just use the normal “Schedule API Workflow” event. Here’s what mine looks like and I have a standard Bubble paid plan.

Secondly, the user email you’re seeing in the logs is just the email of the user that triggered the workflow.

The email that is actually used inside the workflow would be the user’s email and not the admin email.

If you create an editor link to your app I’ll be happy to have a look at it for you.

I use normal scheduled workflows in my application as you advised, but find them unreliable.

Each user in my app has several scheduled looped workflows that should run every couple of hours, indefinitely, but yet I keep seeing them stop for no apparent reason.

Maybe it has to do with a large number of users and workflows (tens of thousands of workflows a day), or the fact that the app sometimes reaches the Capacity limit, maybe something else, I don’t know.

Basically, I’m now trying to come up with a solution that will check that the first loop didn’t break and re-launch it in case if it failed.

The email that is actually used inside the workflow would be the user’s email and not the admin email.

It’s good, but not perfect, since there will be a mess in a scheduler list (some workflows started by users, then some started by admin, but actually running for the users…).

I remember seeing someone else comment on this before too. Maybe it’s a glitch whereby if a workflow is running on data that is being modified/manipulated at the same time, then it breaks.

However, the only way to know for sure is to check the Bubble logs for the workflow and try to find out the reason for it breaking.