cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
laurentechweb
New Member

Send email based upon form response - 75 options

I am trying to create a flow that will send an email based on a specific selection on a MS form. 

 

Example: On the form someone selects Campus A - I want the flow to email the Campus A principal.

 

I know how to do this with conditions but I have 75 campuses. Is there a way to attach a reference list or excel sheet so when someone selects Campus A the flow looks at an excel sheet that has Campus A - and the principals email address? 

 

Also, this question is a multiselect. So the person filling out the form can pick up to 25 campuses. 

 

Thank you! 

1 REPLY 1
grantjenkins
Super User
Super User

Hopefully this is what you're after.

 

Below is the Microsoft Form with multiple choice for selecting the Campus(s).

grantjenkins_1-1670548521337.png

 

Below is a SharePoint List that contains the Campus Name (Title) and the Principal's email address (Email). Note that the Campus (Title) would need to match what you have on your Microsoft Form.

grantjenkins_0-1670548477327.png

 

See full flow below. I'll go into each of the actions.

grantjenkins_2-1670549493772.png

 

Firstly, we get the Microsoft Form responses.

grantjenkins_3-1670549527349.png

 

Get items returns all the items from the SharePoint list.

grantjenkins_4-1670549573464.png

 

Filter array then filters out items so only ones where the Campus (Title) is contained within our array of Campus names from the Microsoft Form. Note that Select Campus is the Choice question on our Microsoft Form.

grantjenkins_5-1670549640532.png

 

Select then extracts out the Email addresses from our SharePoint list into a simple array. Note that for Map, I'm using Text mode (see arrow on screenshot below). The expression used to get the Email is below. Note that Email is the name of our Email column in SharePoint.

item()?['Email']

grantjenkins_6-1670549914685.png

 

Lastly, we use Apply to each to iterate over each of the Email addresses, and use Send an email using the Current item (which is our email address) to send an email to the principals.

grantjenkins_7-1670549986319.png

 


----------------------------------------------------------------------
If I've answered your question, please mark the post as Solved.
If you like my response, please consider giving it a Thumbs Up.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,589)