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 / send an email for each...
Power Automate
Unanswered

send an email for each distinct group in an excel online table

(0) ShareShare
ReportReport
Posted on by 167

hello, i need to build a flow that filters an excel table and sends an email for each distinct group in the table. Here's a generic example of what my excel table would look like. 

 

interline_flow.jpg

 

Given this excel table I would need to send one email to customerA@email.com with each invoice listed and the same for each customer.  The customers from this source will change daily. I previously created a flow that iterates through an excel online table and sends an email for each row. The difference is i want one email for each group with all it's rows. How can this be achieved with power automate? thanks 

 

 

Categories:
I have the same question (0)
  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @amcneil32 

     

    You would perform a union on the email field union(emailfield,emailfield) and this would return the three emails as an array.  Using this array you would then perform an apply to each and for each value, filter the get rows from excel for the email in order to create an array, and send an email with only those select emails.

     

    A bit like the apply to each here https://www.youtube.com/watch?v=cAHRrmZBzVU

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

  • amcneil32 Profile Picture
    167 on at

    @DamoBird365, thanks for response. I'm not too certain of the last step in my flow that requires emailing each email account with their corresponding filtered array. When I try to use the "send an email action" with the output of the html table it sends both filtered arrays to each email. Any thoughts? thanks again

     

    amcneil32_0-1621273512383.png

     

    amcneil32_1-1621273533302.png

     

     

     

     

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    @amcneil32 

     

    You would want the send email action within your apply to each 2.  

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

  • amcneil32 Profile Picture
    167 on at

    @DamoBird365 , this solution works. thanks for the help. The formatting of each html table isn't quite what I'm looking for though. Is it possible to have each filtered array sent as an excel file? It looks like the update row excel action only updates single rows. I guess what I'm trying to ask is is sending the filtered arrays as an html table my only option here? thanks

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @amcneil32 

     

    If you want to create an excel file for each email and in a table, you might want to consider watching my recent videos here.

     

    Using excel scripts you can build bespoke Excel Files.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

  • amcneil32 Profile Picture
    167 on at

    @DamoBird365 , I think I'll have to explore excel scripts in the future. For now I added CSS to my flow to format the tables. thanks for the help

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard