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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Apply To Each mechanics

(0) ShareShare
ReportReport
Posted on by

Apply to Each has broken my brain.

I am reading a json array, and processing each record in an Apply to Each. At least that's what I want to do.

 

In the Apply To Each I send and email with the contents of the current record. But now I am getting multiple, duplicate emails.

Posts here say the issue is the email task inside the Apply To Each.

 

I expected Apply to Each to be something not unlike a cursor in SQL, Get a record, do something, get the next record, repeat.

How is Apply to Each different than this?

 

Thx

I have the same question (0)
  • Pstork1 Profile Picture
    68,271 Most Valuable Professional on at
    Re: Apply To Each mechanics

    That is the way it works unless you are nesting multiple apply to each loops inside each other.  Can you show a screenshot of your flow?  That may help figure out why its not working.

  • Community Power Platform Member Profile Picture
    on at
    Re: Apply To Each mechanics

    Only one for each, with the send email in it.

  • Community Power Platform Member Profile Picture
    on at
    Re: Apply To Each mechanics

    The For Each result

  • Pstork1 Profile Picture
    68,271 Most Valuable Professional on at
    Re: Apply To Each mechanics

    YOu are looping on something from the query that generates 7 loops.  But your emails are based on something else from the query, not the rows being looped through.

  • Community Power Platform Member Profile Picture
    on at
    Re: Apply To Each mechanics

    OOoooookay....I just figured it out and I'm too embarrassed to reveal the reason.

    Just come up with the most insane, ridiculous, idiotic reason you can think of and multiple it by 10 and then you will be in the ballpark of how dumb I was in not figuring this out in the first place.

     

    thanks for your offer of help!

  • Community Power Platform Member Profile Picture
    on at
    Re: Apply To Each mechanics

    While I figured out the duplicate emails, perhaps  you can explain this behavior.

    Every time I edit and save my flow, it adds another For Each. I started with one, and now it has insert two others.

    The Pic should explain it.

     

    Thx

  • Pstork1 Profile Picture
    68,271 Most Valuable Professional on at
    Re: Apply To Each mechanics

    Normally that happens because you are inserting a value that its not picking up as being related to the item running the loop.  But I don't' use Power BI enough to know why its happening in your case.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 722 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 461 Moderator

#3
developerAJ Profile Picture

developerAJ 283

Last 30 days Overall leaderboard