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

Send Emails to a List of Persons from a Field in a Sharepoint List

I was working on the powerapps and I’m kind of facing a blocker,

Well  I'm able to loop on a list of User Objects from a SharePoint List Field "Approvers" but Not able to get their Email addresses as strings ,
In the Community they say it can't be done but all posts are out-dated,
 
My Call that triggers the Flow lof Approval ooks like this:
 
ForAll(EGBLBrif.List_x0020_Of_x0020_Approvers,Sendapprovalemailandfollowupviaemail.Run(Email Email))
- Logically this one should work, But it doesn’t get the Email as a string and I’m not sure how to parse it:
 
- This one works fine but dosn't do the trick
ForAll(EGBLBrif.List_x0020_Of_x0020_Approvers,Sendapprovalemailandfollowupviaemail.Run(User().Email,User().Email))
- Also this one works just fine and it loops on the List but then triggers the flow only to the email string string added
ForAll(EGBLBrif.List_x0020_Of_x0020_Approvers,Sendapprovalemailandfollowupviaemail.Run("thaer.saidi@email.com","thaer.saidi@email.com"))
 
So Basically my question :
Howe can I parse the Person List from in the Approvers Field in the Sharepoint List to get the Email address 
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Send Emails to a List of Persons from a Field in a Sharepoint List

Hi @rebel,

Could you please share a bit more about the Approvers field cwithin your SP list? Is it a Person type column?

Do you want to send one email for each one of the list of Approvers?

Further, could you please share a bit more about the Sendapprovalemailandfollowupviaemail.Run() function that you mentioned?

I suppose that the Approvers field is a Person type column (which does not enable multiple options) within your SP list, and the EGBLBrif represents the SP list on your side is it true?

If you want to execute/fire your flow for each one within the list of User Objects (Persons), I have made a test on my side, please take a try with the following workaround:

App configuration:4.JPG

Set the OnSelect property of the "Send Email" button to following formula:

ForAll('20181011_case7'.List_x0020_Of_x0020_Approvers,'20181011_case7_1'.Run(List_x0020_Of_x0020_Approvers.Email))

Flow configuration:5.JPG

The flow works successfully as below:6.JPG

Note: The List Of Approvers column is a Person type column in my SP list, which does not enable multiple options.

On your side, you should take a try with the following formula:

 

ForAll(
EGBLBrif.List_x0020_Of_x0020_Approvers,
Sendapprovalemailandfollowupviaemail.Run(List_x0020_Of_x0020_Approvers.Email, List_x0020_Of_x0020_Approvers.Email)
)

In addition, if you want to send one email to multiple users, I think it is not necessary to use ForAll function to send one email for each user (fire/execute flow for each user).

You could consider take a try to concatenate all email addresses into a single one string using Concat function, and then pass the concatenated string from your app to your flow. I have made a test on my side, please take a try with the following workaround:7.JPG

In order to concatenate all email addresses into single one string, please take a try with the following formula:

Concat(EGBLBrif.List_x0020_Of_x0020_Approvers,List_x0020_Of_x0020_Approvers.Email&";")

More details about the Concat function in PowerApps, please check the following article:

Concat

 

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.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Send Emails to a List of Persons from a Field in a Sharepoint List

Hi @rebel,

Could you please share a bit more about the Approvers field cwithin your SP list? Is it a Person type column?

Do you want to send one email for each one of the list of Approvers?

Further, could you please share a bit more about the Sendapprovalemailandfollowupviaemail.Run() function that you mentioned?

I suppose that the Approvers field is a Person type column (which does not enable multiple options) within your SP list, and the EGBLBrif represents the SP list on your side is it true?

If you want to execute/fire your flow for each one within the list of User Objects (Persons), I have made a test on my side, please take a try with the following workaround:

App configuration:4.JPG

Set the OnSelect property of the "Send Email" button to following formula:

ForAll('20181011_case7'.List_x0020_Of_x0020_Approvers,'20181011_case7_1'.Run(List_x0020_Of_x0020_Approvers.Email))

Flow configuration:5.JPG

The flow works successfully as below:6.JPG

Note: The List Of Approvers column is a Person type column in my SP list, which does not enable multiple options.

On your side, you should take a try with the following formula:

 

ForAll(
EGBLBrif.List_x0020_Of_x0020_Approvers,
Sendapprovalemailandfollowupviaemail.Run(List_x0020_Of_x0020_Approvers.Email, List_x0020_Of_x0020_Approvers.Email)
)

In addition, if you want to send one email to multiple users, I think it is not necessary to use ForAll function to send one email for each user (fire/execute flow for each user).

You could consider take a try to concatenate all email addresses into a single one string using Concat function, and then pass the concatenated string from your app to your flow. I have made a test on my side, please take a try with the following workaround:7.JPG

In order to concatenate all email addresses into single one string, please take a try with the following formula:

Concat(EGBLBrif.List_x0020_Of_x0020_Approvers,List_x0020_Of_x0020_Approvers.Email&";")

More details about the Concat function in PowerApps, please check the following article:

Concat

 

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.
rebel
Level: Powered On

Re: Send Emails to a List of Persons from a Field in a Sharepoint List

Great works perfectly!!

However since it wasn't giving me too much flexibility when it comes to our users, I went with a Sharepoint List for the Approvers to add some tags and types but concatenating them in CC after is perfect !

Thanks a lot for your help Smiley Happy

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 55 members 4,334 guests
Please welcome our newest community members: