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 / Issue with send an email
Power Automate
Answered

Issue with send an email

(0) ShareShare
ReportReport
Posted on by

Hi, I am new to Power Automate. My task is that pA has to read the firstname and lastname from the email body, and it has to match the name with Excel sheets. If the name matches, then it has to save the file on OneDrive; otherwise,  it has to send an email saying that there is no match. 
    My issue is that my excel sheet has 50 rows. If it matches with one person's name, then it is saving a file, and it is sending 49 emails saying that there is no match. But what I need is that if there is no match, it has to send just one email saying that there is no match. Please help

Th11_0-1711147703552.png

 

Categories:
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Hi @Th11 
    You need a variable (array) to collect all the names that don't match, then when the apply to each loop has finished you can drop all of the names that didn't match into one email and send it.

    1. initialise a variable at the top of your flow

    DJ_Jamba_0-1711148320036.png

     

    2. In the If No section of your condition, don't send an email. Append the name that didn't match to the array instead by using the Append to array action:

    DJ_Jamba_1-1711148575797.png

     

    3. After your apply to each loop, use a Join to combine all the names together in your array. We will use html <br> so that each name appears on a new line in the email.

    DJ_Jamba_2-1711148735272.png

     

    4. Insert the Join in the body of an email

    DJ_Jamba_3-1711148842474.png

     

  • Verified answer
    creativeopinion Profile Picture
    10,508 Moderator on at

    @Th11 If you are only looking to filter your Excel rows by a single column you can use the Filter Query field in the List rows present in a table action. You'll need to ensure the column you are using in this field doesn't include any spaces.

    creativeopinion_0-1711159076866.png

    However, because you are looking to filter your rows by two columns, you will need to use a Filter Array action. You can refer to this YT Tutorial for how to do use this action: Are you using the Microsoft Power Automate Filter Array Action wrong?

     

    In this video tutorial I’ll show you 3 practical ways to use the Filter Array action and how to use it properly.

     

    1️⃣ Cross-Referencing Data

    2️⃣ Filtering by Key

    3️⃣ Substring Matching

     

    IN THIS VIDEO:

    ✅ 3 Ways to Use the Filter Array Action

    ✅ How to use the Scope Action to Group Actions

    ✅ How to Check the Number of Items returned from a Filter Array Action

    ✅ How to Cross-Reference Data in Excel with a SharePoint List

    ✅ How the Filter Array Action Works

    ✅ How to Access the Dynamic Content from a Filter Array Action

    ✅ How to Filter Items by a Key

    ✅ How to Filter Items by Matching a Substring

    ✅ How to Use Multiple Conditions in a Filter Array Action

     

    Although it might look like the Filter Array action can only accept one condition—this is not true. By using the advanced mode you can enter multiple conditions into a Filter Array action with an expression. I cover how to do this in this section of the tutorial.

     

    I would recommend adding a Compose action after the Filter Array action to store the number of items returned. If there are items in the Filter Array action, then you can add the rest of your flow actions to the YES branch of your flow.

    creativeopinion_2-1711159369804.png

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

     

     

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 335 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard