As part of a flow I am building to create a new user request and send different parts of the process to various teams, I am using the Send Email with Options action to send each team an email instructiong them their task, with a single Option button in the email which says "Task Completed." Since this is a time sensitive process, I want to be able to send a reminder email to the teams if that "Task Completed" button has not been clicked after 3 days, and a message to all teams involved in the process if the button still hasn't been clicked after a further 3 days.
Following the instructions in the article here - https://techcommunity.microsoft.com/t5/PowerApps-Flow/Automating-Reminders-for-Approval-Flows/td-p/8... - I initialize a boolean variable at the beginning of the Flow for each step that is set to false. I send the email with options, and then make the next action set the variable to true, so that once the recipient clicks the "Task Completed: button, the variable should move from false to true.
I then have a parallel action that looks at the variable. Inside the Do Until loop are a 3 day delay, a send email to the single team action, another 3 day day, and then a send email to everyone action. However, when I attempt to test the Flow, it hangs on this Do Until loop. It seems like it is not re-checking the variable to see if the loop needs to continue.
Here is what one example portion of my Flow looks like:
And here is what it looks like when I run the Flow:
While this example has only run for 11 or so minutes, I have another example run which was stuck in this same spot for 17 hours without progressing. My Ideal would be that the Do Until look checks the variable every hour, though it should still only send the reminder emails out after every 3 days of inaction.
Any suggestions would be appreciated.
I have analyzed your flow.
When the Do Until runs, the Initial value of boolean variable is false,so the four actions "a 3 day delay, a send email to the single team action, another 3 day day, and then a send email to everyone action" inside the Do Until would run at least one time,so even if the boolean variable is changed to true, the Do Until wouldn't re-checking for the boolean variable to see if the loop needs to continue until the four actions hsa run finished.
So your flow couldn't re-checking for the boolean variable to see if the loop needs to continue as soon as the variable is changed.
I also use do until in parallel to approval with one day delay for sending remainders. The flow don’t go until delay pass even if parallel approval succeeds. So I face same issue as topic starter. Any solutions for that?
I will try to make parallel circle ends with the the end of the flow rather then limiting to approval step. Keep yo posted.
Hi @Mikhail- Thanks for bubbling this post back up 🙂
I've recently implemented what I think is something similar. In my case, an Approval is sent out, and if it's not responded to within 3 days, it needs to be reassigned (i.e. some other action must be taken). So there's a branch parallel to the Approval, which runs a Do Until loop until either a status variable = some value (which is set after the approver takes action), or 3 days, whichever happens first. So far, that's what the OP had done, I think. But then I also want to send a reminder email daily to the approver, but of course stop reminding them if they've taken action. So as @Mohoelx suggested, check (loop) more frequently to see if the action has been taken.
The key step I did to achieve this is to set a Counter variable that increments each time through the loop, and every x-th time send a reminder (e.g. if you want a daily reminder, but check hourly if the approval action was done, send the reminder every 24th time through the loop). I used the mod function to determine the x-th time (i.e. if mod(Counter,24)=0 then send an email). Here are some screenshots - for testing purposes, my Do Until loop is waiting 3 minutes (to represent 3 days), and the Delay is checking every 15 seconds, and sending a reminder every 4th time - i.e. once a minute until the approval action is done. This is just because I'm an impatient tester 🙂
Overview of the parallel branches:
Detail of the Do Until:
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
We've given our badges an overhaul and also added some brand new ones!
Learn how to build the business apps that you need.
Find out where you can attend!
Watch & learn from the Power Automate Community Video Gallery!