Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 0BW8t1c+wwNpkObjmA7Wzd
Power Automate - Building Flows
Unanswered

Convert Name to Email Address

Like (0) ShareShare
ReportReport
Posted on 15 Oct 2018 20:25:07 by 21

Does anyone have a recommendation/example of the best way to take a field from Sharepoint and convert it to an email address.  I have a field in Sharepoint where a user selects a name (choice field).   I do not want to use a Person or Group field, as I want to make it a simple choice instead of them having to type in a name.  I want to take this name and convert it to an email address for futher use in the flow.  For example:

 

Choices in Sharepoint:

Bob Ross

Dale Earnhardt

Jim Croce

Taylor Swift

 

Output for use in MS Flow:

Bob.Ross@company.com

Dale.Earnhardt@company.com

Jim.Croce@comporium.com

Taylor.Swift@comporium.com

 

 

Any thoughts?  

  • lucy96 Profile Picture
    2 on 11 Apr 2023 at 20:04:18
    Re: Convert Name to Email Address

    hi digitech

     

    do I have to change "Value" to my column name. how does power automate  know which column I'm referring to.

  • MM-05080756-0 Profile Picture
    406 on 29 Jan 2020 at 15:27:55
    Re: Convert Name to Email Address

    Hi @v-bacao-msft ,

    I found this thread when swarching for a way to create e-mail address out of Sharepoint list field. Great, thanks!

    But, in my case it is a bit more elaborate:

    1. first name and surname are in different columns, and
    2. some first names and/or surnames contain the letters å, ä or ö.

     

    How do i tweak this expression

    concat(replace(items('Apply_to_each')['Fornamn'],' ','.'),'@',items('Apply_to_each')['Domain'])

     to create fornamn.efternamn@mydomain.com, from this:

    Namnlös.png

    Column names are Fornamn, Efternamn, Domain

  • CH3RR3RA Profile Picture
    2 on 23 Oct 2019 at 13:18:13
    Flow Forms Convert Name to Email Address

    Hello @Anonymous 

    Would you be able to provide the same script but for flow.  Instead of pulling the data from sharepoint I would like to pull the data from a field in a form.  

     

    Any help you could provide would be appreciated.

     

    Thank you!

  • GabrielStJohn Profile Picture
    on 18 Oct 2018 at 19:44:09
    Re: Convert Name to Email Address

    Hello, @bclarkuncc!

    Thank you for posting on the Flow Community Forum! Have you had an opportunity to apply @v-bacao-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!

    Thank you for being an active member of the Flow Community!

    -Gabriel
    Flow Community Manager

  • v-bacao-msft Profile Picture
    on 18 Oct 2018 at 07:35:35
    Re: Convert Name to Email Address

    Hi @bclarkuncc,

     

    You could use Expression-replace() to replace the space of the name with "." and then use the concat() function to add the domain name.

    I noticed that the domain name of the user's email may be different. I suggest adding a domain tag to the user's domain name in SharePoint list. The field type can also be Choice. Image reference:

    SharePoint list:

    38.PNG

    Flow:

    Formula reference:

    concat(replace(items('Apply_to_each')['employee_name']['Value'],' ','.'),'@',items('Apply_to_each')['domain']['Value'])

    39.PNG

    The result of this expression output is an email that can be used in other Flow actions.

    40.PNG

     

    Please take a try and let me know if you have any question.

     

    Best Regards,

    Barry

  • Community Power Platform Member Profile Picture
    on 16 Oct 2018 at 10:20:15
    Re: Convert Name to Email Address

    There is probably a neater way of doing this but use a Compose action to use an IF statment for each:

     

    if(equals(triggerBody()?['FIELD IN SHAREPOINT']?['Value'],'Bob Ross'), 'Bob.Ross@company.com', '')

    if(equals(triggerBody()?['FIELD IN SHAREPOINT']?['Value'],'Dale Earnhardt'), 'Dale.Earnhardt@company.com', '')

    if(equals(triggerBody()?['FIELD IN SHAREPOINT']?['Value'],'Jim Croce'), 'Jim.Croce@comporium.com', '')

    if(equals(triggerBody()?['FIELD IN SHAREPOINT']?['Value'],'Taylor Swift'), 'Taylor.Swift@comporium.com', '')

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,083 Most Valuable Professional

Leaderboard
Loading started