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

Build an email address string from SharePoint list

Greetings,

 

I have an Approvers SharePoint list with a Person column named Employee.  I'd like to assign an approval to one of more Employees and am stuck.  Here's what I have...

 

 Flow01.PNG

 

When I join the output of the Select step, I get concatenated JSON.  I want to concatenate just the email addresses.  Please advise....

1 ACCEPTED SOLUTION

Accepted Solutions
PoohBear
Level 8

Re: Build an email address string from SharePoint list

The issue I believe is my "Title" field was a text field with the email address in it. I have a PowerApp where people sign up for alerts and I use the email address from the person field and store it as text in the Title field. You can my solution below by putting the email addresses from the "person" field in the Title field. That may or may not work for you. However, I believe this link to a solution John Liu developed is more in line with what you are trying to accomplish doing it the way you currently are. 

 

http://johnliu.net/blog/2018/6/do-group-by-in-flow-with-two-simple-elegant-loops

4 REPLIES 4
PoohBear
Level 8

Re: Build an email address string from SharePoint list

I am sure there are multiple ways to do this. Below is what I did. Please note the "Send Email" in the last step is outside the "For Each". The "Compose 3 and Set Variable 4 are in it. Also, in the "Concat" expression in Compose 3 the "Title" field is the field in my list where the email addresses are stored. Try this and let us know if you run into any issues.

EmailFlow.png

 

KenRyan
Level: Powered On

Re: Build an email address string from SharePoint list

Following your example, my expression for Compose 3 is...

 

concat(item()?['Employee'],';',variables('EmailArray'))
 
This results in a concatenation of JSON of the SPListExpandedUser objects because column Employee is defined as SharePoint type Person...
 
How do I set it to the Employee.Email field?  This compiles but gives me an empty list...
 
concat(item()?['Employee.Email'],';',variables('EmailArray'))
 
Thanks
PoohBear
Level 8

Re: Build an email address string from SharePoint list

The issue I believe is my "Title" field was a text field with the email address in it. I have a PowerApp where people sign up for alerts and I use the email address from the person field and store it as text in the Title field. You can my solution below by putting the email addresses from the "person" field in the Title field. That may or may not work for you. However, I believe this link to a solution John Liu developed is more in line with what you are trying to accomplish doing it the way you currently are. 

 

http://johnliu.net/blog/2018/6/do-group-by-in-flow-with-two-simple-elegant-loops

KenRyan
Level: Powered On

Re: Build an email address string from SharePoint list

Thank you for that link, this is what I was looking for...

 

concat(item()?['Employee']?['Email'],';',variables('EmailArray'))

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 294 members 3,967 guests
Please welcome our newest community members: