Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

How to group items by email address and send an email with all the items links

(0) ShareShare
ReportReport
Posted on by 3,502

I have a custom list named data, which contain Email Address field + another list named documents , where for each custom item there is a folder with the itemID.

 

now i wrote a manual workflow which should loop through all items >> get the related documents >> create a sharing link for the document and share it with the Email Address. then send a single email to each unique email address with the links to documents. here what i currently have:-

 

1) Initializing 2 variables; one to store the unique email addresses + one to store the email body which should contain all the links to documents

 

johnjohn123_0-1679854363880.png

2) then i am getting all the items

 

johnjohn123_1-1679854423779.png

 

3) then i am building the array of unique email addresses:-

 

johnjohn123_2-1679854485423.png

 

4) then i am looping through the email address array >> for each email i am getting the related items >> getting the related documents >> share the documents with the item's email address, as follow:-

 

johnjohn123_3-1679854585264.png

 

 

johnjohn123_4-1679854662719.png

 

johnjohn123_5-1679854699372.png

 

 

now everything is working well till this level. the email body contains the related links. but how  can send one email to each unique address? as when i define a send email outside the Apply_to_each i can not reference the email  addresses? any advice?

 

johnjohn123_6-1679854817412.png

 

 

here is an overall layout of the current flow:-

 

johnjohn123_0-1679855119944.png

 

  • lbendlin Profile Picture
    8,041 Super User 2025 Season 1 on at
    Re: How to group items by email address and send an email with all the items links

    You should be able to reference that from the outer loop ("Apply_to_each_4").

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