Archive incoming emails in PDF format using Microsoft Flow

Email communication is the lifeline of every business. But managing an email archiving solution can be a tricky and time-consuming process.

In this Blog, we will automate the process of archiving\converting incoming emails including all attachments to PDF and storing them in a SharePoint Document Library.

There are many reasons for building a Flow like this one. What we hear a lot from customers who do something similar, is that their regulatory body dictates that all files are made available, and discoverable, in a standardized format. PDF (specifically PDF/A which Muhimbi support as an option) is often the format of choice.

Prerequisites:

  • An Office 365 subscription with Exchange Online, SharePoint Online license.
  • Muhimbi PDF Converter Services Online full, free or trial subscription(Sign up).
  • Appropriate privileges to create Flow.
  • Working knowledge of Microsoft Flow.

From a high level, the Flow works as follows:

Overview.jpg

Step 1: For this demo, we will use “When a new email arrives” Outlook action.

  • Folder Inbox
  • Set the Has attachment field to No.
  • Set the Include attachments field to Yes.

When a new email.jpg

Step 2: Use the “Export email” Outlook action to Export the content of the email.

  • Message Id: It is the output variable of “When a new email arrives” action.

Export email.jpg

Step 3: Use the “Convert document” Muhimbi action to convert the Exported content of the email.

  • Source file name: Message Id.eml (output variable of “When a new email arrives“) action.
  • Source file content: Body (output variable of “Export email”) action.
  • You can find more details about the Muhimbi Flow connector and its core concepts here.

Convert document.jpg

Step 4: Use the “Create file” SharePoint action to store the PDF document into SharePoint document library.

  • File name: We concatenate From(output variable of “When a new email arrives“) action with utcNow()expression.
  • File content: Processed file content the (output variable of the “Convert document” )action.

Create file.jpg

That’s it, now publish the Flow and send an email containing some Word, Excel, PowerPoint or other supported files types to the email address associated with the Flow. After a few moments PDFs will appear in the destination folder.

Happy Converting 🙂..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s