Skip to main content

Notifications

Community site session details

Community site session details

Session Id : ZN4BwvGpLl2AFz8hhM1pZT
Power Automate - Building Flows
Unanswered

Copying emails to Sharepoint Library based on part of the subject line

Like (0) ShareShare
ReportReport
Posted on 1 Apr 2021 05:57:35 by 50

Hello you clever people!

 

I am looking for a way to save copies of emails sent or received to different libraries based on what is in the subject line.

 

For example, in our tendering space, we set up a folder for each tender we are working on with a whole heap of subfolders. Each tender is assigned a unique number (a folder name will look something like this: T21064 Culvert Demolition - QGC).

 

So, using the above example, any outgoing emails with T21064 as part of the subject line would be filed in the Correspondence OUT folder under the T21064 Culvert Demolition - QGC folder. Any incoming emails with that number in the subject line would be filed under Correspondence IN.

 

Have any of you done something similar? Can you point me in the right direction?

 

Regards,

Bronwyn

  • AntoniaN Profile Picture
    Microsoft Employee on 01 Apr 2021 at 09:38:12
    Re: Copying emails to Sharepoint Library based on part of the subject line

    Hi @Bron,

     

    Thanks for reaching out.

     

    To select items based on subject in your flow, you can use the action "Get emails (V3)" from the Outlook connector. With this action you can select in which folder to look (Inbox, Sent etc.) and by going to advanced options ("Show advanced options") you can add the string you want to look for in the emails subject using the Subject Filter.

    subjectFilterOutlook.png

     

    After the emails are selected, for each of them you can create a new file in a SharePoint library.
    To have the email content in the file as plain text and not HTML format (the standard way the email body output is in), use an "Html to text" action from the Content conversion connector.

    createFileSPO.png

     

    Let me know if there is anything else I can help with.

     

    Best regards,
    Antonia

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started