Let’s say I have a date range of between 01-01-2021 and 31-12-2021. For each day in between those two dates I want to create a Day thing which I can do something with.
How do you approach this? I am looking for a for each function but can’t find it.
dayThing (your custom day thing type in your db to hold your 300 dates)
date: thisdate
Schedule API workflow
workflow to schedule: “date creator” (this workflow)
index : index + 1
thisdate: thisdate +days: 1 conditional : when index <= 300
This will cause the workflow to run 300 times, while incrementing the date by 1 day.
Run the workflow with starting values index = 1 and thisdate = your starting date.
This will cause the workflow to run 300 times, while incrementing the date by 1 day.
There may be solutions for using a plugin or otherwise to generate a list of 300 dates or numbers and running a workflows on a list of things, however I’ve experienced issues where certain workflows may not run when doing this. IMO recursive is the only way to go.