How to setup an Automatic Monthly Reoccurring Workflow

I have read the bubble docs, search the forms, watched some youtube videos, but for the life of me I can’t figure out how to setup a Automatic Monthly Reoccurring workflow.

I am on the personal plan, I have enabled the expose API in the settings and tried a few different variations of the backend workflows. Nothing I try seems to work though.

Here is what I am trying to accomplish. It sounds very simple, but I just can’t seem to figure it out…

  1. If a database type called “Prospect” was created over 30-days from today, then I would like it to change a field on that “Prospect”. The field is a yes/no that controls whether it is hidden or not.

  2. I would like this workflow to run without any user or admin intervention once every 30-days.

  3. There are a couple of other fields I would like to update, but I can’t get steps #1 or #2 above working first.

Can anyone share a step-by-step example of how this can be accomplished?

Probably there is something that I miss from your explaination.

I’m thinking: can’t you just change the fields when you create the “Prospect”?

If you need to change the field based on a specific date range maybe you can save the valid date range in the database, then in the workflow where you create the thing in the databse you check if the current time is within that range and modify the fields accordingly.

Thank you for the reply, I will try to be clearer with my explanation.

The first part of my question is how to setup the automatic reoccurring workflow in general. I know you go to backend workflows and then click to add a new backend workflow. Do I select “New API Workflow”, “New Recurring Event”, or “New Database Trigger”? Which one is used to create the automatic monthly workflow?

The second part of my question is how do I limit the workflow to only affect "Prospect"s that haven’t been updated in the past 30-days. I already have a date field under “Prospect” that reports the last updated date. If that last updated date is more than 30-days old when this workflow runs, then will have it update another field or two.

I know this is very basic for many of you, but there is just something I am not doing correctly here. I would appreciate any additional feedback or suggestions.

First part:
you are looking for recurring events, they need to be scheduled with an action.

Second part:
You can create a recurring event for your thing and set the logic to do the update. You will probably need to create a workflow that check the conditions and does the actions on a single thing, then in your recurring event you schedule this workflow on a list of things.
As an alternative when you create this thing in the db you can schedule a workflow in 30 days. In this workflow you do your checks and actions, then, in the end, you schedule the workflow again in 30 days.

I think I am getting closer, but something still doesn’t seem to be working. If anyone can see the issue in this setup, I would appreciate any feedback.

I setup a Recurring workflow with a start date of the current date/time plus a few minutes (so I could see if it would auto run). Here are the settings…


Here are the steps (actions) I have under the Recurring workflow…


In the 2nd step, I have it schedule an API workflow to make the changes. Here is how that looks…


If I run this API manually under the Bulk changes in the database, it seems to update everything as expected. However, it doesn’t seem to run automatically (the Recurring workflow doesn’t seem to be running). Can you see where the issue is?

you are setting up the recurring workflow from the recurring workflow itself. This can never work.

You need to set up the recurring workflow from another workflow.

Can you please elaborate? I want it to be an automatic thing, not something I have to click on a button to have it run (unless I only need to click the button once).

Are you saying I should make a button to trigger a workflow that runs the Recurring workflow? Will it automatically run each month from there?

Somehow somebody needs to start the engine. It will not start by itself.

Is as simply as I said: from a workflow (that is not the recurring workflow) you need to use the action "Set/cancel a recurring event " and then you need to trigger that workflow to start the cycle.

Do your tests with a shorter frequency and check your logs to see that everything is running as you planned.

Cheers
Mariano

Thank you for your continued help @dorilama. I understand what you are saying. I setup a button that activates the Recurring workflow (see image below). It doesn’t seem to be working though.


After clicking the button is clicked, I still don’t see anything under the Logs>Scheduler tab. Shouldn’t I see the scheduled event for today or next month there? Do you see anything else I am doing wrong?

what happened to this? did you do your tests on shorter timescales?

I can’t set the reoccurrence to something other than monthly on the personal plan. However, I did make the start time for current date/time +1 minute. Shouldn’t this run the first one 1 minute after pushing the button? I understand the next occurrence wouldn’t run for a month, but I am not getting the first one to run. Here are the logs in the server after I push the button…

ok.

Not necessarely. Read again the docs:

When running this action on a thing that has already been scheduled, the start date has to be after the original next run date. If not, it will be pushed back by another period.

did you check the logs for the first time it was supposed to run (the first time you scheduled it)?

Needless to say that the other option (schedule a workflow when you create the thing in the database, do what you need to do and finish by scheduling the workflow again) it’s much more easy to test.

If you struggle you may give this other method a go

The personal plan only goes back 24 hours in the logs. I ran the first test over 24 hours ago. Not sure it worked back then, and with only 24 hours in the log, I don’t see how I would know.

With that said, if it worked, shouldn’t I see something under the scheduler tab (see image below)? Even if this wasn’t setup to run for another month, shouldn’t it show here?

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