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

Flow sending multiple emails

Hello everyone,

 

I have the below Flow configured to send emails out based on two SharePoint 'People' columns. Both People columns are multi choice and contained in a SharePoint list.

 

I've been informed that the Flow is sending multiple emails to recipients instead of a single email to all recipients. Could you please advise what I have missed in order to make this send a single email when multiple recipents are submitted, is it due to the 'apply to each' function?

 

flow.jpg

5 REPLIES 5
Community Support Team
Community Support Team

Re: Flow sending multiple emails

Hi @Lauren_ ,

 

Do you want to send an email to all recipients in a single email at a time?

 

I would suggest use variables in the flow to achieve your goal. Please check if the following flow will be a reference for you.

 

After the trigger When an item is created, initialize an Array variable, and name it to whatever you want.

 

Add an Apply to each, select output from the multiple selections enabled person or group column. Here I am using a column named as “MulPerson”.

 

Within the apply to each, add action Append to array variable, select dynamic content MulPerson Email for Value field.

 

Under Apply to each, add Compose action with the following code:

join(variables('MultipleSelections'),';')

 

Then action Send an email, select Compose output for the To field.

 

An image for your reference:

1.PNG

 

Best regards,

Mabel          

 

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

Re: Flow sending multiple emails

Thank you Mabel, I am currently on annual leave but will try this as soon as I return to the office and see if it works!

Lauren_
Level: Powered On

Re: Flow sending multiple emails

Hi Mabel, I've tried your solution, one slight pickle that I forgot to mention is that the multiple selections may also be in two different columns, Person column A and Person column B. Both are multiple selection. I want to send emails to either just Person A, or Person A and Person B via a condition at the end of the Flow.

 

Your solution has worked when I select one column in the Initialize Variable action, but when I try both columns it combines the emails without a semicolon between the values and fails. Please see the attached image.

failure.jpg

 

Community Support Team
Community Support Team

Re: Flow sending multiple emails

Hi @Lauren_ ,

 

What’s the function used in the Compose action?

 

If you have two multiple selections enabled person or group columns, please use concat function to combine the email address with a semicolon.

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#c...

 

Best regards,

Mabel

 

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

Re: Flow sending multiple emails

This worked perfectly for me.  Thank you so much!

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,949)