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

Get Email From Name Field in MS Forms

Hi, I am quite new to Power Automate and MS Forms so apologies if this is a newbie question (have searched through this forum but can't quite see a relevant answer). I have a basic Form that asks a few questions. One of those questions is " Colleague's Name" (this being the name of another colleague they are responding about). I would like to use Power Automate to get that Colleague's Name field, search O365 and retrieve the email address, then send an email to them. I've tried this so far:

 

When a new response is submitted

- <Form iD> "Alpha"

 

Get response details

- <Form iD> "Alpha"

- Response id "List of responses"

 

Search for users (V2)

- <Search term> "Colleague's Name"

 

Apply to each

- <Select output from previous steps> "value"

 

Get User Profile (V2)

- <User(UPN)> "Email"

 

Send Email (V2)

- <To>: "Mail"

 

Sorry for the lack of images but I can't seem to paste them there. Any help appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Get Email From Name Field in MS Forms

@Lexx  you can try this solution.

list.PNG

 

so first I get all the users that contains the names of my form profile, the to enshure that the user is the same as I want just add a condition an then I get the email 



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

5 REPLIES 5
Highlighted
Super User
Super User

Re: Get Email From Name Field in MS Forms

hi @Lexx  your example looks good, what us your error, it could be better if you share us an screanshot



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
New Member

Re: Get Email From Name Field in MS Forms

Thanks for the replies - still struggling to upload a screenshot. However here is a link to one:

https://www.dropbox.com/s/5brz9qcysn1hnlz/Power_Automate_Error.jpg?dl=0

 

Thanks All

Highlighted
New Member

Re: Get Email From Name Field in MS Forms

Just to add....I've noticed that the "Search For Users (V2)" is searching for FirstName LastName. In our directory the names are reversed (i.e. LastName, FirstName).

 

Presumably it won't like that? I'm wondering whether it is even worth using the "Search for Users (V2)" function in this instance. Similarly the "Get User Profile (V2)" also wants a UPN which probably isn't being passed from the search function.

 

The objective here is to find a users email address, based on their name only - happy to have your thoughts on this.

Thanks for your help all,

 

 

Highlighted
Super User
Super User

Re: Get Email From Name Field in MS Forms

@Lexx  you can try this solution.

list.PNG

 

so first I get all the users that contains the names of my form profile, the to enshure that the user is the same as I want just add a condition an then I get the email 



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Highlighted
New Member

Re: Get Email From Name Field in MS Forms

@ChristianAbata Full respect to you sir! Your suggestion works a treat, really appreciate it! 

I only had to change the "compose" to use the "Send an email (V2)" action. One thing I noticed though - the flow only works if I set the "Colleague's Name" field to the reverse i.e. Bloggs, Joe rather than Joe Bloggs.

 

Is there an easy way to have it take Joe Bloggs and switch it to: Bloggs, Joe  during the flow itself?

 

Thanks so much for your help!

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (6,487)