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

Check if email is valid

https://powerusers.microsoft.com/t5/Building-Flows/Need-to-check-if-the-email-information-is-valid/m...

 

This answer looks to be the simplest least over the top solution.

 

I'm having a difficult time figuring out what they're doing to validate the email, if its simply just creating a flow operation to query the email address text field against the MS User results or what...

 

Would someone be willing to hold my hand? I need a little extra help...

 

tl;dr: I need to check if my user entered a valid email or not. My flow won't work without a valid email.

1 ACCEPTED SOLUTION

Accepted Solutions

If you would like to validate email of the person who submitted and the person is domain user, you can use Get user profile (V2)' action using the email as mentioned in the above thread.

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

6 REPLIES 6
PrasadAthalye
Super User
Super User

You can implement expression to validate email address and if its not valid terminate... Below is an example when I was validating email from forms output

 

contains(last(split(body('Get_response_details')?['r9f2ae5d6c71c4cdc88fcf52ebc7d86ed'],'@')),'.')

  

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Hey Prasad,

 

Is there a way to take this check further? I like being able to validate that the string they enter is a legitimate email format, but I want to be certain that the email they submit is a valid email from a list of validated emails.
The purpose of this is to keep the emails spelled correct. Also supposing somehow one of our office staff mis-type their email, I'd like to be certain that it gets to them anyway. (Or at least tells them they need to re-type their email.)

 

Previously I had experimented with (Get Response Details > Responder's Email) but that didn't work for two members of our staff. They both have legitimate Microsoft Office accounts.

I'll implement the code you supplied as well.

If you would like to validate email of the person who submitted and the person is domain user, you can use Get user profile (V2)' action using the email as mentioned in the above thread.

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

Prasad,

It might be something I haven't set up yet but I was having a difficulty with using the method you mentioned above. When I submit a response from my boss's account, my flow always works with the Get user profile (V2) method. However, when my supervisor submits a response, the flow redirects the email to my boss's account.

 

Any idea what I'm missing?

 

Thank you very much for your help, Prasad!

Sorry. Can you tell me what do you mean 'flow redirects the email to my boss's account.' ? Get User profile should read user profile of your boss using his email address since he submitted the form.. Do you see a different behavior?

 

Can you upload screen shot of the flow execution for the response that your boss tested and explain so that I can help?

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community


@PrasadAthalye wrote:

Sorry. Can you tell me what do you mean 'flow redirects the email to my boss's account.' ? Get User profile should read user profile of your boss using his email address since he submitted the form.. Do you see a different behavior?

 

Can you upload screen shot of the flow execution for the response that your boss tested and explain so that I can help?

 


When my supervisor is responding to the form with his account logged in my Get User Profile v2 method in my flow instead sends the email to my boss's account.

 

I'll see if I can duplicate the behavior and attach screenshots.

 

...Prasad, I come back to you feeling remorse. LOL!

 

I had confused the two methods I was using. I had NOT been using the "Get User Profile v2" method, I had been using the Responder's Email method from the Forms' dynamic content. This "Responder's Email" method was causing the email to go to my boss, not my supervisor! Woops!

 

I'll replace it for the Get User Profile v2 method, which seems more proper to me now that I'm aware of it.

 

If I have further difficulties I'll reach out to you again here.

 

Thank you very VERY much for your help, Prasad! I'd still be stuck in the mud without your help! You're amazing!!!

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,368)