web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Turn Variable Into an ...
Power Automate
Unanswered

Turn Variable Into an Email Address

(0) ShareShare
ReportReport
Posted on by 80

Hello,

 

How would I go about taking a variable and turning it into an email address?

 

For example, I have a flow that retrieves a users first and last name that is stored into a variable and I need to send that user an email.

 

FirstNameLastInitial@domain.com

John Contoso > JohnC@domain.com

 

 

 

Categories:
I have the same question (0)
  • Paulie78 Profile Picture
    8,422 Moderator on at

    Try this expression:

    concat
    (
    split(variables('Name'), ' ')[0],
    substring(split(variables('Name'), ' ')[1], 0,1),
    '@domain.com'
    )

     Screenshot:

    2021-04-15_16-38-42.png

  • frankc9 Profile Picture
    80 on at

    Thank you for the quick reply!

     

    I am sorry, I should have added if it would be possible to do this in Automate Desktop? Currently, I have an unattended desktop flow triggered by the cloud connection.

  • Paulie78 Profile Picture
    8,422 Moderator on at

    I have no doubt it is possible. But I have hardly use Power Automate Desktop, so I cannot tell you how to do it. It's something I hope to spend more time on very soon.

  • Verified answer
    Mark-Shenouda Profile Picture
    Microsoft Employee on at

    @frankc9 
    Hope you are well, 
    I believe you can achieve this by using multiple actions, 

    1. Use SplitText action to split the first and last name by Spaces
      Mark-Shenouda_0-1618743036047.png
    2. you will now have a list of text, that contains 2 items , now you can use the Get Sub text action to get the first character of the Last name as below 

      Mark-Shenouda_1-1618743131079.png

    3. Finally you can concatenate them in a variable and do the desired operation 

    Hope this helps 
    Best Regards

     

  • frankc9 Profile Picture
    80 on at

    @Mark-Shenouda 

     

    Hope you are doing well yourself!  This was exactly what I was looking for and I was able to piece it all together.  At one point I was in the right spot, but couldn't figure out how to pull the first and last name from the split text.  

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard