Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Splitting email subject string

(0) ShareShare
ReportReport
Posted on by

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!

 

 

 

 

  • jslsmithyx Profile Picture
    97 on at
    Re: Splitting email subject string

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

  • Community Power Platform Member Profile Picture
    on at
    Re: Splitting email subject string

    Thanks so much - worked perfectly!! Smiley Very Happy

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: Splitting email subject string

     

    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.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492