web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Apply to Each loop fai...
Power Automate
Suggested Answer

Apply to Each loop failing, despite actions in loop properly using configure run after

(1) ShareShare
ReportReport
Posted on by 10
I have an approval process flow that handles approval responses from multiple groups at once.
 
An Apply to Each loop, which executes in parallel, handles approval creation and wait for each response group. The Wait action has a timeout of 2 weeks. If no responses are received (Checked using Dataverse) by these two weeks and the Wait action results in a timeout, the flow enters a Do While loop within the For Loop. In this Do While loop, a Wait action for one day is executed. Responses are checked again. If no response was received, a reminder email is sent. And the Do Loop executes again. The Do Loop will execute for 13 more days. After which, the Do Loop and Apply to Each loops are exited, so that the flow can evaluate which of the Approval requests groups received responses and how to proceed.
 
The Apply to Each and Do Loops function as expected; I use Configure Run After to check for timeout on the Await connector, and all actions within the loops execute as intended in the case of successful response or timeout.
 
The issue is at the end of the Apply to Each loop. For some reason, despite the fact that only a timeout condition occurs and is handed with Configure Run After, and all actions within the loops execute as expected, the Apply to Each loop returns a state of Failure. The rest of the flow doesn't execute because the rest of the flow relies on a status of either succeed or timeout.
 
I cannot simply change the rest of the flow to run regardless of status of the Apply to Each Loop (Failure, timeout, succeeded) this is poor practice and when tested led to extensive issues. I also tried testing the source of this behavior with a smaller flow, but my test resulted in expected behavior; the Apply to Each loop result was Success. So why is my larger flow resulting in an error? How do I fix my actual flow?
 
Actual 1.png
Categories:
I have the same question (0)
  • David_MA Profile Picture
    14,956 Super User 2026 Season 1 on at
    Move the wait for an approval outside of the Do until action and also get rid of the apply to each action. I am not sure what you're trying to accomplish by putting the wait for an approval in a do until and a parallel apply to each, but that is likely the cause of the problems you are seeing.
     
    Once the Wait for an approval is not inside an apply to each or do until action, it should no longer time out after one minute and should wait for up to 30 days unless you specify a time out value in the wait for an approval action.
  • SunnyArk Profile Picture
    10 on at
     
    The nesting of the Wait action is intended functionality. 
     
    Each group is sent an approval, each group must be given 2 weeks to reply. After two weeks, if at least one person per group has signed off, the approval process continues to the next step. 
     
    Yes, there is a timeout value in the Wait for Approval action. The timeout is intentional; the flow is polling for responses. 
     
    Suggesting I change my whole design isn't an answer to the question of why a For Loop rolls an error condition up when only a timeout occurred, or why this only occurs in select cases as demonstrated by the two flows above.
  • Suggested answer
    David_MA Profile Picture
    14,956 Super User 2026 Season 1 on at
    What you are expecting is not how the wait for an approval action works. It waits for all of the responses before it continues. You would then use an apply to each on the responses from the wait for an approval action to parse out the response from each of the approvers. You would set it up like this:
     
    The do until under the create an approval are reminders. The right side under wait for an approval handles the timeout, and the left side under the wait for an approval handle when the action continues after the responses have been received. With the apply to each response handling processing each response.
     
    I assume your approval is set up something like this:
  • SunnyArk Profile Picture
    10 on at
    I've tested the function of how I'm waiting polling for responses, and it works just fine. Please stick the the original intent of the question, rather than offering suggestions on something that I have not requested feedback on.
  • David_MA Profile Picture
    14,956 Super User 2026 Season 1 on at
    You'll need to wait for someone else to respond then...
  • Ellis Karim Profile Picture
    12,163 Super User 2026 Season 1 on at
    @SunnyArk I agree with @David_MA, that the flow doesn't seem to be configured in a way we expected approvals to work. I'm also finding it hard to understand how the flow works.
     
    Note: Because at least one action inside the loop has a “Failed” status (timeout), the entire loop will be marked as Failed.
     
     
    Ellis Karim
    Ellis Karim
    elliskarim.com  |  LinkedIn  |  Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard