Automatic Microsoft Outlook attachment storage to OneDrive with Excel logging
Go to WorkflowDescription
๐ฅ Save Email Attachments to OneDrive & Log Them in Excel
This workflow watches your Outlook inbox, automatically downloads file attachments (for example invoices), saves them into a specific OneDrive folder, and logs each file name into an Excel table. Optionally, it also posts a Microsoft Teams message to let you know that a new attachment has been processed.
โจ What this workflow does
Monitors a Microsoft Outlook mailbox for new emails.
Fetches all attachments from each incoming message.
Processes attachments one by one so every file is handled cleanly.
Downloads each attachment as binary data.
Uploads the file into a OneDrive folder (looked up by name).
Appends a new row with the filename to an Excel table for tracking.
Sends a Teams chat notification once an attachment has been uploaded (optional).
๐งโ๐ผ Who this is for
This workflow is ideal for:
Finance / accounting teams who receive invoices by email and want them stored centrally.
Anyone who wants an โemail โ OneDrive โ Excel logโ pipeline without manual downloading and renaming.
n8n users who work in a Microsoft 365 environment (Outlook, OneDrive, Excel, Teams).
โ
Requirements
Before you run the workflow, youโll need:
A Microsoft Outlook account with permissions to read emails and attachments.
A OneDrive / SharePoint drive with a target folder (the example uses a folder whose name matches the search in the Get Folder ID node, e.g. Testn8n).
An Excel workbook stored in OneDrive with:
A worksheet and table already created.
A column named Filename (or adjust the Set Filename + Excel node to match your column name).
n8n credentials set up for:
Microsoft Outlook
Microsoft OneDrive
Microsoft Excel
Microsoft Teams (optional but used in this template)
๐ ๏ธ Setup steps
Import the workflow JSON into your n8n instance.
Configure credentials:
Set your Outlook, OneDrive, Excel, and Teams credentials on the respective nodes.
Adjust the mail trigger (On Mail Received):
Optionally add filters (subject, sender, folder) if you only want to process invoices or a specific mailbox/folder.
Set the OneDrive folder search (Get Folder ID):
Update the query parameter to the exact name of the folder where attachments should be stored.
Point the Excel node to your workbook (Append to Excel Log):
Use the dropdowns to select your workbook, worksheet and table.
Ensure thereโs a Filename column (or rename the field in Set Filename to match your actual column).
Activate the workflow:
Once active, every new email that hits the trigger will have its attachments stored in OneDrive and logged in Excel.
๐ Integrations used
Microsoft Outlook** โ trigger on incoming emails and download attachments.
Microsoft OneDrive** โ search for folders and upload files.
Microsoft Excel** โ append rows to a table in a workbook.
Microsoft Teams** โ send notifications when attachments are processed.