What This Workflow Does
This workflow backs up all workflows from n8n automatically. It solves the problem of manual exports that take time and can miss important data. After running, users get all workflow JSON files saved in Nextcloud storage, updated every 6 hours or on demand.
The workflow fetches all workflow IDs, then retrieves each workflow’s data. It shifts that data into binary files, ready for upload. Finally, it sends each file to a structured folder inside Nextcloud, using the original workflow name for easy findability.
Who Should Use This Workflow
This workflow is for anyone using n8n who wants easy automatic backups. It fits teams or users who change workflows often and want safe copies without manual work. It’s good for those running their own n8n instance or a hosted setup with REST API access.
If manual export is slow or prone to error, this backup workflow saves time. Even beginners with simple API knowledge can use it after setup.
Tools and Services Used
- n8n: For workflow automation and REST API access.
- Nextcloud: Stores backup JSON files.
- HTTP Request node: Grabs workflows and data from n8n.
- Function and FunctionItem nodes: Process and map data items.
- Move Binary Data node: Converts JSON to uploadable binary format.
- Manual Trigger and Cron nodes: Run backups on demand or schedule.
Inputs, Processing Steps, and Output
Inputs
- Access to n8n REST API endpoint to list workflows.
- Nextcloud credentials and folder to store backups.
- Manual or scheduled triggers to start the workflow.
Processing Steps
- Fetch the list of workflows by calling n8n API.
- Extract each workflow ID by mapping the list.
- Retrieve detailed JSON data for each workflow.
- Convert JSON data to binary format for file upload.
- Upload each binary workflow file to Nextcloud under a folder named after the workflow.
Output
JSON workflow files stored securely in Nextcloud, updated regularly or manually.
Beginner Step-by-Step: How to Use This Workflow in n8n
1. Download and Import the Workflow
- Use the Download button on this page to get the workflow file.
- Go to the n8n editor and choose “Import from File”.
- Select the downloaded workflow file and import it.
2. Configure the Workflow
- Add required credentials: set up your Nextcloud API credentials inside the Nextcloud node.
- Update API URLs in HTTP Request nodes if n8n runs outside localhost, including authentication headers if needed.
- If necessary, change Nextcloud paths or workflow IDs in expression fields to fit your setup.
3. Test the Workflow
- Use the Manual Trigger node to run the workflow once.
- Check execution logs to confirm workflows are uploaded to Nextcloud as JSON files.
4. Activate for Production
- Turn on the workflow toggle to activate it in n8n.
- The Cron node will run backups automatically on schedule.
- Monitor backup results regularly to ensure continued success.
This simple process helps users quickly apply the backup workflow without building it from zero.
Customization Ideas
- Change the backup interval by updating the Cron node’s schedule expression.
- Add timestamps to filenames in the Nextcloud node using expressions like
{{$now.toISOString()}}for versioning.
- Replace the Nextcloud node with other storage nodes such as S3 or FTP for different backup targets.
- Add email alerts using Gmail or SMTP nodes to get notified after each backup run.
- Filter workflows in the mapping step to backup only certain workflows by name or tag.
Troubleshooting and Pre-Production Tips
- If the HTTP Request nodes get “401 Unauthorized,” check and set API authentication for your n8n REST API server.
- If Nextcloud upload fails with permission errors, confirm credentials are correct and the target folder exists with upload rights.
- Test the manual trigger fully before enabling scheduled runs.
- Ensure no firewall blocks the REST API endpoints of your n8n instance, especially if using self-host n8n.
Summary
✓ You get automatic backups of all n8n workflows without manual export.
✓ The backup files are neatly saved as JSON in Nextcloud folders by workflow name.
✓ Backups happen every 6 hours or can run anytime manually.
✓ The solution reduces human errors and saves time on workflow recovery.
→ Workflow data stays secure and organized in Nextcloud.
