cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jvondermans1
Level: Powered On

sending email from 2 person columns in a sharepoint list

Hi All,

 

Building a flow I ran into a situation where I don't see a solution for, hopefully one of you does have the solution.

 

I have a simple list with a few columns, 2 of them are Person or Group Columns.

 

When an action is performed on one of the items (new of change) a flow is triggered to send an email tot the people in PeopleColumn1. Automatically flow inserts an loop that the mail is send to each of the persons in PeopleColumn1.

So far no problems, works great!

 

However, the body of the email should contain all the people from PeopleColumn2 as an announcement. As soon as I drop the Displayname of PeopleColumn2 in the body I get a nested loop for al those persons in the column.

The flow works, but everybody in PeopleColumn1 gets the number of emails that equal the number ofpeople in PeopleColumn2. Each email contains all text, but 1 of the persons from PeopleColumn2.

 

Is there any way I can just display these persons in the body, without getting an extra loop?

 

Thanks for all your time

Jordy

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: sending email from 2 person columns in a sharepoint list

Rather than looping through every entry in PeopleColumn2, you can output the names to an HTML table and insert the table in your email.

 

You'll want to remember to go to the send email advanced options and set "Is HTML" to yes.

 

The screen shots below show this concept.  Please post here is this does/does not work for you.

 

Scott

 

HTMLTable1.pngHTMLTable2.pngHTMLTable3.png

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

5 REPLIES 5
Super User
Super User

Re: sending email from 2 person columns in a sharepoint list

Jordy:

Please post a screenshot of your Flow.  That will make it a lot easier to suggest a fix or create an alternate solution.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
jvondermans1
Level: Powered On

Re: sending email from 2 person columns in a sharepoint list

Hi Scott,

 

I can imagine a screenshot will make it a lot easier, herby a part of the flow (the start is an executing time and getting the items of the list).

 

I would love to give you more info if you need it.

 

Jordy

Super User
Super User

Re: sending email from 2 person columns in a sharepoint list

Rather than looping through every entry in PeopleColumn2, you can output the names to an HTML table and insert the table in your email.

 

You'll want to remember to go to the send email advanced options and set "Is HTML" to yes.

 

The screen shots below show this concept.  Please post here is this does/does not work for you.

 

Scott

 

HTMLTable1.pngHTMLTable2.pngHTMLTable3.png

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Community Support Team
Community Support Team

Re: sending email from 2 person columns in a sharepoint list

Hi @jvondermans1,

 

Could you please share more details about your SharePoint list?

 

I agree with @ScottShearer's thought almost, you could consider take a try to create a HTML table to store these DisplayName of person within PeopleColumn2 column. I have made a test on my side and please take a try with the following workaround:

  • Add a "When an item is created" trigger.
  • Add a "Create HTML table" action, From set to PeopleColumn2 dynamic content of the trigger. Include headers set to Yes, Columns set to Custom. Within Header-Value map entry, type one entry. The key set to DisplayName and the corresponding value set to PeopleColumn2 Email dynamic content.
  • Add a "Apply to each" action, input parameter set to PeopleColumn1 dynamic content.
  • Within "Apply to each" action, add a "Send an email" action, To field set to PeopleColumn1 Email dynamic content of the trigger (Click "See more" button to see the Dynamic contents). Body field set to output of "Create HTML table" action and Is HTML field set to Yes.

Note: The PeopleColumn1 column and PeopleColumn2 column are both Person or Group type column with multiple selections in my SharePoint list.

 

Image reference:16.JPGThe flow works successfully as below:17.JPG

 

18.JPG

Best regards,

Kris

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jvondermans1
Level: Powered On

Re: sending email from 2 person columns in a sharepoint list

Hi Scott and Kris,

 

Thanks for your time helping me on this issue. I hadn't seen the "export to HTML-table" option at all. This was actually quite easy to use, so it works like a charm now!

 

Regards,

Jordy

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (2,488)