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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Multiple emails send t...
Power Automate
Unanswered

Multiple emails send through Apply Each

(0) ShareShare
ReportReport
Posted on by 4

Hi,

 

I have created a flow as shown in the images below. The flow is triggered when the user fills a form, which has field for the user to enter their name. I have an excel table with three columns, which kind of looks like this:

 

Name  Email  Response

xyz

abc

pqr

....

....

...

 

The Name column has multiple entries. I want to send the user a success mail if their name is in the table and I want to send them a failure mail if their name is not. With the flow that I have created, the user is being sent multiple mails and I can understand why that is happening.

 

However, I am not able to figure out, on how I can steer out of this situation. Any help would be appreciated.

 

Thanks

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    Your email action is inside a loop (executing for each item in your worksheet) which is why it sends multiple emails.

    When the item matches they receive the email in your "Yes" branch otherwise they receive the email in the "No" branch.

    You need to review the logic again.

     

  • grantjenkins Profile Picture
    11,063 Moderator on at

    This should get what you're after. Effectively, it will build up an array of Names from your Excel Table, then check to see if that array of Names contains the Name that was entered in the Form.

     

    My Excel Table for this example is below:

    grantjenkins_1-1668945141791.png

     

    And my super complex form 😉

    grantjenkins_2-1668945174202.png

     

    Below is the full flow. I'll go into each of the actions.

    grantjenkins_0-1668945112065.png

     

    The first three actions are fairly straight forward. When a new response is submitted and Get response details retrieves the output of our Form. List rows present in a table returns all the rows in our Excel Table.

    grantjenkins_3-1668945283907.png

     

    Next, we build up a simple array of Names from our Excel Table data. We use a Select for this using value from List rows present in a table and go into Map to text mode (icon on bottom right as shown by the arrow below) and add the Name field.

    grantjenkins_4-1668945412924.png

     

    This will give us the following output:

    [
     "Bob",
     "Jane",
     "Bill",
     "Jack",
     "Jill",
     "Mary"
    ]

    grantjenkins_5-1668945511780.png

     

    We can then use the output from our Select to check if the array of Names contains the Name we entered in our Form. If it does, we go into the Yes branch, otherwise the No branch.

     

    grantjenkins_6-1668945579431.png

     

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard