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 / Extract ticket number ...
Power Automate
Answered

Extract ticket number from email subject and update it

(0) ShareShare
ReportReport
Posted on by 391

Hey everyone, I am trying extract the ticket number from the email subject by using compose without any luck.

 

Example of the email subject: INC# 110 - Test abc cba

 

Anything before and after INC# is dynamic, it can be different with each email.

 

All I want is to extract the ticket number, and use filter query to match the ID in SharePoint list, and then update the item.

Flow:

nicklim_0-1690340307111.png

 

nicklim_1-1690340419769.png

 

nicklim_2-1690340477853.png

 

 

Categories:
  • Verified answer
    nicklim Profile Picture
    391 on at

    Hey everyone, sorry please disregard.

     

    Using this in compose worked.

    split(split(triggerBody()?['Subject'], 'INC# ')[1], ' - ')[0]

     

  • SanmeshG Profile Picture
    1,956 Moderator on at

    Hi @nicklim ,

     

    One way of getting the ticket number , if you have a hyphen(-) would be to use  the split function on that to split the string based on hyphen(-) and take the first value from the resulting array.

     

    split_.png

    Expressions for split and trim and accessing array elements.

    split(triggerBody()['text'],'-')
    
    trim(outputs('Compose')[0])

    Screenshot (481).png

     

    If this solves your problem , please give this answer a thumbs up and accept this as a solution.

     

    Thanks,

     

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 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard