cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RyanM
Level: Powered On

Extract metadata from email and when saved to SharePoint

Can a Flow extract metadata from an email saved to a SharePoint library, and populate columns in the library with that metadata?

 

I’d like to create columns in a SharePoint library for standard email metadata - eg From, To, Received date etc. when I save an email to the SharePoint library, I’d like the metadata to populate in the SharePoint columns. 

 

Is is this possible with Flow?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Extract metadata from email and when saved to SharePoint

Hi @RyanM,

 

I am afraid that currently it might be not possible to trigger the flow by dragging emails from Inbox to Subfolders.

You may consider saving the emails to corresponding folders based on the subject. Let’s say that the subject of the email is the library or document set name, then you could configure the Folder path of Create file action likes below.

It will create new folder if there is no one available, or create files in existing folders without affecting others.

A screenshot for your reference:

 1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
RyanM
Level: Powered On

Re: Extract metadata from email and when saved to SharePoint

Thanks Mabel - I will give this a try.

 

Harry_G - thank you also for your advice.

8 REPLIES 8
Harry_G
Level 8

Re: Extract metadata from email and when saved to SharePoint

yes you can do it very easily just create a list and make flow for this list follow pics

1- add Sharepoint List 

1.JPG

 

2- Create flow when new mail arrives 

2.JPG

3- Create Item From Email Data.

 

If you find this helpful please mark it as a solution.

 

Thanks.

 

Regards,

Harry_G

 

 

RyanM
Level: Powered On

Re: Extract metadata from email and when saved to SharePoint

Hi Harry_G

 

Thank you so much for your response. In your example you have a created a dedicated list for email, so it’s good to know this can work.

 

My situation is a little different in that I have existing document libraries that contain a mix of email, Word, Excel, PDF files etc. I need the emails to stay in the same libraries as the other files for record keeping purposes. Email will be added to the libraries manually via drag/drop from Outlook (using Edge) or Save As from Outlook. 

 

Currently when email is added to these libraries, SharePoint attributes the standard ‘created’ and ‘modified’ dates, which aren’t meaningful for email. What I’d like to do is add as addItional columns to my document libraries for From, To, Sent, Received metadata and have a Flow that will populate them when an email is manually dragged or saved to the library. 

 

Is is this possible with Flow?

 

 

Harry_G
Level 8

Re: Extract metadata from email and when saved to SharePoint

@RyanM you can just add some custom columns in library and follow these below step

Capture.JPG

 

Currently i have only one column which is Named as Title, So if you have have multiple column like From, To, Sent etc etc. you can update the file properties using flow.

 

Thanks,

Harry_G

Community Support Team
Community Support Team

Re: Extract metadata from email and when saved to SharePoint

Hi @RyanM,

 

It seems that you would like to upload Email to the library manually by dragging from Outlook or Save As from Outlook.

I am afraid that once an email is saved to the library, it would be not able to get metadata such as From, To, Send, Received, etc.

I have figured out a workaround for your reference.

In my scenario, emails would be saved to the library automatically using flow. We can just trigger the flow based on specific properties, such as the subject. Only when the upcoming email matches the condition, move on to the following actions.

Then add the action Export email.

Create file in SharePoint library.

Finally, add the action Update file properties with dynamic content From, To, Received time from the trigger.

1.PNG

Please take the following docs for reference:

https://flow.microsoft.com/en-us/blog/outlook-connector-more/

https://docs.microsoft.com/en-us/flow/email-triggers

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
RyanM
Level: Powered On

Re: Extract metadata from email and when saved to SharePoint

Hi @v-yamao-msft

 

Thank you for your taking the time to respond - really appreciate your advice.

 

With the workaround you have suggested, I probably couldn’t use triggers like subject or content as I’d have too many variables in my particular situation. Many of my libraries use document sets, so the destination would be hard to anticipate.

 

What might work instead is if I could create a 1:1 relationship between an Outlook sub folder and a document library or document set in SharePoint. So if I drag an email from my inbox to the sub folder, the Flow is triggered and moves the email to the related library or document set. If that is possible in theory, could I use a SharePoint Document ID to create the 1:1 relationship (eg paste the Document ID in the Outlook sub folder Properties field, assuming Flow can read this?)

 

Community Support Team
Community Support Team

Re: Extract metadata from email and when saved to SharePoint

Hi @RyanM,

 

I am afraid that currently it might be not possible to trigger the flow by dragging emails from Inbox to Subfolders.

You may consider saving the emails to corresponding folders based on the subject. Let’s say that the subject of the email is the library or document set name, then you could configure the Folder path of Create file action likes below.

It will create new folder if there is no one available, or create files in existing folders without affecting others.

A screenshot for your reference:

 1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
RyanM
Level: Powered On

Re: Extract metadata from email and when saved to SharePoint

Thanks Mabel - I will give this a try.

 

Harry_G - thank you also for your advice.

Paul-SLIM
Level: Power Up

Re: Extract metadata from email and when saved to SharePoint

An alternative approach is to upload the emails to SharePoint using a tool that can extract the email metadata and populate the SharePoint columns. There are quite some add-ins for Outlook. There are also browser-based (e.g. SLIM Companion Explorer) or SharePoint add-ins with this capability. See e.g. https://directory.collab365.community/office365-sharepoint/sharepoint-email-management-software/
Paul | SLIM Applications

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 247 members 5,270 guests
Please welcome our newest community members: