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 Platform Community / Forums / Power Automate / Apply To Each mechanics
Power Automate
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

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,678 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,678 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,678 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard