I recently changed one of my Flows to add an approval process. I had some challenges getting it quite right, but eventually got it working. Along the way, I had to cancel some reason after the approval requests had gone out as the run seemed to just hang. I eventually determined it was some bad configuration in an email action after the approval process.
To clean up the approvals, I accepted all of them. I determined the problem was the use of variables with concurrency.
However, each morning I find the approval requests back in my email and Flow site, but with the date and time from 2 days ago. Note I am using concurrency in my apply to each. Any idea why this is happening and how to stop it? I Have turned off all flows and it still keeps happening
Here is the flow, it queries a SQL DB and then runs through an apply to each for the return values:
First off, "Start and wait for an approval" Will wait until all the responses have been submitted before it will move onto the next step. So if you are sending an approval off to 5 different people it will wait until all 5 people have accepted or denied the approval request. Second, for each approval it will run through the "For each" statement and it will send an email for each person, so if there are 5 people doing the approvals it will send an email 5 different times. You should use a variable to set what you want to do within the "For each" Loop then outside the loop check the variable to see what it should do.
Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I agree with @alrez in that there are some issues with your Flow. Can you describe what you want to accomplish with a little more detail? If so, then I will provide a sample Flow for you. I guess what I am asking for is for you to describe the approval process that you would like to implement.
1. Queries SQL for in scope items
2. does a apply to each on those items
3. Does several stored procs to getting more details, including who should receive the email with the details in #5
4. Sends the details for approval, sent to about 6 people, same people for every item
5. Sends an email with the details and approval comments
I had to enable concurrency on #2 or it only sent one approval out until it was completed.
Turning on concurrency made my variables not work, so changed to use proc output direct and some compose actions
Then some items didnt send out an approval. Couldnt see in flow where the problem was.
Fixed leading space in the recipient list for step 5 and it "Seems" to be working, but had to stop testing until 10/1.
Last 4 days I continue to receive approval requests even though no flows are running.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.