n8n

How to Automate n8n Google Drive Backups?

Keep your automation safe without extra work. This setup copies all n8n workflows to Google Drive on a set schedule, moves yesterday’s files into an archive folder, and can remove old backups after a set number of days. It suits teams that want simple version safety and easy file access in Drive.

Here is how it runs. A scheduled trigger starts the job. The flow checks Google Drive for two folders and creates them if they do not exist. The n8n API pulls your workflows, then a file builder turns each workflow into a file and adds the active or inactive status to the file name. Files upload to the backups folder in batches. Before new uploads, current files are moved into the archive folder. A second schedule can list archive files and delete any that are older than your purge rule. A filter step avoids touching other Drive folders.

You will need a Google Drive account and an n8n API key. Connect both inside n8n credentials, set your run time, and pick the purge window if you want cleanup. Expect to cut manual exports and file moves to almost zero, while keeping a clean history. This is helpful for IT teams, agencies, or any group managing multiple n8n workflows.

What are the key features?

  • Two schedule triggers control nightly backups and timed cleanup.
  • Google Drive folder check and auto creation for backups and archive.
  • n8n API fetches all workflows with an adjustable limit.
  • Move Binary Data builds files and tags names with active or inactive status.
  • Batch upload sends files to Google Drive until all items are done.
  • Safe rotation moves current files into the archive folder before new uploads.
  • Purge rule lists archive files and deletes ones older than your set age.
  • Filter step ignores unrelated Drive folders to avoid unwanted changes.

What are the benefits?

  • Reduce manual export work from 60 minutes to 5 minutes per day
  • Automate 100 percent of backup rotation and cleanup
  • Improve backup accuracy by pulling directly from the n8n API
  • Handle large sets of workflows using batch uploads
  • Connect n8n and Google Drive in one reliable routine

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 Google Drive and n8n. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create a Google Drive OAuth2 credential. Or double click any Google Drive node, choose 'Credential to connect with', click 'Create new credential', then follow the on screen steps to connect your Google account.
  4. Open the n8n API node. In the 'Credential to connect with' dropdown, click 'Create new credential'. Enter your n8n API key and base URL. Name the credential clearly, for example n8n API Production.
  5. Open the Schedule Trigger that starts the backup. Set the time you want the backup to run, such as every night.
  6. Open the second Schedule Trigger for cleanup. Enable it only if you want auto delete. Set how often it should run, such as daily or weekly.
  7. Check the Google Drive nodes for the backup and archive folder names. Keep them consistent across all nodes so files are found and moved correctly.
  8. If you have many workflows, adjust the limit in the n8n API node. The batch nodes will loop until all files are uploaded.
  9. Run the workflow once manually to test. Confirm that the backup and archive folders are created in Google Drive and that new files appear in the backups folder.
  10. Verify rotation by running a second time. The previous backup files should move into the archive folder before new files upload.
  11. If you enabled cleanup, confirm that archive files older than your set age are removed after the cleanup schedule runs.
  12. Troubleshoot common issues: if you see a permission error, reconnect the Google Drive credential. If folders are not found, check exact names. If no files upload, verify the n8n API key and base URL.

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.

Google Drive

Sign up

Drive API: $0 (no additional cost; quota-limited)

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.