N8N backup flow to Nextcloud 7-day retention
This workflow automates the daily backup of all your n8n workflows to a designated folder in Nextcloud. It ensures that you always have the last 7 days of ba...
🔌 Nodes & Integrations Used (3)
📖 Implementation & Setup Guide
This workflow automates the daily backup of all your n8n workflows to a designated folder in Nextcloud. It ensures that you always have the last 7 days of backups available while automatically deleting older ones to save space.
🔧 Features
Scheduled Trigger: Runs automatically once per day (can be executed manually as well).
Directory Management: Creates the /N8N-Backup directory in Nextcloud if it doesn't already exist.
Backup Collection: Retrieves all workflows from the n8n instance.
JSON Conversion: Converts each workflow into a JSON file.
Upload to Nextcloud: Saves each backup file into the specified backup directory.
Retention Control: Keeps only the latest 7 backups and deletes the rest from Nextcloud.
📌 Notes
Make sure to manually create the /N8N-Backup directory in your Nextcloud account before using this flow.
Update the Backup Path node if you wish to change the upload directory.
Ideal for teams using n8n with self-hosted instances and requiring offsite backup via Nextcloud.
🔒 Requirements
n8n instance with access to the Nextcloud node.
Valid credentials for your Nextcloud account with API access.
Update: 08/11/2025 “Backup Flows to Nextcloud” – Import format fixed
Summary: The workflow now exports one clean JSON object per workflow (no arrays, no backup/meta fields), so files can be imported 1:1 via the n8n UI.
What changed:
Switched from “Convert to File” to a Set node that builds the JSON in binary data.
Enabled filters.include = "all" on Get many workflows to include nodes, connections, settings, pinData, and tags.
Sanitized filenames and removed IDs/metadata that can break UI imports.
Fixed Nextcloud path and binary property mapping (data).
Verification:
Generated multiple backups and imported each via UI (“Import from file”) without errors.
Each file begins with { (single object) and loads with full workflow structure.
Notes:
Keep “Binary Property” set to data in the Nextcloud node.
Filenames are sanitized to avoid special-character issues.
⚡ How to import this workflow into n8n:
- Click the Direct Download JSON button above to save
N8N backup flow to Nextcloud _7-day retention_.json. - Log in to your n8n Cloud or self-hosted n8n instance.
- In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
- Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
- Click Execute Workflow to test and switch to Active!
Related General Automation Workflows
View All in General Automation →Generate Application Copy
Production-ready n8n automation template for Generate Application Copy built by AhiXLight. Seamlessly connects Execute Workflow Trigger, OpenAI with 4 configured nodes.
2-way sync Google Contacts and Notion
Sync your Google Contacts with your Notion database. You can filter contacts by label or sync all contacts. All contact information is kept in sync between G...
2D Image to 3D Model Automation
Production-ready n8n automation template for 2D Image to 3D Model Automation built by AhiXLight. Seamlessly connects HTTP Request, Google Sheets, Google Drive with 17 configured nodes.
2 way sync assignments completion between Canvas LMS and Notion
Syncs assignments and completion states to and fro between Canvas LMS and a Notion database. Automatically triggers every 2 hours during the schoolday by def...