Skip to main content

One post tagged with "email archiving"

View all tags

Email Archiving in Power Automate: One Outlook Message Becomes One Compressed PDF/A File in SharePoint with PDF4me

· 32 min read
SEO and Content Writer

PDF4me Create PdfA is a Power Automate action that rewrites a PDF to the ISO 19005 archival standard. Placed at the end of an Outlook flow that converts the message body, converts every attachment, and merges them, it turns email archiving into a single compressed PDF/A file that SharePoint stores permanently.

Search for email archiving and page one sells you storage. Proofpoint, Mimecast, Barracuda, GoDaddy, every one of them answers the question "where will the mail live and for how long". Not one of them answers the question that actually decides whether an archive is worth keeping: what format is it in? A mailbox export is only readable while something can still open it. This flow treats archiving as a format problem first and a storage problem second, which is the opposite order to everyone on that results page.

The flow at a glance
1. When a new email arrives (V3)
Outlook trigger. Include Attachments Yes, Only with Attachments Yes, Folder Inbox.
2. Initialize variable
Name email, Type Array. The buffer every PDF gets appended to, in order.
3. Convert to PDF
PDF4me Connect. Turns the HTML message body into page 1 of the archive.
4. Append to array variable
Pushes the converted body onto the email array before the loop starts.
5. Apply to each
Loops the trigger Attachments collection. Two actions inside.
6. Convert to PDF 2
Converts each attachment using base64ToBinary on contentBytes.
7. Append to array variable 2
Pushes each converted attachment onto the same email array.
8. Merge multiple PDF files
PDF4me Connect. docContent is the whole email array. One PDF out.
9. PDF - Compress
Optimize Profile Web. Runs before the standard is applied, never after.
10. PDF - Create PdfA
Compliance PdfA2b. This is the action that makes it an archive.
11. Create file
SharePoint writes EmailArchive.pdf into /Shared Documents/EmailArchive.