Forum Academy Marketplace Showcase Pricing Features

[New Feature] Recurring workflows

Users have asked for the ability to run workflows periodically for a while now. We just deployed this ability for users on a paid plan (as this requires using the API section of the Editor). Here is how it works.

  1. You can now create Recurring Events in the API page (after you’ve activated the Workflow API for your app). Unlike API Events, these workflows cannot be triggered through a POST request, but can be used in a “Set/cancel a recurring event” (see below).

Such a workflow has to take a database thing as a parameter. To schedule a recurring event, you need to attach this to a thing.

  1. Once you’ve defined this event, you can use a Set/cancel a recurring event action in your workflow. This action takes an event, a thing, a frequency and a start date. Note that the same action is used to cancel a recurring workflow, just pick ‘none’ for the frequency.

If you want to update the frequency of a recurring even, you can apply the same action to a thing, and the scheduling will get updated for the following occurrences.

  1. You can see the upcoming recurring workflows in the scheduling view in the editor.

  2. Recurring events require some infrastructure on the server, so we have to make the daily frequency available to users on a Team plan, and the weekly frequency on users on a Professional Plan. Other frequencies are for all users on a paid plan (this can be changed for users on a Dedicated Plan).

  3. Note that only one recurring event can be applied per thing (for instance, one weekly newsletter per user). These limitations are necessary as this stage as recurring things can be pretty dangerous server side…

47 Likes

YES! Thank you!

Awesome stuff! Thanks for the continued updates!

Very cool! Thanks Bubble!

You guys are the best.

Been waiting for this for a while. Thanks team!

Brilliant, thank you, this helps me a lot!

The frequency of your updates are impressive, to say the least!

2 Likes

Fantastic news, @emmanuel. You guys are doing some real good work. Keep up the good job.

1 Like

I am having a hard time to get this to work…

I have set it up - the same way that emmanuel has shown in the first post here; a monthly workflow that sets a data value to 0 (once a month).

How do we initialize the workflow? - I think I have set it up properly; but I can not see what trigger it…

I also do not see anything in the “scheduling” section of the logs.

1 Like

@jordanfaucet The set/cancel recurring event action should actually go in a regular workflow on one of your pages. Right now you’re setting it within itself, so remove that first action and move it to wherever it is in your app that should trigger it (technically you won’t be able to cut and paste, you’ll need to re-add the action in the workflow).

2 Likes

Thanks Gaby! I got it working.

The recurring event doesn’t require a user to click anything really - so I didn’t realize it had to be triggered by a workflow.

I just set it to a random element; then clicked it myself :slight_smile:

Cheers,

1 Like

This feature could be great, but I’m having a hard time using it.

When I set the frequency to none, my logs show an error: “Workflow error - More than one scheduled recurring event per thing. Aborted.”

When I set the frequency to weekly I get the same error.

In the scheduling tab there is nothing displayed, so I have no idea what’s going on. It appears nothing is scheduled. But if that’s the case, how am I getting this error?

Also, in the workflow debugger there is some sort of error where the recurring workflow name is missing. The event is now called “bTGpP”. I’ve only ever seen this when a workflow refers to something that doesn’t exist, which isn’t the case here.

Any suggestions here?

Thank you @romanmg - your answer helped me out too! I’ve been struggling with this recurring workflow setup as that information is not clear in any of the threads. I also had the ‘set/recurring event’ in the same API workflow. Now I can actually see the recurring event in the scheduling tab!

Sorry I don’t have a response to the person above, but I do have a question too, if anyone could answer please.

If I have 2 events I want to occur at different times (same day) can I have them both in the same workflow?

[ex. (send email at 11:00) —> (send email at 2:00pm)]

Or do I have to have 1 recurring event per workflow ?

I have been trying to set 1 recurring event per workflow but am having difficulty with the ‘type of thing’ setup since you can only have 1 recurring event per thing. So if one event is set on ‘User’ then I can’t put anything else with ‘User’.

@cooljen - How soon after you set up the “set recurring event” did you see the jobs appear in the Scheduling log tab?

Per your question, is the interval fixed (eg. 3hrs)? You might be able to have the initial Schedule API hit another Schedule API that is delayed 3hrs. Haven’t tried it myself.

@kramwe Yeah, the schedule showed up immediately after I fixed that (moving the action to a different page, so that it isn’t set within itself). I had to refresh the schedule page though and then it shows up. It appears to set the start (for whichever frequency you have set) to the next day instead of that same day.

Regarding the interval, yeah that would work except I just used those times above as an example. I have it set up where the times are customizable. I suppose I could change it such that they’re on intervals if there is no other work around.

I haven’t been able to test the scheduling thing yet because the schedule I had set up was for monthly (since that’s the shortest frequency available to me right now) and the scheduled date I had set up previously has passed. I wasn’t able to set up the times beforehand because now the database isn’t working. It won’t pick up on any of the data I save there - apparently its not really saving anything.

Zapier is another option and very user-friendly.

Yeah, I’ll have to check there again. I didn’t like what I saw there before, as it didn’t really match the functionality I want to have and it seems much easier to just have the scheduling here rather than pinging from one source to another. Thanks for the suggestion though.

@romanmg. If you have a sec, could you pls weigh in.

I’m setting up a weekly schedule for an API, but I’m not seeing new scheduled jobs added to the schedule log. Does this mean I haven’t set it up correctly?

  1. On app page - SHOULD fire weekly ping… but I don’t see any new scheduled tasks in the log.
  2. Hits a Recurring API workflow
  3. Scheduler log - nothing…

is it possible to bypass this restriction? @emmanuel
“5) Note that only one recurring event can be applied per thing (for instance, one weekly newsletter per user). These limitations are necessary as this stage as recurring things can be pretty dangerous server side…”

Because I have different Membership Plans (Monthly & yearly) and I want to create for each plan a recurring invoice based on the user choice.

When I use several Recurring of the same thing I get this workflow error:
“More than one scheduled recurring event per thing. Aborted.”

How can I bypass that? is this allowed on a specific bubble plan?

We can look at changing the frequency on a dedicated plan.