Hey Bubblers,
Does anyone know how to set up recursive workflows in the use case of sending a long list of emails recursively? I know that Bubble mentions recursive workflows on their manual, but they don’t actually tell you how to do it.
Hey Bubblers,
Does anyone know how to set up recursive workflows in the use case of sending a long list of emails recursively? I know that Bubble mentions recursive workflows on their manual, but they don’t actually tell you how to do it.
You can make a back end api then on your front end schedule the workflow.
The last action in the api workflow can schedule another api workflow or the same api workflow with different data.
Can also do this on lists
Is this what you mean.?
That’s what I thought to, but when building how do I tell Bubble which is the next email it should send to? There isn’t a :next item function or anything
For something like a drip campaign (seems like what you’re doing) of emails I’d do a scheduled api workflow to send/schedule the first email. In your DB have this set with a field for “id” #1 at the end of the flow it would schedule the same api workflow but this time your data sent is “do search for email” with constraints of id = current api workflow “Id” + 1
So then #2 would send.
Then the logic would carry over because once #2 sent the current Id + 1 would = Id #3 so it would work perfect.
Yeah I did do that for one of my apps, but I noticed that after 1,000 or so with 5 sec spans it times out or stops running or something
Maybe use the first item to send the first email, then remove the first item, send again to the (new) first item (if not empty), then minus, first, minus, and so on ?
In this post a good advise from Nigel (to avoid infinite loops!) :
Hey,
@cmarchan gave me some tips for doing recursive workflows
Here a few guidelines:
Basically it’s the same as doing changes to a list of things, but the difference is that you can taylor changes to each entry in the list