[Recursive workflows] Delete list of records every Sunday

Hello everyone :wave: ,

Can anybody give me an example of how to make a recursive workflow?

I read the bubble docs but sadly no example is provided regarding how to create that :frowning_face:

I just want to delete list of things every sunday I am on paid plan but i don’t know how to create that?

Thanks for your response :pray:

Screenshot 2022-08-29 at 16.22.43

This is my backend workflow
Screenshot 2022-08-29 at 16.22.59

this is what i am doing but i don’t know how to repeat it every sunday?

@mikeloc @adamhholmes or anybody ?

1 Like

It depends a bit on what exactly the list of things you’re trying to delete is…, i.e. how many things are in the list, and when and how you’re defining that list…

But all you need to do is create the workflow(s), trigger it initially to run on a Sunday, then, from within the workflow itself, schedule it/them to run again on the following Sunday (i.e. a week later)…

Which aspect are you having trouble with?..

Thanks @adamhholmes for your response :pray:
I updated my question…

Can you tell me how to do this?

Sticking with your specific example, you just need to add another step in the backend workflow to schedule the same workflow to run again in a week’s time (i.e. current date/time +7 days)…

You’ll need to schedule the workflow to run initially on a Sunday (currently you’re just scheduling it to run ‘now’)…

A couple of things to note though…

Using the ‘delete a list of things’ action might not work well on larger lists (more than a few hundred), but should be fine an smaller lists (100 or less)… if using a larger list you might be better off running a recursive workflow to delete them individually, one after the other…

Also, in your example, you’re defining the list to run on at the time you’re scheduling the workflow to run (not when it runs)… which may, or may not, be fine in your case… it depends on what you’re intending to do.

If it’s not (i.e. if you nee to list to be defined when the workflow runs, instead of when it’s scheduled), then you’ll need to add an additional workflow, to define the list of things to delete, which will run at the scheduled time (i.e. on the Sunday at the given time), then from there trigger the workflow that actually deletes the things.

1 Like

@adamhholmes Thanks a lot for the detail response :pray:

I just have less than hundred items to delete for now (but i will keep that in mind regarding delete them individually)…

Just to make sure this is what you want me to do, is it correct?

Also for changing Current date/time to Sunday (Should i pass some arbitary date pointing to Sunday)?

Once again thanks a lot :+1:

@adamhholmes :wave:
Thanks a lot for your help :pray:
it works :+1:
I solved this using arbitary date…