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 / Power Automate sending...
Power Automate
Answered

Power Automate sending multiple email

(0) ShareShare
ReportReport
Posted on by 8

Hi All, 

I have a sharepoint list which contains an email address and a link which is unique to that user and all it need to do is go through that list and email the user a link. (pics below of the list and the flow) nothing super complex there. The flow works as expected however it sends duplicates of the email. I'm really new to Power Automate and so any advice would be greatly appreciated.

 

list.PNG

flow.PNG

Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at

    Hi @donewithcrayons 

    I provided a similar answer to the same problem in this thread: Re: Create Approval for Multiple SharePoint List I... - Power Platform Community (microsoft.com)

    The idea is to do a group by operation, grouping items by approver, and then sending a unique email. Have a look at this excellent blog post by @JohnLiu : Do Group By in Microsoft Flow with two simple elegant loops — John Liu .NET

    Hope it helps!

    Ferran

  • Pstork1 Profile Picture
    69,125 Most Valuable Professional on at

    The problem is that you are sending the emails inside the loop.  So each time you process a link it sends a new email.  To only send one email per user you need to gather up all the links for each user inside the loop and then send the emails after you exit the loop.  Here's the pattern you will need to follow.

    1) Sort the Get Items by user email

    2) Initialize a variable of type array called varLinks to hold the links

    3) Initialize a variable of type string called varEmail to hold the current user email. Set it to "First"

    4) Now start your loop on Get Items.  Inside the Loop do the following

        a) Check to see if varEmail is equal to the current user or "First"

        b) If it is then set varEmail to the email of the current item and append the link to varLinks array

        c) If it isn't then convert varLinks to an HTML table and send an email with the Table to varEmail.

            -After sending the email set varEmail to the current item email and set the varLinks array to the current Link

        d) After the Loop exits convert varLinks to an HTML table and send an email with the Table to varEmail one last time to get the last set of links

  • donewithcrayons Profile Picture
    8 on at

    I really appreciate the quick replies, is there any way you can break it down further?

    I think I understand what your telling me to do but at the same time I don't. I'm totally new to this and don't have a programming background. 

  • Verified answer
    Pstork1 Profile Picture
    69,125 Most Valuable Professional on at

    Here is the logic above in screenshots.

    1) Sort the Get Items by email address

    image.png

    2) Create a variable to hold the email address and an array to hold the links.  Another to hold the first name if you want to use that in the email

    image.png

    3) Loop through the items.  Add a condition to see if the current email is equal to either the first run or the previous email processed.

    image.png

    4) if it is the first loop or the email is equal to the last one processed the save the email and append the link.

    image.png

    5) If its a new email then create an HTML table from the links array and send the email.  Then save update the email with the new email and reset the array with the new link.

    image.png

    6) When you exit the loop process the last email 

    image.png

  • donewithcrayons Profile Picture
    8 on at

    That's amazing, thank you so much. Have to say I'm happy I asked I never would have gotten that on my own.

  • lcdelgado Profile Picture
    379 on at

    asaddffdf

  • lcdelgado Profile Picture
    379 on at

    Hello ! I still having the same problem; my MS Flow sent an email reminder 30 days before the event start date.

    here is my flow:

    lcdelgado_0-1678992317488.png

    I can't find the error.

     

  • Pstork1 Profile Picture
    69,125 Most Valuable Professional on at

    This post is almost two years old. Please post this as a new question.  You'll get more responses and others will be able to find the answer more easily later.

  • wdumerlus Profile Picture
    4 on at

    This is extremely helpful. I know this is a 2yr old post; however, is the "ControlLink" a column on your list? Or was that generated by respective actions on the flow?

  • Pstork1 Profile Picture
    69,125 Most Valuable Professional on at

    Its a column in the SharePoint list.  If you look at the original question they say, "I have a sharepoint list which contains an email address and a link which is unique...". That link is what I called ControlLink

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard