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

Two e-mails instead of one - Shared Mailbox

Hi,

 

I have created a flow which is linked to PowerApps. Once the end-user fills in the request form in PowerApp, a new SharePoint list item is added. Once this item is assigned to someone in the team, the requestor gets an e-mail that their request has been assigned to the allocated person.

 

 

JanouH_0-1620812151722.png

 

This all worked well until the item got assigned to multiple people. Now the requestor receives two the same e-mails with different allocated persons. How can I ensure that both assigned people get added in one e-mail?

 

Thanks for your help in advance.

 

Cheers

1 ACCEPTED SOLUTION

Accepted Solutions
brricard
Microsoft
Microsoft

Hello,

You may need to use this solution:

https://powerusers.microsoft.com/t5/Building-Flows/How-to-convert-Array-variable-to-string-to-use-in...

---

Flow details:

 

I suppose you have a list in sharepoint where people can add items there and there is a column with type Person where you can define if you allow multiple entries or not;

 

brricard_0-1620817432684.png

 

The result would be something like this:

 

brricard_5-1620818485224.png

 

 

Demo/test

 

1) Initialize variable

 

Trigger: when an item is created or modified (you can verify if a specific column has changed to check if someone was assigned - but this is just a detail for your flow);

 

Initialize variable: created a string "emails" to hold all the e-mails in a specific column called "Person" with type "Person or Group"

 

brricard_1-1620817532311.png

 

2) Loop with "Apply to each" for every Person's email and append the result to the variable

 

Apply to each: used the below expression to check the column "Person" for details; it will loop for all the People added here.

 

triggerOutputs()?['body/Person']

 

Append to a string variable: used the below expression to add to my variable "emails" all the results from my loop - only the e-mail part; Then added ";" because outlook requires ";" between emails.

 

items('Apply_to_each')?['Email'];

 

brricard_2-1620817712958.png

 

3) Sent the e-mail using the variable "emails".

 

brricard_3-1620818031969.png

 

 

---

Flow overview:

 

brricard_4-1620818093970.png

-------

 

 

Thank you,

BR

 

 

View solution in original post

1 REPLY 1
brricard
Microsoft
Microsoft

Hello,

You may need to use this solution:

https://powerusers.microsoft.com/t5/Building-Flows/How-to-convert-Array-variable-to-string-to-use-in...

---

Flow details:

 

I suppose you have a list in sharepoint where people can add items there and there is a column with type Person where you can define if you allow multiple entries or not;

 

brricard_0-1620817432684.png

 

The result would be something like this:

 

brricard_5-1620818485224.png

 

 

Demo/test

 

1) Initialize variable

 

Trigger: when an item is created or modified (you can verify if a specific column has changed to check if someone was assigned - but this is just a detail for your flow);

 

Initialize variable: created a string "emails" to hold all the e-mails in a specific column called "Person" with type "Person or Group"

 

brricard_1-1620817532311.png

 

2) Loop with "Apply to each" for every Person's email and append the result to the variable

 

Apply to each: used the below expression to check the column "Person" for details; it will loop for all the People added here.

 

triggerOutputs()?['body/Person']

 

Append to a string variable: used the below expression to add to my variable "emails" all the results from my loop - only the e-mail part; Then added ";" because outlook requires ";" between emails.

 

items('Apply_to_each')?['Email'];

 

brricard_2-1620817712958.png

 

3) Sent the e-mail using the variable "emails".

 

brricard_3-1620818031969.png

 

 

---

Flow overview:

 

brricard_4-1620818093970.png

-------

 

 

Thank you,

BR

 

 

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Users online (2,354)