cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RSygroves
Helper I
Helper I

Finding an e-mail adresse based on the name

Hello,

I'm working on a flow in order to send an e-mail notification to contacts if their name is selected in a Form (Choice options question)

No problem with the Forms connectors and triggers.

 

For the moment, the process I'm using is :

 

1st Condition : the specified field in the Form contains the name "A"

       Yes => send an e-mail to "A's e-mail address"

       No =>go to 2nd Condition : the specified field in the Form contains the name "B"

                               Yes => send an e-mail to "B's e-mail address"

                               No => 3rd Condition ... 

And so on.

It works fine, but the problem is that I have more than a dozen Names / E-mails to program, it's going to take a while...

 

Is there an easier way to proceed ?

 

Thanks

R Sygroves

(please forgive my english, I'm French)

                                     

                                      

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @RSygroves ,

 

Could you please share more details about your scenario? What kind of Form are you using, the MS Forms or SharePoint list customize form? If it is the SP customize form, I think the persons are in a People type column? If so, you can easily get the respective email address to the selected user in the column, no matter in PowerApps or Flow.

 

So, for a people column, you can find the email address in dynamic contents:

vjefferni_0-1653014803745.png

If it is a Choice column (strongly doubt about that though), you can use Office 365 User connector and utilize the below action and get the users as well as their emails:

vjefferni_1-1653014809802.png

 

Hope this helps.

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

13 REPLIES 13
vivekpande18
Impactful Individual
Impactful Individual

Hi @RSygroves , 

 

From which form you are taking the details?

 

You don't have to put conditions, can't you access that field and check whose name is present. 

 

Can you tell us more about it. 

 

Thanks

Vivek Pande

RSygroves
Helper I
Helper I

Hi @vivekpande18 

 

I'll try to sum it up :

 

I created a Form I integrated in our sharepoint intranet,  so that employees in our company can fill it to advise executives about a new customer demand.

 

There are several services, and in each service several possible recipients.

When completing the choice question about "service A, B, C ..." the form leads to a new choice question, e.g. Service A : person 1, person 2, person 3 ...

So when collecting answers from the form in PA, I would to make the Person A name (for instance) match whit their e-mail address so that they automatically receive a notification e-mail containing useful informations about the demand.

 

So steps are :

- form completed

- new answer triggers flow

- answer details are collected, including recipient's name

- Name matches with the corresponding e-mail address (= my problem)

- e-mail is sent to user with corresponding details 

 

While using the structure described in my first message, it works fine and recipient receives the e-mail, but that means I should prgram every situation instead of letting the flow searching for the name / e-mail match itself...

 

Thanks a lot for your help.

 

   

  

 

 

vivekpande18
Impactful Individual
Impactful Individual

Hi @RSygroves , 

 

I think I am not enough qualified to understand your process. 

Sorry, but I am still confused. 

 Hope others understand you and reply with proper solution. 

 

Thanks

Vivek

RSygroves
Helper I
Helper I

Hi @vivekpande18 

thank you for your answer.

 

Maybe my explainations aren't clear enough.

I tried to make a visual description of my desired process :

Capture d’écran 2022-05-17 141654.png

Hi @RSygroves ,

 

Could you please share more details about your scenario? What kind of Form are you using, the MS Forms or SharePoint list customize form? If it is the SP customize form, I think the persons are in a People type column? If so, you can easily get the respective email address to the selected user in the column, no matter in PowerApps or Flow.

 

So, for a people column, you can find the email address in dynamic contents:

vjefferni_0-1653014803745.png

If it is a Choice column (strongly doubt about that though), you can use Office 365 User connector and utilize the below action and get the users as well as their emails:

vjefferni_1-1653014809802.png

 

Hope this helps.

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Hi thank you for your answer.

 

Actually I work with MS Forms, not an SP list.

 

I managed to find a solution, using conditions :

e.g. If the answer to one of the questions in the form contains person's 1 name, then an e-mail is sent to them.

If not, a new condition for person 2 and so on....

 

The problem is that it seems a muche more complicated process even if it actually works.

 

 

  

 

 

 

 

Hi @RSygroves ,

 

As I mentioned above, the Office 365 User connector will be helpful to get the email address based on user name. No need to use Conditions. You can set the search term with the name coming from form response, and use the output from this action.

 

Hope this helps.

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

RSygroves
Helper I
Helper I

Hello Jeffer.

I'm going to try this connector.

Thanks for your help.

Best regards

Hi Jeffer,

I changed my flow's configuration using this "search for users".

It works fine, but strangely it  sent e-mails to users whose name doesn't appear in the MS Form answer !

I missed the "Top : 1" setting, maybe it will help.

 

But I also wonder :  after the "search users" connector, I use "send e-mail from a shared mailbox" (see below). Is it normal to have the Apply to each option activated ?

 

  

RSygroves_0-1653050671344.png

 

RSygroves
Helper I
Helper I

@v-jefferni Problem apparently resolved.

I made some new tests, it seems now the process properly leads to the targetted recipient. Thanks a lot for your advice.

 

I noticed another issue : my e-mail contains an html link to a file on a sharepoint shared library.

When saving my flow, the link is OK, but when the message arrives only display texts remains (no more link)...

Any suggestion about that ?

 

 

 

Hi @RSygroves ,

 

The problem seems to be caused by Outlook settings on the receiving end.

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

hi @v-jefferni 

thank you for this new answer.

 

Not sure to understand correctly, is it a seeting I can correct or does it depend on the recipient mailbox settings ?

 

Best,

Hi @RSygroves ,

 

I'm not an expert of Outlook, but as I know, there could be some settings make the URL be plain text:

vjefferni_0-1653290104325.png

 

You may try and send the Email to a test account and check the result.

 

Hope this helps.

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,947)