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" not ap...
Power Automate
Answered

"Apply to each" not applying to each

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a flow that is set up on a recurrence to find and email anyone in a list that starts in 2 days. It is working to find the right dates; the flow results show it found three. But for some reason, it is only sending to the first person in the list.  Ideas?

res2293_0-1678468745337.png

 

Categories:
  • VictorIvanidze Profile Picture
    13,083 on at

    Because an error occurs on the second iteration.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks Victorlvanidze. Still learning Power Automate. Can you share how you know an error occurs? And how I may be able to fix? I appreciate any wisdom!

  • grantjenkins Profile Picture
    11,063 Moderator on at

    Are you able to show everything you have within the Apply to each and what you put inside each of the actions (design view). I can see that the Apply to each has been running for 3 hours already, so maybe some sort of endless loop, delay, etc. but hard to tell.

     

    I don't see any errors as the Next failed link is disabled indicating that no error has occurred yet. Can you try clicking on the Next link to see what you get?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi grantjenkins,

    Thanks for writing. I think I figured it out -- and your comment makes me believe I may be on to something, but would love your thoughts. Inside the "apply to each" I have two steps -- send an email, then delay 25 days and send a second email. It worked during testing, but I only ever had item found at a time. I believe it's hung up on the 1st waiting until that 25 day is sent, then it will go onto the next item it found? Does that sound right? You are correct that there is no error or next failed. 

     

    I read about concurrency over the weekend and checked that. Would that allow it to send the first email to all items it finds without waiting for that first loop to finish?

     

    res2293_0-1678715828730.png

    Appreciate any thoughts! 

  • Fredrik_A Profile Picture
    3,644 Super User 2026 Season 2 on at

    Yes the delay will pause all other items aswell since the loop does 1 at the time, unless you turn on concurrency. If concurrency is on you will have 50 loops waiting at the same time (50 is max). Just be careful, concurrency and variables doesnt work together correctly (In my case) if thats something you are using. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks StretchFredrik. Appreciate the confirmation of the role of concurrency! Learning slowly.....

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    @Anonymous What is the trigger for this flow (assuming daily recurrence)? I would suggest (potentially based on what you currently have) that you remove the delay and second email, so the loop only has the first email. Then add a parallel branch which returns items that are 23 days past the start date (equivalent of waiting 25 days) and send them the second email.

     

    See example flow below.

    grantjenkins_0-1678747702528.png

     

    Recurrence is set to run daily at whatever time you specify.

    grantjenkins_1-1678747733249.png

     

    Add the first Get items, then click on Add a parallel branch and add the second Get items.

    grantjenkins_2-1678747787312.png

     

    Then rename each of the Get items so you know which one does what.

    grantjenkins_3-1678747841190.png

     

    For Get items 2 days from now, enter the following expression into the Filter Query.

    StartDate eq '@{addDays(utcNow(), 2, 'yyyy-MM-dd')}'

    grantjenkins_4-1678747939011.png

     

    For Get items 23 days ago, enter the following expression into the Filter Query.

    StartDate eq '@{addDays(utcNow(), -23, 'yyyy-MM-dd')}'

    grantjenkins_5-1678748034506.png

     

    Then, for each branch, Send an email to each item returned.

    grantjenkins_6-1678748132346.png


    ----------------------------------------------------------------------
    If I've answered your question, please mark the post as Solved.
    If you like my response, please consider giving it a Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so much! This is really helpful and I see the value of splitting it. Appreciate it. I'm going to give this a go. 

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 227 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 213 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 151

Last 30 days Overall leaderboard