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 / Trying to parse the en...
Power Automate
Answered

Trying to parse the end of a string in the subject line of an Outlook message

(0) ShareShare
ReportReport
Posted on by 3

I'm attempting to parse the name at the end of an email subject line, but I'm not sure how to the get the rest of a string after a given index. The string always reads "Your Ticket #20200908-0727-EU-387 has been assigned to <Assigned To Name>", where the <Assigned To Name> can be a different name each time a ticket is generated. I have something that works, that's not extremely dynamic, but it gets the job done. 

 

 

 

substring(triggerOutputs()?['body/subject'], add(indexOf(triggerOutputs()?['body/subject'], 'to'), 3))
 

So I'm grabbing everything up to the 'to' string, and the 'add' function is adding three characters to the right which passes 'to' and the space to get to the beginning of the full name.I guess this can be considered an answer to my question, but I'm open to any ideas that may be a bit more dynamic. Thanks!

Categories:
  • Verified answer
    ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @angelr107 

    Try usin the split() expression along with last() - see my example below:

    image.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
Mohsin Ali Profile Picture

Mohsin Ali 424

#2
11manish Profile Picture

11manish 328 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard