cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
frankc9
Helper I
Helper I

Turn Variable Into an Email Address

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

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Mark-Shenouda
Microsoft
Microsoft

@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

 

View solution in original post

5 REPLIES 5
Paulie78
Super User
Super User

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

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
Super User
Super User

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.

Mark-Shenouda
Microsoft
Microsoft

@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

 

View solution in original post

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (952)