Skip to main content

Automatic backup of workflows to GitHub with email/telegram notifications

Workflow preview

Workflow preview
100%
Automatic backup of workflows to GitHub with email/telegram notifications preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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...

Best for

  • DevOps automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.if, n8n-nodes-base.splitinbatches, n8n-nodes-base.telegram, n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Builds.Cool.

Original n8n.io source

1.1 Workflow description

Title
Automatic backup of workflows to GitHub with email/telegram notifications
Workflow name
Automatic backup of workflows to GitHub with email/telegram notifications

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

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Create_Backup_Package

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 3 - Get_Workflows

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - Check_Repository_Exists

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - If_Repo_Not_Exists

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 6 - Clean_Workflows

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Create_Repository

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 8 - Split_Workflow_Files

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Backup_Complete_Summary

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Upload_Workflow_Files

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 11 - Upload_README

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 12 - Upload_Manifest

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 13 - Loop_Workflow_Uploads

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 14 - Send_Backup_Notification

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 15 - Backup_Config

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Daily

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 19 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Gmail - Notification

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 21 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Automatic backup of workflows to GitHub with email/telegram notifications
Complexity advanced
Nodes 21
Categories DevOps
Author Builds.Cool
Published 13 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4923/4923.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automatic backup of workflows to GitHub with email/telegram notifications do?

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...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps use case.