I have a flow that needs to run late at night. It gathers information from various data sources, organized by recipient, and then emails each recipient a summary of the information that is applicable to them.
However, I don't want these emails to be sent until the next morning (or if run on a Friday night, the emails would not be sent until Monday morning).
I was hoping to use Delay Until for this, but the problem is that processing this information occurs in a loop, looping through each recipient. The flow gathers info for Recipient1 then sends the email to Recipient1, then onto Recipient2, etc.
If I include the Delay Until action before the send email action, that pauses the entire flow.
I could refactor my flow to collect all of the information to be sent to each recipient, say in an array of json objects [{"Recipient":"emailaddress1","EmailBody":"body1"},{"Recipient":"emailaddress2","EmailBody":"body2"},...], and then add the Do Until before a loop that loops through the information that has been collected and sends the emails, but that seems inelegant.
Is there any way to configure the Delay Until so that only the next action is delayed but the loop continues? Almost like separate threads.
Solved! Go to Solution.
Hi @msalamonjl
You need to redesign the flow. You can't delay and continue next action in a loop.
You may need two flows to do this.
Create a flow to collect the recipients name and day to send email. If it's Friday then set to Monday. Store this info in a database or a list (SharePoint ) or Excel. Then create another new flow scheduled to run every day to look for the db and sent the email.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHi @msalamonjl
You need to redesign the flow. You can't delay and continue next action in a loop.
You may need two flows to do this.
Create a flow to collect the recipients name and day to send email. If it's Friday then set to Monday. Store this info in a database or a list (SharePoint ) or Excel. Then create another new flow scheduled to run every day to look for the db and sent the email.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogUser | Count |
---|---|
87 | |
43 | |
21 | |
18 | |
16 |
User | Count |
---|---|
130 | |
47 | |
42 | |
36 | |
28 |