# n8n workflow backup to Nextcloud with retention of 7 latest copies
This automation ensures reliable, scheduled backups of all active n8n workflows to Nextcloud, with automatic cleanup of older copies beyond the last 7. Ideal for users who rely on stable, production-grade automation systems and need robust disaster recovery.
## Who it´s for
- n8n administrators needing regular workflow backups
- DevOps engineers using self-hosted automation platforms
- Teams running n8n in production environments requiring resilience
- Freelancers managing multiple client workflows
## What the automation does
- Triggers on schedule (cron) or manually
- Fetches all active workflows via n8n API
- Creates a timestamped folder in Nextcloud
- Exports each workflow as a JSON file and uploads it
- Checks the /N8N-Backup folder and keeps only the 7 most recent directories
- Deletes older backups to maintain storage hygiene
## What´s included
- Ready-to-use workflow for n8n + Nextcloud automation
- Trigger and handler logic (cron_schedule, execute_workflow_trigger)
- Integrations with n8n API and Nextcloud API
- Basic textual instructions for launch and adaptation
## Requirements for setup
- Access to an n8n instance with API enabled
- Nextcloud account with write permissions to the target directory
- API keys or credentials for authenticating both services
## Benefits and outcomes
- Full autonomy from manual workflow exports
- Protection against loss of critical automations
- Structured backup history with clear versioning
- Eliminates manual tracking of retention policies
- Enables fast recovery after errors or system failures
- Centralized, transparent backup storage
## Important: template only
Important: you are purchasing a ready-made automation workflow template only. Rollout into your infrastructure, connecting specific accounts and services, 1:1 setup help, custom adjustments for non-standard stacks and any consulting support are provided as a separate paid service at an individual rate. To discuss custom work or 1:1 help, contact via chat
No feedback yet