cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Split text value containing delimiter separated emails addresses and send email to those addresses.

I have concatenated the emails of different users separated by semicolon in PowerApps and I am using this value in Flow to send email to all these users. How can I get each email address and send email to each user inside the flow.

1 ACCEPTED SOLUTION

Accepted Solutions
annajhaveri
Super User
Super User

@Anonymous , Use Initialize Variable action, give name of variable, set the variable type to Array, use following expression to split the emails, replace variables('Emails') with the dynamic content expressions on which your emails with semicolons are stored.

split(variables('Emails'),';')

annajhaveri_0-1611665617120.png

 

Then loop through the Array variable to send email separately to each email address.

 

If you want to send one email to all email addresses then you dont need to split semicolon separated emails, you can directly use it in To property of Send Email action using Dynamic Content.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
annajhaveri
Super User
Super User

@Anonymous , Use Initialize Variable action, give name of variable, set the variable type to Array, use following expression to split the emails, replace variables('Emails') with the dynamic content expressions on which your emails with semicolons are stored.

split(variables('Emails'),';')

annajhaveri_0-1611665617120.png

 

Then loop through the Array variable to send email separately to each email address.

 

If you want to send one email to all email addresses then you dont need to split semicolon separated emails, you can directly use it in To property of Send Email action using Dynamic Content.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

Anonymous
Not applicable

Hi @annajhaveri 
I have followed your suggestion but I do not see the array variable in send email action. Can you please help me correcting if I am doing something wrong.

Screenshot_1.png

@Anonymous , Please add apply to each action after the Initialize Variable action to loop through emails array variable values, and inside apply to each action, add the Send Email action, as shown in below screenshot:

 

annajhaveri_0-1611733560759.png

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,474)