Forum Discussion
Generating Emails Based On Form Responses
We have been using an MS Form in MS Teams to track when people come and go into the office. One of the requirements is to email each person's supervisor when they fill out the form.
I have set up a 'flow' using MS Power Automate to send a formatted email, but it goes to me only.
One of the questions I have in the form is a drop down selection for the supervisor.
I'd like to have the system automatically email the supervisor, rather than me. So far, there are two ways that I can see to do this;
- Have a second drop down menu to select the supervisor's email
- A huge batch of IF/THEN statements in the Power Automate.
I am thinking that there should be a way to select one item on a drop down list, that automatically selects another item on another list -- maybe a hidden list... so it automatically selects the correct email address based on the supervisor selected?
Otherwise, I'm going to have to try to figure out a better way to generate the email address in Power Automate?
Thanks in advance.
Greg
- boneyfrancisIron Contributor
Hi gregnoseworthy,
You have already set up Power Automate to pull responses from the Form and send a formatted email. Before the "Send an email" connector, add "Get Manager" connector- the input of this connector would be the Form responder's email address. In the next "Send an email" connector, the To/Cc field can be populated from the dynamic output (Mail) from the previous "Get Manager" connector.
- gregnoseworthyCopper ContributorAhh... Okay, so I did set that up, but the "Get Manager" connector returns nothing. I have a feeling that our IT department hasn't set that up. My guess is that because I work at a university and the majority of people using this system is grad students... and 'supervisors' can change alot and often.
I think I'm going to try something like adding the email address to the supervisor name, so that it says something 'Jane Doe <doej@university.ca>' and then try to parse out the email address using some of the text functions... I'll post here if I get it working.
Thanks.- boneyfrancisIron ContributorOr.. maintain a separate excel sheet that has user to Manager mapping, and have Power Automate connect to this Excel to pull the corresponding Manager email address.
Just laying out options, what you choose to do ultimately depends on your business case.
- RobElliottSilver Contributor
gregnoseworthy you can use the Office 365 Users Get manager (v2) action to get the user's manager - using Responder's email as the input - and then send them an email.
Rob
Los Gallardos
Microsoft Power Automate Community Super User- gregnoseworthyCopper ContributorHmm... not sure where to find Get manager... is this part of MS Forms or Flow?
Thanks.