Automated Backend Workflow?

Hi. I am trying to set up a recurring (I think) workflow. I looked through the forum and documentation and cannot find a clear answer, since most people are doing other things. Basically, when an admin on our app marks a user’s order as “delivered” it adds a “delivery date” to the user’s project. Then, basically, I need Bubble to check the orders every day to see what orders have a delivery date that is 3 days old or older (since users have 3 days to request changes on their order, or else their order is automatically marked as “complete”), then change the order status from “delivered” to “complete.” I would need this workflow to run in the background since we change the delivery date if we revise the order, so the delivery date on orders may change. If you could give me a step by step on how to accomplish this, it would be greatly appreciated. I know my way around Bubble, but I am asking for a step-by-step because, again, I looked online to try and find a straight answer on how to do this, but people jumped around a lot and did not do a step-by-step. Thanks!

I don’t think you will find an exact step by step that perfectly fits, but maybe this helps:

I would setup a new recurring event (mind you I’m new to Bubble, and plan to setup a recurring event soon myself but haven’t actually tried this functionality yet)

Then I would use the search functionality to find the orders that are 3 days or older (I would actually use hours as the way of comparing now vs some past date) and then change the order status by stringing together several actions in workflow. I would probably run this every hour assuming you have orders coming in all sorts of hours.

One thing you mentioned: changing delivery date. That could make things complicated as you might mark something completed and then later want to change the delivery date. I can’t say without being more involved in your project and business logic what impact that has.

Thanks for the insight!

I guess I am just a little confused on how to trigger recurring backend workflows without causing loops or re-triggering them.

I come from the automation space, where a trigger is a certain schedule, not an action from a workflow. For instance, in the automation space, it the workflow would look something like: Trigger = Every 3 days —> Action = Do this

How does Bubble know to trigger the workflow on repeat?

For example, when I mark the user’s project as “delivered,” do I schedule the API workflow on this action and this just triggers the API workflow to repeat on all projects (since I would use the search for function) or will it try to trigger the API workflow every time I mark any project as “delivered?”

I guess my questions are: how do I trigger the workflow correctly? If I “schedule API workflow” as part of a workflow when I mark a project as “delivered,” when I do this for any project, will it also trigger the same workflow, or will it see that one is already running?

The documentation on the Bubble help article does not really address this.