cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
robgar
Helper II
Helper II

Extract Alias from Email Address Field

Hello-

 

Using the "Create New O365 User" action, it requires a "Mail Nickname" entry (basically the xxx before the @domain.com).  I don't want the user to have to enter a full email address for the account they are creating AND a mailbox alias in the trigger form.  That's redundant.  Instead, I'd like to extract the alias that they entered (xxx) and place it into the "Mail Nickname" field in the Action. 

 

Possible?

 

pic1.png

1 ACCEPTED SOLUTION

Accepted Solutions

@robgar 

Hey there.  So, a good function to know is the split() function.  You can use it here to split the string into an array at the '@', and then take the first part of the array.

 

split(triggerBody()['Email'],'@')[0]  should do the trick.
 
Here's a video to walk you through it:
 
Keep us posted.
-Ed
 
 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

View solution in original post

4 REPLIES 4

@robgar 

Hey there.  So, a good function to know is the split() function.  You can use it here to split the string into an array at the '@', and then take the first part of the array.

 

split(triggerBody()['Email'],'@')[0]  should do the trick.
 
Here's a video to walk you through it:
 
Keep us posted.
-Ed
 
 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Bingo!  Thank you very much, @edgonzales !

Rucha052
New Member

How do we do this if we have multiple email addresses stored in an array?

Hey there @Rucha052 -

Let's talk more about what the intent is once you have the email address(es).  Start a new thread and tag me in it and we'll find the best way to get at what you're after, ya?

 

Thanks!

Ed

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (4,738)