How to create an email-enabled SharePoint List on Office 365

2.09K
Views

Introduction

One of the neat features that is available in on-premises SharePoint but not in Office 365 is the email-enabled list. This feature allows a list to have a special email address that can receive mail from users. By default, the emails will then be stored in that list, but custom processing of the emails can occur using an event receiver. A common example of that is using an event receiver to strip out attachments from incoming emails and store them in a document library.

This blog post will implement a work-around for this feature using the new Azure App Service. More information on the service itself can be found in the links included in the Reference section at the end of this blog post.

Azure Marketplace

To begin, you will need to open the new Azure Portal (currently in preview status.)

Click the “New” button in the lower left corner of the portal.

Choose “Developer Services” from the list in the “Create” blade.

Use the search box to find each of the resources required by this blog post: Logic App, SharePoint Online Connector, and Office365 Connector.

Add a Logic App

Click the “Create” button in the bottom of the Logic App blade.

Fill in the name of your Logic App in the Name textbox. Choose the subscription you would like to use for this. Choose the datacenter location for this. For now, do not touch the Triggers and Actions.

Select or create an App Service Plan. You cannot create an empty App Service Plan, so this is the only to make a new one if desired. The pricing tier is important when it comes to how often you would like to check for new email. The Basic tier only allows polling intervals of hourly or more. When finished, click the “Select” button in the bottom of the Choose Your Pricing Tier blade followed by the “Create” button in the bottom of the Create Logic App blade.

Add a SharePoint Online Connector

Click the “Create” button in the bottom of the SharePoint Online Connector blade.

Many of the options are the same as the Logic App. The one main difference is Package Settings.

These settings must be configured properly for your SharePoint Online Connector to work. Enter URL of the site that contains the list you wish to email-enable in the Site URL textbox. For example: http://starcrossed.sharepoint.com. Enter the site-relative URL of the list you wish to email-enable in the Document Library/List Relative URLs textbox. For example: Shared Documents. When finished, click the “OK” button in the bottom of the Package Settings blade followed by the “Create” button in the bottom of the SharePoint Online Connector blade.

Add an Office365 Connector

Click the “Create” button in the bottom of the Office365 Connector blade.

Many of the options are the same as the Logic App and SharePoint Online Connector. When finished, click the “Create” button in the bottom of the Office365 Connector blade

Design the Logic App

Click the Triggers and Actions tile in the EmailEnabledList blade.

The first thing you will want to add is a trigger. For this blog post, we will be triggering on receiving a new email in Office365. Click the SharePoint Online Connector from the API Apps in This Resource Group list on the right side of the Triggers and Actions blade.

You will need to authorize the Office365 Connector by clicking the “Authorize” button. This will pop-up a login page where you will need to enter the Office365 credentials for the mailbox that you would like monitor.

Once authenticated, you will be asked to choose one of the available triggers. Currently, the Office365 connector only has one trigger: New Email. Click on “New Email.”

You are now presented with some options for how often you would like to poll the mailbox as well as mail properties to match on when creating a list item from a new email. For demo purposes, I chose to poll every 5 minutes, and I left all of the properties blank. This means it will create a list item for every received email.

Just like the Office365 Connector, you must also authorize the SharePoint Online Connector by clicking the “Authorize” button. List items will be saved using the credentials used for authorization.

Once authorized, you must choose an action to perform when the Logic App is triggered. For this blog post, we will use the Upload To action. This will let us create a document based on the email received and store it in the document library that we put in our settings for the SharePoint Online Connector, Shared Documents.

For demo purposes, we will just save the body of the email as the content of the document. This can be done by clicking the elipses (…) next to the Content textbox. From the drop-down, choose “New Email Body”. Leave Content Transfer Encoding as “None.” Click the elipses next to the Document Relative URI textbox. From the drop-down, choose “New Email Subject” to set the filename to the subject of the received email. Leave Force Overwrite as “false.” Click the elipses at the bottom to open more options. Click the elipses next to the Title textbox. From the drop-down, choose “New Email Subject” to set the Title column for the document to the subject of the received email. Leave ExtUserInviteTest blank. When finished, click the checkmark button at the bottom.

Test the Logic App

Send an email to the account you used to authorize the Office365 Connector.

Depending on your chosen interval, you should see the results show up. Click the link under Runs Today in the EmailEnabledList blade. Find the run corresponding to the latest date and time within your chosen interval and click on it.

As you can see from the list view in SharePoint Online, the document was added. The filename, Logic App Test, corresponds to the subject line that I used in my email.

By opening the document in Notepad, you can see that the body of the email was saved as the content of the document.

Conclusion

As you can see from this basic example, the ability to process incoming Office 365 emails with SharePoint online is easy to setup using Azure App Service. More robust solutions are definitely possible by expanding on the skeleton Logic App provided in this blog post. I am excited about this new tool for creating solutions for Office 365 and SharePoint, and I look forward to learning more advanced techniques for using it.

If you have any questions about this blog or would like to discuss Azure App Service in more detail, I can usually be found in the SharePoint Community chat room during the week. You can also reach me on Twitter.

References

(2090)

5/5 (2)

Please rate this

How to create an email-enabled SharePoint List on Office 365

| SharePoint | 15 Comments
Profile photo of Paul Choquette
About The Author
- With so much collab in the community, it's kinda hard bein' Paul Cho-que-double-t-e...Been programming since I wrote that dating program in BASIC for the TRS-80 back in 4th grade. My first website was a Hello Kitty photo album for my newborn daughter that I wrote from scratch with HTML and JavaScript on Geocities (best viewed with Netscape Navigator!) I began my SharePoint adventures in 2007 by connecting a Pick-based ERP system to WSS 2.0 to create new and exciting (I'm easily amused) reporting options. I stuck my head into the cloud for the first time by creating an Azure Logic App to replicate email-enabled lists on SharePoint Online.When I'm not nerding out for a paycheck, I'm nerding out for free in various coding and gaming communities or at home in front of my children (they just have a perpetual eye-rolling thing going on now.)

15 Comments

  • Profile photo of Drew McCann
    Drew McCann
    Reply Report user

    Hi Paul – thank you for the walkthrough.  I am able to get email data like the subject and body to populate fields with no issue, but I was wondering about bringing over any attachments.  I see the attachments in the 365 Connector but do not see any way to incorporate them in the SharePoint Connector.  My preference would be to bring the following into a SharePoint list:

    • Subject as item Title
    • Body as item multi-line text field
    • Attachment(s) as item Attachment(s)

    Is this possible?

    Thanks!

    -Drew

  • Profile photo of Paul Choquette
    Paul Choquette
    Reply Report user

    The service you are recommending can ALSO cost money (only 100 emails/mo are free for that product.) Nothing is truly free in life, Larry. 😉 In any case, this is just a demo of Azure Logic Apps that may be useful for those on Office 365. It’s certainly not the only way to get emails into a SharePoint list.

    Another thing about that product… I haven’t used it, personally, but the screenshots in the store seem to indicate that a special email address is used to forward emails to owner of the product. That seems a bit sketchy. I doubt most companies want their email redirected through a 3rd party like that. 

  • Profile photo of Sukesh Khare
    Sukesh Khare
    Reply Report user

    Thanks for the article, this is exactly what we need. I tried this yesterday in my Azure sub and  unfortunately it seems the UI has changed and we don’t get “API Apps in this resource group” panel anymore in the Logic App Designer, now we get something called “Show Microsoft managed APIs” – which surprisingly does not include Office365 Connector and SharePoint Connector. Since this article is approximately an year old , I am assuming this could be due to updated/next version of Azure portal but I might be wrong. Can someone comment ?

  • Profile photo of Paul Choquette
    Paul Choquette
    Reply Report user

    Sure it is. Having it route through a 3rd party that can do whatever they want with it is indeed very sketchy. You say “incredibly sensitive information,” but most companies don’t want internal communications of any kind going through someone else. What happens if that 3rd party’s email server gets hacked? Whether they keep them or not, they are passing through that system.

  • Profile photo of Drew McCann
    Drew McCann
    Reply Report user

    Totally agree with Paul here.  We are not allowed to route our emails to a 3rd party, especially if they are based outside the US.  It would be really nice to find a way to replicate the included on-premises attachment handling functionality without involving dollars and/or a 3rd party but so far no dice.

  • Profile photo of Sukesh Khare
    Sukesh Khare
    Reply Report user

    Hi Paul, Could you please help me, really appreciate that in advance. I am kinda stuck here. Could you please confirm why I don’t see “API Apps in this resource group” panel in the Logic Apps Designer and /or why Office365 Connector and SharePoint Online Connector don’t show up in the “Show Microsoft Managed APIs” list.  Due to this I am unable to follow this approach of utilizing perfectly OOB ways to implement email enabled DLs. Pleaasse!!! anyone, any comments, thoughts ?

  • Profile photo of Paul Choquette
    Paul Choquette
    Reply Report user

    Sukesh, this blog post was written while everything was in preview. It’s quite possible that things may have changed. I don’t have time at the moment to take a look, but I will do some research when I have some free time and provide an update in this post.

  • Profile photo of Michael Knudsen
    Michael Knudsen
    Reply Report user

    Has anyone gotten attachments to work
    I can see that they are available but it doesn’t save embedded images or attachments.
    I tried using the SharePoint Connector “Create file” also, but cannot get the files saved anywhere…

    Any hints?

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">