Block 1 - Every Hour
- Type / Role
- n8n-nodes-base.scheduleTrigger - scheduleTrigger
- Config choices
- Version 1.2
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, an...
n8n-nodes-base.scheduletrigger, n8n-nodes-base.microsoftoutlook, n8n-nodes-base.if, n8n-nodes-base.noop, n8n-nodes-base.splitinbatches, n8n-nodes-base.code, n8n-nodes-base.microsoftonedrive, n8n-nodes-base.microsoftsharepoint
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Mychel Garzon.
Original n8n.io sourceStop 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.
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.
4. Audit Logging The upload summary is appended to a SharePoint list as a compliance audit record. Every archived email produces one row with full traceability, sender address, file names, destination folder, and timestamp.
5. Completion
The email is marked as read in Outlook and tagged with the Archived category. The batch loop then moves to the next email until all emails in the current run are processed.
{{ $json.folderPath }}[email protected])Attachments are organized automatically:
/Archives/{year}/{month}/{sender-domain}/filename.ext
Build Folder Path + Decode Attachment node to organise by department, document type, or any other field available on the emailGet Unread Emails to only process emails from specific domains or addressesHas File Attachments? to also copy files to SharePoint document libraries or Azure Blob StorageThis catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Archive Outlook email attachments to OneDrive with SharePoint logging |
|---|---|
| Complexity | advanced |
| Nodes | 22 |
| Categories | File Management |
| Author | Mychel Garzon |
| Published | 18 May 2026 |
Use the JSON export at /data/workflows/15793/15793.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
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, an...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your File Management use case.