2 Ways to Archive Emails With Microsoft Flow

This blog post is, in fact, an answer to a real-life question by one of our clients. She was looking for a simple way to have newsletters automatically stored in SharePoint Online. She also preferred to have them “in readable format”, i.e., with all formatting intact. Ideally, the whole process was to be free of charge, too, so third-party tools were an option of last resort.

Fortunately, there is a way to do all that, and it‘s relatively simple – if you know what to look for. This tutorial is focused on:

  • marketers who want to give read-only access to newsletters to their colleagues
  • users who want to create a searchable newsletter archive in SharePoint Online

Workflow Buzz

At EnovaPoint, we‘re big on automation – so we‘re excited to see the growing popularity of services that help people spend less time on repetitive tasks.

One of the major players in the field is Microsoft Flow – a cloud-based tool that allows you to create and automate processes consisting of multiple tasks across multiple applications. In IT, such processes are called workflows, and Microsoft calls them flows. They will be the core of this tutorial.

To create a flow, you will specify what action should take place when a specific event occurs. This event is known as a trigger.  So, the primary event triggers an action, which in turn triggers another action and so on until the process is complete. This, in short, is how Microsoft Flow works.

Introduced in 2016, Microsoft Flow currently supports more than 200 different applications and two of the major email clients: Outlook and Gmail. If you‘re using another client, your only option is third-party Flow-compatible tools like Parserr that require a separate account and make the whole setup a bit more complicated.

Method #1: Upload Email to SharePoint Library

As we‘ve mentioned before, you can have your newsletters auto-archived both as SharePoint Online library documents or as list items. Let’s start with the first method.

  1. Create a SharePoint library that will serve as a newsletter archive.
  2. Decide on the email account from which the newsletters will be uploaded to SharePoint Online. Then, set up auto-sending a copy of your newsletter to that account. In JungleMail for Office 365, you can set additional recipients by clicking the gear icon, then clicking Other.
  3. Log into Microsoft Flow. Make sure that your account also has access to the SharePoint Online site where you want the archive to be created.
    Click My Flows, then Create from blank.
    In the trigger list below, look for and click When a new email arrives. If you only want specific newsletters to be copied, click Show advanced options to narrow down trigger conditions.
    Once you’re done, click New Step and add an action Office 365 Outlook – Export email.
    Click on the Message Id. Then, in the popup on the right, find dynamic content called Message Id.
    Add an action SharePoint – Create file. This is where you will specify the location and properties of your newsletter copy:Site Address: specify your target site URL. Normally, you should find it in the drop-down list.
    Folder Path: add the name of the destination library.
    File Name: here you can get creative and mix static text with multiple values from the dynamic content drop-down. Or you could simply add Subject. Now, if you want the file to be readable by your browser, add .eml or .mht suffix at the end and see which format works best for you.
    File Content: add Body from dynamic content drop-down.
    Save and test your flow. If you encounter errors, double-check file paths: the problem is most likely there.

The final flow structure should look like this:

And here’s the newsletter copy, saved as a library document:

Method #2: Save Email to SharePoint List

Converting email to a SharePoint Online list item allows you to preserve additional information about email as metadata. That‘s a big bonus if you intend to do any serious work with your newsletter archive later. With metadata columns, you will be able to sort, filter, and group items (i.e., newsletters) so they will be much easier to find.

Here‘s how you create a workflow:

  1. Create a SharePoint list that will serve as your newsletter archive. Then, create the basic columns you will need in this list (e.g., SubjectSent dateFrom).
  2. Repeat steps 2-5 from the walkthrough above.
  3. Add an action SharePoint – Create item and fill in the fields:
    1. Site Address: specify your target site URL. Normally you should find it in the drop-down list.
    2. List Name: name of the SharePoint list for your newsletter archive.
    3. The rest of the fields will reflect the columns you created in the list. Choose appropriate metadata for those columns by selecting dynamic content from the drop-down.
  4. Save and test your flow. 

This is the example or our flow structure:

And this is the result:

Now, you can select the item and then click the information icon on the right to see email content. Alternatively, you can click Return to classic SharePoint on the lower left of the screen – this will display email contents directly in the list:

Integrate Newsletters into Communication Site

Once you have your newsletters uploaded to SharePoint Online, there are quite a few ways to share this content. Probably the most effective one is including the archive into a SharePoint communication site.

Introduced late last year, communication sites are part of the Office 365 package. To quote Microsoft, they are “perfect for internal cross-company campaigns, weekly and monthly reports, status updates, product launches, events and more.“ In short, it‘s a great way to communicate with a wider audience in your organization.

Communication sites come in two configurable templates (shown above), or you can start from a blank page.

For example, you can create a communication site and then create a page in it for communicating updates on a particular business project. Among other things, such a page could display a preview of the latest newsletters sent to customers. We found that the best way to do it was to:

  • create a separate list for newsletters;
  • set up a Microsoft flow to import newsletters to this list;
  • add the File viewer webpart on the page.

The best part is that your newsletter archive is updated automatically as a newsletter comes out – and with it, your communication site will be updated, too.

We hope that this tutorial helped you find what you were looking for. If you have any questions about connecting our products to Microsoft Flow, let us know in the comment section below. 

Inline Feedbacks
View all comments

Sign up to get our latest blog posts in your inbox!