cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
_kikilalaaa
Helper V
Helper V

Send email to multiple users

Hi all. This is urgent i hope anyone can help.

I have one list to store list of approvers for different category. lets say for category A, there are 3 approvers, so 3 emails will be stored in "Approvers Email" column

Get email approvers.png

 

I have filter the flow to get the items based on category A. I did it like picture above.

 

Then, I need to send a "set and wait for approval" for all 3 emails.

When I search for the "Approvers Email" in "Get Approvers Email" in the dynamic content, I could not find it.it is not here guysit is not here guys

 

so what do i do? how can i retrieve the column?

please help!

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi! It is a multiperson column, meaning its output is an Array.

 

My suggestion is to Initialize a string variable, called 'targetEmailAdresses', type string, value empty.

THen, add an 'Apply to Each', assign this column as its input.

INside Apply to each, add an Append to array variable, name 'targetEmailAddresses', assign as its value the following expression:

 

 

concat(item()?['Email'],';')

 

 

Now, outside the Apply to each, all emails shall be stored in your new variable

 

There's a more elegant approach with an Array variable and join(), but string based approach is faster to implement

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Hi!

A multiperson column is an array of objects, each object representing a person with several attributes (Display name, etc.), one of the attributes is called 'Email'

 

Just copy and paste the exact expression. If flow execution result is not yet the expected one, please share a screenshot from current flow design

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

7 REPLIES 7
efialttes
Super User III
Super User III

Hi!

Which type  is "Approvers Email" column? Single line of text, multichoice, multiperson, lookup?

Sometimes Dynamic content menu is a bit buggy... Did you try to store "Approvers Email" output in a 'compose' action block and see if 'compose' output can now be selected from the 'Dynamic content' menu?

I think an additional problem can be that 'Get approvers email' returns an array, I mean, maybe an 'Apply to Each' is automatically added

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



hi @efialttes , it is person or group.

i hope image below can help

approvers email sp.png

 

Hi! It is a multiperson column, meaning its output is an Array.

 

My suggestion is to Initialize a string variable, called 'targetEmailAdresses', type string, value empty.

THen, add an 'Apply to Each', assign this column as its input.

INside Apply to each, add an Append to array variable, name 'targetEmailAddresses', assign as its value the following expression:

 

 

concat(item()?['Email'],';')

 

 

Now, outside the Apply to each, all emails shall be stored in your new variable

 

There's a more elegant approach with an Array variable and join(), but string based approach is faster to implement

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

hi

concat(item()?['Email'],';')

the 'Email' is the column name or the list name?

Hi!

A multiperson column is an array of objects, each object representing a person with several attributes (Display name, etc.), one of the attributes is called 'Email'

 

Just copy and paste the exact expression. If flow execution result is not yet the expected one, please share a screenshot from current flow design

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

It works! Thank you and Stay safe!

@_kikilalaaa if I initialize the variable as type string, I can't append to array variable of the same name. Please clarify. I can declare it as an array upfront, or can append to string variable instead. I tried both, but none of them work.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,325)