cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KenRyan
Frequent Visitor

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 Resolver I
Resolver I

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

View solution in original post

4 REPLIES 4
PoohBear Resolver I
Resolver I

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
Frequent Visitor

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 Resolver I
Resolver I

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

View solution in original post

KenRyan
Frequent Visitor

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

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

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!

sixthImage

Community Summit North America

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

Top Solution Authors
Users online (6,222)