Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Send an email to various email addresses on multi answer form.

(0) ShareShare
ReportReport
Posted on by 8

I cannot seem to find a straight answer to the following. 

 

I have a form with a question:

 

"Who would you like to send these responses to? "

 

The options are (this is simplified, there are actually dozens of email options, so conditionals wont do):

Bob

Sally

Joe

(multiple answers are allowed)

 

These 3 people have the following emails:

bob@contoso.com

sally@contoso.com

joe@contoso.com

 

(The emails do not appear on the form, I want them hidden from the user)

 

I have compiled a json as follows, but do not understand how to take the choices the user picked, and put them into the TO field of an email. 

 

 

[
{"bob": "bob@contoso.com",
"sally": "sally@contoso.com",
"joe": "joe@contoso.com"
}

]

 

 

So if Bob, and Sally were chosen, then "Bob@contoso.com;sally@contoso.com" should be the appended string which will then go into the TO: field of an email.

 

Doing this in code is trivial, but I can't seem to figure this out with Power Automate. 

 

Thank you!

Jose

  • josedelara Profile Picture
    8 on at
    Re: Send an email to various email addresses on multi answer form.

    also, for me, the Get Response Details step auto creates an apply to each loop, so mine looks different than yours.

  • josedelara Profile Picture
    8 on at
    Re: Send an email to various email addresses on multi answer form.

    @v-mengmli-msft 
    IRT the replace string, That makes sense, ty.

    as for the emails, I have a list of users and distribution groups in a JSON file. The user selects from a multichoice question on the form, and there is conditional

    logic in the form based on certain answers that determines who gets an email of form responses. 

    Edit: Unfortunately, that flow did not work. The search users step returns nothing see below, and it's probably because the names in Azure don't quite match the response answers. 


    There must be an easier way to take the name and email value pairs from a json or from a csv and compare them to the multi-select value array. The split worked, though I am not sure how to expand it in the case that I add more names/emails to the question on the form.

     

    also I get this when I use a compose to gather the appended "Email" array:

    [
    "first(outputs('Search_for_users_(V2)')?['body/value'])?['Mail'] ",
    "first(outputs('Search_for_users_(V2)')?['body/value'])?['Mail'] ",
    "first(outputs('Search_for_users_(V2)')?['body/value'])?['Mail'] ",
    "first(outputs('Search_for_users_(V2)')?['body/value'])?['Mail'] "
    ]

     

     

    josedelara_0-1707252409995.png

     

    thank you so much for your help!

  • v-mengmli-msft Profile Picture
    on at
    Re: Send an email to various email addresses on multi answer form.

    Hi @josedelara ,

     

    I didn't ask clearly. I thought at first that the suffix of the emails was the same. How do you get the User's emails? 'Search for Users' action?

    If so, I recommend you move it in 'Apply to each' to get each user's email according to current item's value.

    Something just like this:

    vmengmlimsft_0-1707202571271.png

    first(outputs('Search_for_users_(V2)')?['body/value'])?['Mail'] 

     

    As for why this formula is used:

    split(replace(replace(replace(replace(QuestionDynamicContent,'[',''),']',''),',',';'),'"',''),';')

    It is because the output of the multi-select value is actually in this string format: ["Option1","Option2"].

    So, if we want to get the email of each option, we need to first convert the output into an array.

     vmengmlimsft_1-1707202875165.png

    This is why I don't modify the array you currently get, because all emails are in an item of an array, rather than each email being an item of the array. This cannot be used directly in Join action.

     

     

    Best regards,

    Rimmon

     

  • josedelara Profile Picture
    8 on at
    Re: Send an email to various email addresses on multi answer form.
    split(replace(replace(replace(replace(QuestionDynamicContent,'[',''),']',''),',',';'),'"',''),';')

     

    This string is very difficult to read, can you break down the syntax? Why so many nested parentheses? 

  • josedelara Profile Picture
    8 on at
    Re: Send an email to various email addresses on multi answer form.

    I should have clarified. The names do not match the email prefixes, so a simple join won't work. (that would be too easy :)) 

     

    So it would be more like

    Bob-  robertjones@contoso.com

    Sally - sallyrsmith@contoso.com

    Joe - josephwbrownjr@contoso.com

     

  • v-mengmli-msft Profile Picture
    on at
    Re: Send an email to various email addresses on multi answer form.

    Hi @josedelara ,

     

    I suggest you convert the result of this question into an array and then use a join action to convert the array into this format: Bob@contoso.com;Sally@contoso.com.

     

    Here is my test for your reference:

    split(replace(replace(replace(replace(QuestionDynamicContent,'[',''),']',''),',',';'),'"',''),';')
    concat(item(),'@contoso.com')

    vmengmlimsft_0-1707197830659.png

    The result of my test:

    vmengmlimsft_1-1707197899435.png

     

     

    Best regards,

    Rimmon

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1