web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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

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:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard