Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Compare microsoft form multiple choice answers to a sharepoint list and send an email.

(0) ShareShare
ReportReport
Posted on by 5

I am trying to make a flow that sends an email to multiple users selected in a form, but that makes a comparison with a SharePoint list so that visually you do not see the full email and only the name of the selected user or users.

This is my Form in which there is a multiple-choice question so that I can select either one or several "users" to send the email to.

ErikMelendrez_0-1691438678443.png

 

Here is the SharePoint list in which I want to make the comparison and "convert" to email so that in the flow only send the email to the selected options.

ErikMelendrez_1-1691438708923.png

I don't know if I should use Expressions or Dynamic content, if I have to use variables, an array, I have tried everything, but I get errors in every test I have done.



Categories:
  • creativeopinion Profile Picture
    10,396 Super User 2025 Season 1 on at
    Re: Compare microsoft form multiple choice answers to a sharepoint list and send an email.

    The multi-person column needs you to provide the email addresses in an array with a key. You will need to take the values from your form and use a Select action with a key of Claims.

    creativeopinion_0-1691617010398.png

     

  • ErikMelendrez Profile Picture
    5 on at
    Re: Compare microsoft form multiple choice answers to a sharepoint list and send an email.

    Thanks for the answer @creativeopinion it help me a lot, but, now I have another question.
    What if in the column of Email, instead of be string and put the email manually, it's a type of column of Person, and I put multiple users in that column.

    ErikMelendrez_1-1691606246599.png

     

  • Verified answer
    creativeopinion Profile Picture
    10,396 Super User 2025 Season 1 on at
    Re: Compare microsoft form multiple choice answers to a sharepoint list and send an email.

    You need to use a Get Items action in your flow. Based on the results from your Form, you can filter out the values returned from the Get Items action.

     

    Since you have multiple values you are comparing to, you can't use the Filter Query in the Get Items action. Instead, you'll need to use the Filter Array action. 

     

    Compose String of Users

    Add a Compose action with an expression. You'll need to use the json() function. Insert the outputs from the form that contain the user selection.

    json([insert users selection dynamic content here])

     

    The output of that Compose action will be an array of selected users. You'll need to use add a Join action to convert the array to to a string separated by a coma (or any separator).  In the From field, insert the outputs from the Compose action above. In the Join with field, input your separator and a space.

     

    creativeopinion_1-1691446256377.png

    Run a test. Check to see the outputs before moving onto your next step. 

     

    Get Your SP List of Users

    Add a Get Items action to retrieve the list of users. As mentioned above, you can't use the Filter Query because you are checking against multiple values.

     

    Instead, use a Filter Array action. In the From field, insert the value dynamic content from the Get Items action.

     

    In the first value, insert the outputs from the Join - Selected Users action. Change the condition to contains, and in the second value field insert the Title dynamic content from the Get Items action. 

     

    This action will essentially check your string of users against each Title in your SharePoint list.

     

    creativeopinion_3-1691446529831.png

     

    creativeopinion_6-1691446983464.png

     

    Run a test. If done correctly, your Filter Array action should have some outputs. 

     

    Compose Email Addresses & Email

    The Filter Array action will return an array of values from your SharePoint list. You need to extract the email addresses and compose them into a string of email addresses separated by a semi-colon. 

     

    Add a Select action. In the From field, insert the Body output from the Filter Array action. In the Map, click on the icon to the right to change to text mode.

     

    You'll need an expression. You can reference the outputs from the Filter Array action to see where the 'Profile' and 'Email' in the expression came from.

    item()?['Profile']['Email']

     

    Add a Join action to convert your array of email addresses into a string separated by a semi-colon. Important: If you need to send a separate email address to each user, then you can omit the Join function and instead use an Apply to Each action to loop through each email address and run a Send an Email (V2) action in the apply to each loop. 

    creativeopinion_5-1691446800450.png

     

    Hope this helps!

     

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Watch my tutorials on YouTube
    👉 Tips and Tricks on TikTok

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,011 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow