Generating Emails Based On Form Responses

%3CLINGO-SUB%20id%3D%22lingo-sub-2213734%22%20slang%3D%22en-US%22%3EGenerating%20Emails%20Based%20On%20Form%20Responses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2213734%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20have%20been%20using%20an%20MS%20Form%20in%20MS%20Teams%20to%20track%20when%20people%20come%20and%20go%20into%20the%20office.%26nbsp%3B%20One%20of%20the%20requirements%20is%20to%20email%20each%20person's%20supervisor%20when%20they%20fill%20out%20the%20form.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20set%20up%20a%20'flow'%20using%20MS%20Power%20Automate%20to%20send%20a%20formatted%20email%2C%20but%20it%20goes%20to%20me%20only.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOne%20of%20the%20questions%20I%20have%20in%20the%20form%20is%20a%20drop%20down%20selection%20for%20the%20supervisor.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'd%20like%20to%20have%20the%20system%20automatically%20email%20the%20supervisor%2C%20rather%20than%20me.%26nbsp%3B%20So%20far%2C%20there%20are%20two%20ways%20that%20I%20can%20see%20to%20do%20this%3B%3C%2FP%3E%3COL%3E%3CLI%3EHave%20a%20second%20drop%20down%20menu%20to%20select%20the%20supervisor's%20email%3C%2FLI%3E%3CLI%3EA%20huge%20batch%20of%20IF%2FTHEN%20statements%20in%20the%20Power%20Automate.%3C%2FLI%3E%3C%2FOL%3E%3CP%3EI%20am%20thinking%20that%20there%20should%20be%20a%20way%20to%20select%20one%20item%20on%20a%20drop%20down%20list%2C%20that%20automatically%20selects%20another%20item%20on%20another%20list%20--%20maybe%20a%20hidden%20list...%20so%20it%20automatically%20selects%20the%20correct%20email%20address%20based%20on%20the%20supervisor%20selected%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOtherwise%2C%20I'm%20going%20to%20have%20to%20try%20to%20figure%20out%20a%20better%20way%20to%20generate%20the%20email%20address%20in%20Power%20Automate%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGreg%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2213734%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EForms%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Forms%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPower%20Automate%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2214114%22%20slang%3D%22en-US%22%3ERe%3A%20Generating%20Emails%20Based%20On%20Form%20Responses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2214114%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F998864%22%20target%3D%22_blank%22%3E%40gregnoseworthy%3C%2FA%3E%26nbsp%3Byou%20can%20use%20the%20Office%20365%20Users%20%3CSTRONG%3EGet%20manager%20(v2)%3C%2FSTRONG%3E%20action%20to%20get%20the%20user's%20manager%20-%20using%20%3CEM%3EResponder's%20email%3C%2FEM%3E%20as%20the%20input%20-%20and%20then%20send%20them%20an%20email.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

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;

  1. Have a second drop down menu to select the supervisor's email
  2. 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

5 Replies

@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

Hmm... not sure where to find Get manager... is this part of MS Forms or Flow?

Thanks.

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.

Ahh... 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.
Or.. 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.