Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

File Email based on Subject into SharePoint

(0) ShareShare
ReportReport
Posted on by 4

Hi All,

 

I am new to Power Automate functionality.

I need some expert guidance and help.

 

I am looking to do up an automated email filing system into Sharepoint.

Incoming emails go into shared mailbox > Subject of emails will contain project name '20201111', could be in the front or the back or middle. > Retrieve the project name > export out the email > store it into SharePoint under Project 20201111.

 

I managed to get the exporting of email and store in SharePoint working.

How do I search for the project name in the subject then store it into SharePoint?

 

Thanks in Advance!

  • abm abm Profile Picture
    32,506 Most Valuable Professional on at
    Re: File Email based on Subject into SharePoint

    Hi @LJS 

     

    Thanks for your reply. This is what you need.

     

    image.png

     

    The expression I used above is as follows:

     

    first(split(last(split(outputs('Compose'),'[')),']'))
     
     
    Thanks
  • LJS Profile Picture
    4 on at
    Re: File Email based on Subject into SharePoint

    Hi @abm 

     

    Thanks for the advise, it will be [20201111] .

    The project code will always be 8 digits.

  • abm abm Profile Picture
    32,506 Most Valuable Professional on at
    Re: File Email based on Subject into SharePoint

    Hi @LJS

     

    You need to follow some standard in your subject line such as project name with single quotes around it.

     

    Project name '20201111'

     

    If you don't follow any standard and relies on numeric values only to obtain the project name then you need to check every single character and find whether its numeric or not. So to achieve this you need to do lots of string manipulations and comparisons.

     

    For the above single quotes standard you could use a split expression to get the values.

     

    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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June 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 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1