cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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

7 REPLIES 7
PrasadAthalye
Community Champion
Community Champion

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
Anonymous
Not applicable

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
Anonymous
Not applicable

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
Anonymous
Not applicable


@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!!!

This is pretty good but it only checks for the '@' and the '.' must appear after that, it's missing other portions of the email format.

 

Does anybody have code that will test for user@domain.com?

 

This will test for the "user" portion of the email, combined with @PrasadAthalye 's original code:

 

 

and(greater(length(first(split(variables('email'),'@'))),0),contains(last(split(variables('email'),'@')),'.'))

 

 

Still need to test for the "domain" and "com" portions, just haven't had time to work on it.

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages