cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Check if Email is related to person

Hello,

 

I have a flow that creates a element in a sharepoint list everytime a email comes in. The sender of this email should be stored in a "person/group" column. No problem until here.

 

But there also are email with a sender that has no outlook profile or comes from a external sender. In this situation the flow fails, because the person can not be found. In this case I want to store the email in another column (text).

 

How can I check if the email is related to a person / outlook profile?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper III
Helper III

Re: Check if Email is related to person

Hi,

 

thanks for your help. The solution abm does not work for me, because the the step "Get User Profile" is successfull in both cases. 

I have put a condition after the "Get User Profile" and Check if the account is activated.

 

This works for me. Thank you!

View solution in original post

6 REPLIES 6
Highlighted
Super User
Super User

Re: Check if Email is related to person

hi @chhe  you can add a contidition to see if the email not contains your domain org, so for every domain like hotmail, or gmail or external in general mails.

cont.PNG



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
Super User
Super User

Re: Check if Email is related to person

Hi @chhe 

 

You can utilise the flow exception handling to do this. Please follow this

 

image.png

 

 

Set the configure run after as follows: (Click on three dot on action step. Click configure run after, set the following)

 

image.png

 

Finally you can use the variable IsUserProfileFound to decide whether profile found or not.

 

Please see my blog post related to exception handling in flow. Really useful feature especially in these situations for business continuity.

https://www.powerautomatetraining.co.uk/post/power-automate-how-to-find-a-folder-exists-dynamic-in-s...

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Helper III
Helper III

Re: Check if Email is related to person

Hi,

 

thanks for your help. The solution abm does not work for me, because the the step "Get User Profile" is successfull in both cases. 

I have put a condition after the "Get User Profile" and Check if the account is activated.

 

This works for me. Thank you!

View solution in original post

Highlighted
Super User
Super User

Re: Check if Email is related to person

Hi @chhe 

 

Thanks for the response.

 

You mentioned that email with a sender that has no outlook profile or comes from a external sender, based on that I assumed that no profile is found.  I wondered how it gets successful? 

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Helper III
Helper III

Re: Check if Email is related to person

I don't know why it gets successfull. I have tested it now with a with a group email from my organisation. With this email the get profile works. I haven't tested it with an external email yet, but for this I think I will add a step after "get profile" that runs if the "get profile" fails.

Highlighted
Super User
Super User

Re: Check if Email is related to person

Hi @chhe 

 

Try to test with the external email and see if that works. You have two possible solutions here.

 

1. Follow the steps which I mentioned earlier if you have more than one domain address.

2. If your organisation has one or limited (all known) domain email address you can check the address contains the domain name (xxxx@abc.com). So here abc.com is the domain name.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new 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 (7,196)