Ask a question
Recurring events became easier in May 2023
If I go onto the Bubble pricing table and look at recurring workflows before May 2023, if you're on what is now known as the starter plan, but basically the first few plans you were limited to how frequently you could run the workflow. So in fact, on the first paid plan, you could only run the workflow every month.
And so we developed a workaround using cron jobs. But this has changed since the new pricing came in in May 2023. And yeah, because of Bubbles new pricing, they have also added in features to help optimise your apps, including making recurring workflows available on a daily rate on all of the pay plans. So here is how you add them into your app. I'm going to do this really simply.
I've got a page and I just want to be able to email a user every day. For example. So I go into back end workflows and I create a new recurring event. And I'm going to just call this email user. I'm going to put the type as user and then I'm going to add in the email action.
I'm going to say current workplace users email. And I'll just subject daily email. Hi, this is a recurring email in Bubble. Okay.
Creating a recurring event/workflow
So I have that as a backend workflow as a recurring event. But recurring events have to be triggered. So I'm going to go back to my page that I've called recurring workflows and I'm going to just add in a button. Now you would need to work out the appropriate place to trigger this in your app. If your app does send a daily email, maybe you would incorporate the action that I'm adding to this button into your registration workflow.
But I'm just going to say start recurring emails and then right then I find, set or cancel a recurring event. I pick my recurring events that I created in the backend workflows tab, workflow thing. Remember, I'm passing a user into it because I'm using the user's email as my recipient data. And then the frequency I'm going to say daily and start date. So just so I can demonstrate how this works, I'm going to do current date plus 20 seconds.
Okay? So then if I preview and so that I can show you how this works, I'm going into logs scheduler and then I'm wanting to show workflow scheduled after the current time. Here's the time that I'm recording this video. So if I click the button and then click show, it's now showing me that a scheduled workflow. This is how the repeating events work.
A scheduler workflow is scheduled for looking at the time. Oh, maybe I put the wrong time in there. Let's just check. I did. Oh.
Debugging recurring workflows
Add seconds. 20. So what I wanted to demonstrate is that this is July the fifth, which is today, and it's scheduled for two minutes time for some reason, even though I said 20 seconds. Okay, so the workflow has run, and we can see that it's no longer saying July 5, which is the day I'm recording this video. It's now saying July 6.
So, effectively, a recurring event, a recurring workflow is just scheduling workflows to happen in the future. And they're all accessible through the scheduler, just as if you had scheduled any other API workflow. It is available from the scheduler. So if you need any help with your Bubble app, you can reach out to us through our website. We offer Bubble one to one coaching.
We also have even more videos on our website. Many of them are member exclusives. You can become a member to gain access to them to help you out with developing your Bubble app.