Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Send one e-mail for multiple list items

(0) ShareShare
ReportReport
Posted on by 603

Hi all,

 

I've a question about how to create a flow that check all the items in a flow and send an e-mail to all the companies that are stored in the list.

 

For your information, I've a flow with multiple customers inside. For some customers, there are multiple line items, I need to merge the information into one e-mail. Every customer has an identical relation number, so that's a matching point in the list that can be used.

 

The list is created as follow:

 

2020-12-14 11_57_21-Window.png

 

Now I need to send every customer ONE (1) e-mail about the changes. Because it's possible that a customer have multiple line items, it's required that every customer get one e-mail with all the list items that's matched with his relation number.

 

Example e-mail:

 

Dear relation,

 

Whe will let you know that your pickup day(s) will be changed:

Your current pickup day for Contract A Monday will be changed to Saterday.

Your current pickup day for Contract B will be changed to Friday.

Etc.

 

How can I achieve this?

 

(The trigger is when I push a button).

 

Thanks in advance.

  • Alperen Profile Picture
    32 on at
    Re: Send one e-mail for multiple list items

    I am trying to build a similar flow. I get the same error as you. Anyone got a solution for it?

  • Alperen Profile Picture
    32 on at
    Re: Send one e-mail for multiple list items

    Hello @v-litu-msft. I tried to use your solution on my flow. On the apply to each 2 loop i get an error while i only got the get items in it. Maybe you have an solution for me? This is my error: 

    Alperen_0-1694608641284.png

     

  • dennisb88 Profile Picture
    603 on at
    Re: Send one e-mail for multiple list items

    Hi @v-litu-msft ,

     

    Thank you, that's helping a lot.

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: Send one e-mail for multiple list items

    Hi @dennisb88,

     

    You could following these steps to do that:

    First part, get all items in the list and store Email addresses into an array variable, then use union() function to remove repeat email addresses.

    union(outputs('Compose'),outputs('Compose'))

    Screenshot 2020-12-15 152605.jpg

     

    Screenshot 2020-12-15 152626.jpg

     

    Second part, initialize a string variable to store the Email body, Then use Apply to each action to loop the Email address in part 1, then use Get items with filter query:

    Contacte_x002d_mailAddress eq '@{item()}'

    Then append each line into the string variable, after all rows about current customer in it, send email and empty the string variable for next customer.

    Screenshot 2020-12-15 152649.jpg

     

    Screenshot 2020-12-15 152724.jpg

     

    Screenshot 2020-12-15 152739.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1