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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Parsing text from emai...
Power Automate
Answered

Parsing text from email subject

(0) ShareShare
ReportReport
Posted on by 18

I would like to create a expression that grabs a persons first and last name from an email subject but I can't figure out how to do it. 

 

The subject line would be similar to this "New Hire Notification - FirstName LastName"

 

 

Categories:
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @usethegreymatte 

     

    You probably just want to use the replace expression

     

    DamoBird365_0-1618934013646.png

     

    This returns the following:

    DamoBird365_1-1618934051779.png

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here

     

     

  • usethegreymatte Profile Picture
    18 on at

    @DamoBird365, I get teh attached error when I use your expression, Here is my code: replace(outputs('Compose'),'New Hire Notification -')

     

    Screen Shot 2021-04-20 at 2.32.44 PM.png

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    @usethegreymatte 

     

    You're missing the final parameter ''.

     

    replace(outputs('Compose'),'New Hire Notification -','')

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here

  • Verified answer
    usethegreymatte Profile Picture
    18 on at

    Screen Shot 2021-04-20 at 2.47.18 PM.png

    Where Ar1 is the name of the variable

  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @usethegreymatte 

    Here is another way to approach your issue.  You can actually stop at my Get Name Compose action - the remaining actions just split out the first and last names.

    image.pngimage.png

    image.png

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard