n8n

How to Automate Dropbox Workflow Backup Rotation?

Keep your n8n work safe with automatic backups to Dropbox. The flow runs on a schedule, saves fresh copies of all workflows, and clears files older than 30 days. It suits ops and IT teams that need hands free version history and quick restore points.

The run begins by setting a backup folder, then it lists current files and moves them into an old folder. A wait step makes sure the move is finished before new files upload. It then pulls every workflow from the n8n API, turns each one into a JSON file, and uploads to Dropbox using OAuth. A date check calculates the cutoff date, scans the old backups, and deletes anything older than the limit.

You only need a Dropbox account and n8n API access. Point the folder path to your chosen location, set a daily or hourly schedule, and adjust the retention days if needed. Expect backup time to drop from hours to minutes while storage stays clean and restore ready. This is helpful for teams that maintain many workflows or agencies that manage client instances.

What are the key features?

  • Scheduled runs create backups at the time you set, such as nightly or hourly.
  • Lists the current backup folder and moves existing files into an old subfolder.
  • Merge wait step ensures all moves finish before new uploads begin.
  • Pulls every workflow from the n8n API and prepares each as a JSON file.
  • Converts JSON to binary and names files using the workflow name for easy lookup.
  • Uploads files to Dropbox using OAuth with a clear path and folder structure.
  • Calculates a purge date by subtracting 30 days from the current date.
  • Checks file dates in the old folder and deletes anything older than the cutoff.
  • Filters out folders so only files are moved and cleaned.

What are the benefits?

  • Reduce manual backup work from 60 minutes to 5 minutes per run
  • Automate 100 percent of rotation and cleanup with no scripts
  • Keep up to 30 days of restore points by default
  • Connect n8n and Dropbox with secure OAuth in a few clicks
  • Prevent stale files and control storage growth with scheduled purge

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Dropbox and n8n. See the Tools Required section above for links to create accounts with these services.
  3. Open the UPLOAD WORKFLOWS Dropbox node. In the 'Credential to connect with' dropdown, click 'Create new credential', choose Dropbox OAuth2, then follow the on screen steps to grant access. Name it something clear like Dropbox Backup.
  4. Open the GET WORKFLOWS node. In the credential dropdown, click 'Create new credential' for n8n API. Follow the on screen steps. Provide your n8n base URL and API token if requested. Name it n8n API Backups.
  5. In the DESTINATION FOLDER Set node, confirm the folder path such as /n8n_backups/. Create this folder in Dropbox if it does not exist.
  6. In Dropbox, add an old subfolder inside your backup folder. For example, create /n8n_backups/old so the move step has a valid target.
  7. Open the Schedule Trigger node and set a daily or hourly schedule based on how often you change workflows.
  8. Adjust retention by opening the PURGE DAYS DateTime node and set the duration value. The default keeps 30 days.
  9. Run the workflow once. Check Dropbox to confirm current files were moved into the old folder and new JSON backups appeared with the correct names.
  10. Test cleanup by temporarily lowering the retention to 1 day, running again, and confirming older files in the old folder are deleted. Set it back to your normal value after testing.
  11. If uploads fail, reauthenticate the Dropbox credential and verify the path in the UPLOAD WORKFLOWS node. If no workflows appear, check the n8n API credential and base URL.
  12. When all checks pass, activate the workflow in n8n so it runs on the schedule.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Dropbox

Sign up

Basic (Free): $0 / mo; API access supported with a free Dropbox account

n8n API

Sign up

Community Edition (self-hosted): $0 (public REST API available). Cloud Starter: $20 / mo billed annually ($24 monthly); API unavailable during free trial.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.