Auto-backup n8n workflows to OneDrive with cleanup & email notifications
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (9)
- n8n
n8n-nodes-base.n8n - Microsoft OneDrive
n8n-nodes-base.microsoftOneDrive - Code
n8n-nodes-base.code - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Microsoft Outlook
n8n-nodes-base.microsoftOutlook - Switch
n8n-nodes-base.switch - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Merge
n8n-nodes-base.merge - Convert to File
n8n-nodes-base.convertToFile
What it does
Automatically BackUp Your n8n Workflows to OneDrive This workflow automates the backup of your self-hosted n8n instance by exporting all workflows and saving them as individual .json files to a designated OneDrive folder. Each file is timestamped for easy versioning and audit tracking. After a successful backup, the workflow optionally cleans up old backup files and sends a confirmation email to notify you that the process completed. How it works 1. Uses the HTTP Request node to fetch all workflows via the /rest/workflows API. 2. Iterates through each workflow using SplitInBatches. 3. Converts each workflow to a .json file using Set and Function nodes. 4. Uploads each file to a target Microsoft OneDrive folder using OAuth2. 5. Deletes old backup files from OneDrive after upload, with the option to keep backups for a configurable number of time. 6. Sends an email notification once all backups have completed successfully. Setup instructions - Enter your n8n Base URL and authentication details in the HTTP Request node. - Set up Microsoft OneDrive OAuth2 credentials for cloud upload. - Configure the Email node with SMTP credentials to receive backup confirmation. - (Optional) Adjust the file retention logic to keep backups for a set duration. - A Cron trigger to schedule the workflow automatically (e.g., daily or weekly). 👉 Sticky notes inside the workflow explain each step for easy setup. Need Help - Need Help 🔗 LinkedIn – Wessel Bulte