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 / Splitting email subjec...
Power Automate
Answered

Splitting email subject string

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, 

 

I'm a new Flow user and need to understand how to build a Flow to split/manipulate an email subject line which then populates a Sharepoint list. I have the "When new email arrives" and "Create item" connectors sorted, just need to understand how to split up an email subject line.

 

The standard subject line looks like:

 

xxxxxx xxxxxxxxxxx XXX0000/XXXXXXXXX/00000 XXXXXXXXX

Where x = letters and 0= numbers

 

The numbers in red are the ones that I want. They can vary between just 1 digit to up to 5 (or theoretically more)

 

Assuming I will need to use split but not sure how. In current attempts the flow runs but the no splitting results in the sharepoint list.

 

Any help appreciated!

 

 

 

 

Categories:
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

     

    Combine different string and collection operations to extract the value from the email subject

     

     

    Capture

     

    function in set variable

     

    first(skip(split(replace(triggerBody()?['Subject'],' ','/'),'/'),4))
     
    function replaces the space in the subject with '/'.
    splits the subject into array elements delimited by '/'.
    deletes the first 4 elements from the array.
    then takes the first element in the new array which is the number you are looking for.
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks so much - worked perfectly!! Smiley Very Happy

  • jslsmithyx Profile Picture
    97 on at

    Really helpful thank you! I'll now be looking into extracting multiple words from an Emails Subject Field using this method 🙂 

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 249 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 202

#3
David_MA Profile Picture

David_MA 180 Super User 2026 Season 2

Last 30 days Overall leaderboard