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!
Hopefully this is what you're after.
Below is the Microsoft Form with multiple choice for selecting the Campus(s).
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.
See full flow below. I'll go into each of the actions.
Firstly, we get the Microsoft Form responses.
Get items returns all the items from the SharePoint list.
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.
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']
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.
User | Count |
---|---|
88 | |
37 | |
26 | |
13 | |
13 |
User | Count |
---|---|
127 | |
54 | |
37 | |
24 | |
21 |