Copy new Email and Details From Outlook 365 to SharePoint Online Document Library, Microsoft Flow and Logic Apps: Mail Enable Office 365 SharePoint Online

Related Post – Logic AppsCopy new Email and Details From Outlook 365 to SharePoint Online Document Library, Logic Apps: Mail Enable Office 365 SharePoint Online

Related Post – Microsoft FlowCopy new Email and Details From Outlook 365 to SharePoint Online Document Library, Microsoft Flow: Mail Enable Office 365 SharePoint Online

 

I've been working with a customer to figure out a way to email enable lists or libraries in Office 365/SharePoint Online. After deciding that a third party tool wasn't ideal, we looked at Logic Apps and Microsoft Flow. I found a few articles but they were out of date and not fully functional.

I'm writing this article to help fill the gaps until more funtionality is available for the SharePoint connectors and also to help clear up some of the things that took a bit of meddling to figure out. 

Here are the requirements and some comments on current restrictions. Restrictions apply to connectors for both Logic apps and Microsoft Flow as of 01/08/2017. If you are looking at this in September or beyond have a search around to see what Microsoft have implemented since this post. 


Requirement 1

Recieve an email to an email address. Once email received, it is picked up and processed into a document library

Comments

The reason we ended up using a document library instead of a list is currently there is no way to add attachments to a list item (this should come eventually), which means we can't add the BODY content as an attachment or the attachments in the email as attachments.

Ideally we wanted to grab the whole email, attachments and all and add the .msg file to the document library. This isn't possible (but also on the radar from Microsoft).

To work around this we will be creating a .txt file for all of the email details (from, subject, date received, has attachments?, body) and additional files for each attachment.

Requirement 2

Add metadata to the item for email fields

Comments

Sadly this isn't currently possible but it IS on the radar for development. You can only add metadata to a list item and not a document library. Adding metadata to list items also isn't ideal due to the fact you are restricted to 255 characters for string fields, not enough for the BODY content. 

For now the workaround is to pass all of these fields into the document we create in the document library.

I'll cover how to achieve this in both logic apps and flow, though both have pretty similar steps. NOTE: Flow is built ontop of Logic Apps, they are fairly similar but FLOW is accesable from SharePoint and more power user focused, where Logic Apps is more developer focused. 

Instructions for building mail enabled libraries in Office 365

I have split Logic Apps and Microsoft Flow into two seperate posts to reduce size

Logic AppsCopy new Email and Details From Outlook 365 to SharePoint Online Document Library, Logic Apps: Mail Enable Office 365 SharePoint Online

Microsoft FlowCopy new Email and Details From Outlook 365 to SharePoint Online Document Library, Microsoft Flow: Mail Enable Office 365 SharePoint Online

Other notes

I noticed over night that random spam from Microsoft processes made it's way into my document library. You may want to trigger the email received action based on a specific folder and route emails that match criteria to the folder. 

 

2 thoughts on “Copy new Email and Details From Outlook 365 to SharePoint Online Document Library, Microsoft Flow and Logic Apps: Mail Enable Office 365 SharePoint Online

  1. John

    Interested in the differences between Flow and Logic Apps, and what the criteria would be for choosing one over the other. With the pletora of "workflow" type solutions out (Flow, Logic Apps, Nintex Cloud, Power Apps) there it is becoming more and more dofficult to conclude what the right approach is.

    Reply
    1. bexgordon Post author

      Hi John, thanks for your comment. 

      I will be writing a post on this soon, it is difficult but I think they all have their place and aren’t necessarily exclusive of each other.

      Kind regards,

      Rebecca

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *