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

Validate email in Power Automate Desktop

We have a Desktop Automation that needs to verify that an email address was entered. 

 

What is the best approach to determine is a text field contains a valid email address?


Regex... or?

1 ACCEPTED SOLUTION

Accepted Solutions

Good suggestion!  However I ended up going with the Reg Ex. I found it a bit cleaner, but in essence checking for the row count of the Recognize Text could be used the same way.

 

byrnep_0-1664294149178.png

 

View solution in original post

5 REPLIES 5
Sundeep_Malik
Community Champion
Community Champion

Hey @byrnep 

Don't know about regex in PAD, but found an old post which contains email validation.

https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Text-input-email-validation/td-p/729947

VJR
Super User
Super User

Try using the below action to see if it covers all types of email addresses. If not then Regex would be a good option.

 

Tried 2 samples of .com and .co.uk and both worked well.

If the RecognisedEntities comes out blank then there is no email detected.

 

VJR_0-1664250525745.png

 

Good suggestion!  However I ended up going with the Reg Ex. I found it a bit cleaner, but in essence checking for the row count of the Recognize Text could be used the same way.

 

byrnep_0-1664294149178.png

 

True, and in fact in the code-behind PAD must be using something like a regex and presenting to us in a easy-to-use readymade action. 

Yes, it does like like that control is a 'friendly wrapper'.  Regex is not exactly friendly!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,919)