Automatic Backup of Workflows to GitHub with Email/Telegram Notifications

Nodes

2e3e39e3-0e17-4fae-9ac5-9ee31f9711ed3b9f1b78-6b80-4575-aa6c-966987000389ccc8d19f-f0b3-4730-899f-8023aeb547e4+1

Categories

Created by

BuBuilds.Cool

Last edited 56 days ago

Why?

Have you ever updated your n8n instance, or moved from one instance to the other and lost all your workflows? I suggest NOT DOING THAT! Especially if you have very complex workflows that would take days to recreate.

Make sure you have a backup process in place!

How it works

  1. Get all workflows from an n8n instance using your n8n API
  2. Formats the workflows cleanly
  3. Creates a backup package
  4. Checks if target GitHub repository exists, if not creates it
  5. Uploads a manifest
  6. Uploads a readme
  7. Uploads your workflows as separate JSON files
  8. Sends a summary to your choice (Telegram or GMAIL)

What it does

  • Backs up all your workflows
  • Splits them out into separate JSON files for each workflow
  • Sends a notification

What it doesn't do

  • Does not back up credentials (not smart for security reasons)
  • Does not delete old backups

Requirements

  • n8n
  • n8n API setup with credentials stored in instance you are running this from
  • GitHub user & API (with repository rights) setup (API key in Github, Credentials in n8n)

Future Updates

If I get requests for these features I would build them:

  • Rolling backups (delete further back than 3 days)
  • Logic to skip the backup if nothing changed

New to n8n?

Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!