SharePoint MS Flow - Send Email to People or Group field with Allow multiple selections and Allow selection of People and Groups

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/289501

Question

Could you please help me to send email to People or Group field using MS Flow with Allow multiple selections "Yes" and Allow selection of "People and Groups".

Was it helpful?

Solution

Please following steps:

1.Create the "Person or Group" Column

enter image description here

2.Create MS Flow

  • Add a Trigger "When an item is created" enter image description here

  • Add an Action "Get item" enter image description here

  • Add an Action "Data operations - Select" enter image description here

  • Add an Action "Initialize Variable". I named it as 'OriginalArrayAttendees'. Type as 'Array' and Value will be the Output from previous 'Select' action, we get only the Attendees Mail address in the array variable. enter image description here

  • Add an Action "Initialize Variable". I name it as 'AttendeesEmail'. Type as 'String' and Value as blank at this stage. enter image description here

  • Add 'Apply to each' where the output of variable 'OriginalArrayAttendees' is entered. enter image description here

  • Add an Action "Data operations - Compose" and in expression enter "concat(item()?['Attendees'],';')" enter image description here

  • Add an Action "Data operations - Compose" enter image description here

  • Add an Action "Set Variable" enter image description here

  • Add an Action "Send an email". In the "TO" field it will be the 'AttendeesEmail' variable. Rest of the body you can enter the way you want. enter image description here

3.Save and Test it.

More information, please refer to:

===================== Updated Answer =====================

Please following steps:

1.Add a Trigger "When an item is created or modified"

2.Add an Action "Get item"

3.Add an Action "Data Operation -- Select"

  • In 'Select' Action 'From' (input for select) will be the 'Attendees' Field.
  • Map Key 'Attendees' to Value 'Attendees Email' (as only email can be used to send a mail.)

enter image description here

4.Add "Initialize Variable". I named it as 'OriginalAttendees'. Type as 'Array' and Value will be the Output from previous 'Select' action.

enter image description here

5.Add a Control "Condition". The condition is "Attendees Email" equal "null"

enter image description here

6.If yes.

  • Add an Action "List group member" and select your group name.
  • Then, add an Action "Send an email (V2)"

enter image description here

7.If not.

  • Add 'Apply to each' where the output of variable 'OriginalAttendees' is entered.
  • Then, add 'Apply to each' where the output of variable '(Get item) Attendees' is entered.
  • Next, add "Append to array variable".

Name:OriginalAttendees Value: Attendees Email

  • Lastly, Add an Action "Send an email (V2) "

enter image description here

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top