Relying on manual backups is the surest way to never actually do them. You remember when it's too late. That's why I built an n8n workflow that does one thing, but does it well: it saves everything I need, automatically, and tells me when it's done. In this article I'll show you exactly how I set it up.

What We Save and Where

Before building any automation, you need to decide what is actually worth protecting. In my case, there are three irreplaceable things:

  • Workflow JSON files: every n8n workflow can be exported as a JSON file. It's the heart of everything — logic, nodes, connections. Without this you start from scratch.
  • Configurations: environment variables, instance settings, project folder structure. Not huge, but rebuilding them by hand is frustrating.
  • Credentials (handled with care): n8n exports them encrypted. I save them separately and never in plain text — this is not a point to compromise on.

The destination is Google Drive. It's not the most "enterprise" choice in the world, but it's free at my volumes, has built-in versioning, and I can access it from any device. For a freelancer or a small studio it's more than enough. I created a dedicated n8n-backups folder with subfolders by date, so finding an old version is immediate.

The golden rule of backups is 3-2-1: three copies, on two different media, one of them off-site. Google Drive covers the off-site part without me having to think about it.

The Backup Workflow Step by Step

The nice thing about n8n is that an automation like this reads like a sentence. Here's the chain of nodes I built:

  1. Cron trigger (every 4 hours): the Schedule Trigger node fires at 00:00, 04:00, 08:00 and so on. Four hours is my compromise between "I always have a recent copy" and "I don't clog Drive with useless files." Tune it to your own working rhythm.
  2. Export via n8n API: an HTTP Request node calls my instance's REST API (/rest/workflows) and retrieves all workflows as JSON. Alternatively, on self-hosted instances you can use the CLI command n8n export:workflow --all inside an Execute Command node.
  3. Upload to Google Drive: the Google Drive node uploads the JSON into the day's folder. The filename includes date and time (workflows-2026-06-11_0800.json), so I never overwrite a previous backup.
  4. Telegram notification: the Telegram node sends me a message like "Backup complete: 14 workflows saved (218 KB)". One glance at my phone tells me everything's fine.

The whole chain runs in under ten seconds and requires no manual intervention. Once it's on, you forget about it — which is exactly what you want from a backup.

Adding Integrity Checks

A backup that exists but is corrupted is worse than no backup at all, because it gives you false confidence. That's why after the upload I added a second block of nodes dedicated to verification:

  • Does the file actually exist? A Google Drive (Get) node re-reads the file just uploaded and checks that it's present and its size is greater than zero.
  • Is the JSON valid? A Code node tries to parse the content with JSON.parse(). If the file is truncated or corrupted, parsing fails and the error is caught.
  • Does the workflow count match? I compare the number of workflows in the saved file against what the API returns. If the numbers don't match, something went wrong during export.

If any of these checks fail, an IF node routes the flow to an alert Telegram notification — complete with a red emoji, because among twenty routine messages that one needs to stand out. Better to discover a problem right away than during an emergency.

Results After 3 Months of Use

The numbers are the most satisfying part. Since I turned the workflow on:

  • 540+ total backups generated automatically (6 a day × ~90 days), without me touching anything.
  • Zero data loss: I had to do one restore, after a failed update, and I recovered the state from 4 hours earlier in under two minutes.
  • 3 integrity alerts received — all due to an instance restart during export. The check did exactly its job, avoiding saving broken files.
  • ~1.2 GB used on Drive, very manageable. I added a small cleanup node that deletes backups older than 60 days.
The real value isn't in the 540 backups I never opened. It's in that one two-minute restore that saved me a week of work.

Conclusion

Automating your workflow backups is one of those projects that pays for itself the first time you need it — and then keeps paying off by staying invisible. The logic is simple, the tools are free, and once it's running you don't think about it anymore.

If you run automations that matter for your work and don't have an automatic backup yet, this is the moment to build one. And if you want a hand setting it up on your own infrastructure, just write to me: I'll design the workflow together with you.