cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Combine SharePoint List Items to One Email

I am trying to create a Flow that will take all items in a SharePoint list and then create one single email that contains those items. I would like the email to be in a text format, so creating an HTML table is not an option. My current flow works, but sends each list item as an individual email instead of combining them into one email.

 

Any help is appreciated.

8.12.19.PNG

 

 

8.12.19 - 2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver III
Resolver III

Re: Combine SharePoint List Items to One Email

Hi @mblotz,

You can achieve this by creating a variable at the start of your flow, running an "Apply to each" on the items in your sharepoint list which combines them by updating your variable and then use that variable in the content of your email as below:

Firstly we set our trigger, get the items from the list we need and initialise (set up) our variable:

CombineListStart.png

Next we have an Apply to each using the values from our "Get items" which will go through each item in our list. We use the compose task to join together the current item we want to add to the list and anything stored in the variable. We then set our variable to the output of the compose function so it is saved as we loop through each item.:

CombineListLoop.png

Then outside of the apply to each loop we use the variable in a message:

CombineListMessage.png

Which then gives us the result we need:

CombineListResult.png

 

Hopefully this helps!

 

View solution in original post

4 REPLIES 4
Highlighted
Resolver III
Resolver III

Re: Combine SharePoint List Items to One Email

Hi @mblotz,

You can achieve this by creating a variable at the start of your flow, running an "Apply to each" on the items in your sharepoint list which combines them by updating your variable and then use that variable in the content of your email as below:

Firstly we set our trigger, get the items from the list we need and initialise (set up) our variable:

CombineListStart.png

Next we have an Apply to each using the values from our "Get items" which will go through each item in our list. We use the compose task to join together the current item we want to add to the list and anything stored in the variable. We then set our variable to the output of the compose function so it is saved as we loop through each item.:

CombineListLoop.png

Then outside of the apply to each loop we use the variable in a message:

CombineListMessage.png

Which then gives us the result we need:

CombineListResult.png

 

Hopefully this helps!

 

View solution in original post

Highlighted
Helper I
Helper I

Re: Combine SharePoint List Items to One Email

Hi @jwhite ,

Thank you for the great explanation and wonderful screenshots - It worked! I appreciate your time and expertise.

 

Do you have any tips on how I can go about formatting the final email? All of the required content is included, but there are no line breaks. 

 

Thanks Again!

Highlighted
New Member

Re: Combine SharePoint List Items to One Email

If you insert a "<p>" between "ListToEmail" and "Test1" it will create a line break

Highlighted
Anonymous
Not applicable

Re: Combine SharePoint List Items to One Email

@mblotz This works perfect! I have an question. How can i get a line break in the compose / variable?

I have al my titles in one line so it's really hard to read now. 

 

 

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (7,638)