Showing results for 
Search instead for 
Did you mean: 
Level: Power Up

Automatic Email to Sharepoint Library Sorting

I work for an IT Services company (Microsoft Partner), but we're not Sharepoint wizards by any stretch. We get a lot of automated emails sent to reports@, licensing@, compliance@, etc... . This emails may be client-specific, or they may be general company-wide emails. We have all these various mailboxes as an alias of our (as an example) mailsort@ mailbox in 365, and we've been running this no-longer-supported (but handy) SharePoint Bridge software on one of our servers. We have a variety of (about 50) rules based on subject lines, recipient address, etc... and then messages get sorted (as .msg files -- so the full Outlook email with attachments and everything) into the appropriate library on sharepoint.

For years it's been working fine with the occasional hiccup that required a service restart. It would flat-out barf on some messages and spit out some ugly out Index was out of range errors that usually removing those messages from the mailsort@ inbox would fix the problem and the thing would start processing again. However, it's barfing more and more frequently and, really, I need to get some sort of supported service for this that doesn't require babysitting.

I found this that says it's now possible to dump to .eml file with Flow, but I can't ever seem to get it to work right. If you look at that thread, you'll see there are a few folks having an issue like mine. The file writes as a .eml file, which is fine, but double-clicking it and opening it in Outlook just produces a email windows with blank email with no from/to, no subject, no body, etc... . I can open up the .eml files in a text editor and see the raw HTML so I know at least the body is coming through. Changing the file extension to .msg just gives me a permission error when I try to open it.

Is there something obvious I'm missing here? I basically just want to be able to dump an .eml or .msg file to sharepoint to specific folders, just like if I were manually saving it out of Outlook, attachments at all. 

Super User
Super User

Re: Automatic Email to Sharepoint Library Sorting

Have you seen the Once an Outlook email is received add it to a SharePoint List Flow template? If you must retain the email file itself, simply enable attachments on the list, and add a step to the Flow to save the attachment to the list item.

SharePoint Document Libraries are fairly limited, while SharePoint Lists are much more extendable - not to mention far easier to manage and organize. I always prefer to utilize lists when working with SharePoint, even when working with documents. 

If you need help on how to create a .msg file, check out this solution from @v-yamao-msft. The Parserr 3rd party connector can also do this for you as well. 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Level: Power Up

Re: Automatic Email to Sharepoint Library Sorting

We primarily use libraries because of the abilities to explorer-view things and manage things occassionally like standard explorer folders. We use it as a sort-of-cloud-based file server for documents for our various remote offices. These are primarily structured document repositories that these rules are dumping to so the meta data that is provided by lists isn't necessary as much because of the defined folder structure. Would rather not have the attachments stripped out into separate files, as the attachments generally have something to do with the message it was contained in. 

I'll check out parserr and see what it can do. 

Edit: Just looked at and we'd probably need the $100/month plan (as we easily get over 450 emails/month -- minimum of 10 emails per 40ish client just reports alone). That might be a bit too much for us. 

Helpful resources


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.


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


Flow Community User Group Member Badge

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


Microsoft Learn

Learn how to build the business apps that you need


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 50 members 4,938 guests
Please welcome our newest community members: