Developer & DevOps

[] Restore workflow from GitHub to n8n

17 nodes 209 119 Automatic trigger
Download

Workflow Description

This automation template retrieves workflow definitions stored in a GitHub repository and restores them directly to your n8n account, providing a reliable backup and recovery mechanism for critical processes without data loss.

How it works

  1. 1.Trigger the process manually or enable automatic activation when the repository updates
  2. 2.Fetch workflow files from GitHub using the GitHub API
  3. 3.Transform and parse retrieved data into n8n's standard format
  4. 4.Validate data integrity and check required conditions before import
  5. 5.Import workflows to n8n using the n8n API
  6. 6.Log results and capture any errors encountered during restoration

Use cases

  • Restore a deleted or corrupted workflow from a GitHub backup
  • Duplicate workflows across different n8n accounts or instances
  • Use GitHub as a version control source for managing workflow configurations
  • Automate team workflow recovery with a single trigger

Requirements

  • A GitHub repository containing workflow files in JSON format
  • Valid API tokens for both GitHub and n8n authentication
  • Sufficient permissions to read from GitHub and write to n8n

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

GitHub N8N

Details

Trigger Automatic trigger
Nodes 17
Apps 2
Views 209
Downloads 119

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (17)

/

On clicking 'execute'

Manual Trigger

#1

Globals

Set

#2

Note

Sticky Note

#3

Workflow name already exists

No Op

#4

If workflow already exists

If

#5

Set n8n existing workflows names

Set

#6

GitHub - get all files

Github

#7

n8n - get all workflows

N8N

#8

GitHub - get each file

Github

#9

Set name and content

Set

#10

n8n - create workflow

N8N

#11

Note1

Sticky Note

#12

Merge globals and files

Merge

#13

Merge Github and n8n workflows - Keep only non existing workflows based on the name

Merge

#14

Note2

Sticky Note

#15

Note3

Sticky Note

#16

Note4

Sticky Note

#17