Archive Outlook email attachments to OneDrive with SharePoint logging
Stop letting email attachments pile up in your inbox. Let automation file every document the moment it arrives. Manually downloading and organising email attachments is repetitive, inconsistent, and easy to forget. Th...
Template notes
Stop letting email attachments pile up in your inbox. Let automation file every document the moment it arrives.
Manually downloading and organising email attachments is repetitive, inconsistent, and easy to forget. This workflow checks your Outlook inbox every hour, extracts every valid attachment, uploads it to OneDrive in a structured folder hierarchy, logs the archive record to SharePoint, and marks the email as read, with zero manual intervention.
---
How it works
The workflow runs in five sequential stages:
1. Ingestion Checks Outlook every hour for unread emails. If the inbox is empty, the workflow exits cleanly with no further execution. If emails are found, they are queued for processing.
2. Per-Email Processing Emails are split and processed one at a time using a batch loop. For each email, all attachments are fetched from Outlook, 0-byte items are dropped, binary data is decoded, and a structured OneDrive folder path is computed automatically from the sender's domain and the email's received date: /Archives/{year}/{month}/{sender-domain}/
3. Upload & Aggregation Emails with valid file attachments are uploaded to OneDrive into the computed folder path. Emails with no real attachments skip the upload step entirely and go directly to aggregation. Results are collected into a summary item containing the sender, file names, upload count, and folder path.