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:
I have the same question (0)
  • 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,947 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 484

#2
Valantis Profile Picture

Valantis 477

#3
Haque Profile Picture

Haque 456

Last 30 days Overall leaderboard