Restore n8n Workflows Automatically from GitHub Backups

This workflow automates the restoration of n8n workflows directly from GitHub backups, eliminating manual recovery efforts after data loss. It fetches workflow files from a specified GitHub repo and recreates them in your n8n instance seamlessly.
manualTrigger
httpRequest
github
+5
Workflow Identifier: 1968
NODES in Use: Manual Trigger, Set, Sticky Note, HTTP Request, Split Out, GitHub, Extract from File, n8n

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What this workflow does

This workflow restores all your n8n workflows from backup files stored in a GitHub repository folder.

It fixes the problem of losing workflows by fetching, reading, and recreating them automatically in n8n.

You get all lost workflows back quickly without doing manual copy/paste or re-building them from zero.


Who should use this workflow

People who keep backups of n8n workflows in GitHub folders.

Those who want to quickly recover workflows after accidental deletion, server crashes, or migrations.

Anyone with admin and API access in n8n who needs a fast restore way.


Tools and services used

  • n8n with admin/API access: To recreate workflows inside n8n.
  • GitHub API with credentials: To list and read workflow JSON backup files in the repo.
  • GitHub repository: Contains workflow backup files stored as JSON under a specific folder path.

Inputs, processing steps, and output

Inputs

  • Your GitHub repository information: username/org, repo name, folder path for workflows.
  • GitHub API credentials set in n8n to authenticate API calls.
  • Manual trigger in n8n to start the restore workflow process.

Processing steps

  • Fetch list of all workflow files via GitHub API in the specified folder.
  • Split the list into individual file items to handle them one-by-one.
  • Retrieve each workflow’s raw JSON content from GitHub.
  • Parse JSON content from string format to usable JSON objects.
  • Create or restore each workflow inside the n8n system using its API.

Output

Workflows fully restored and visible in the n8n workflow editor.


Beginner step-by-step: How to use this workflow in n8n production

Download and import

  1. Click the Download button on this page to get the workflow file.
  2. Open your n8n editor and use the “Import from File” option.
  3. Upload the downloaded workflow file into n8n.

Configure credentials and details

  1. Go to the Globals node and update your GitHub repository info:
    repo.owner: your GitHub username or organization.
    repo.name: your repository name that holds backups.
    repo.path: folder path (usually workflows/).
  2. Add your GitHub API credentials in n8n Credentials if not done yet.
  3. Verify n8n API credentials have rights to create workflows.

Test and activate

  1. Run the workflow manually by clicking the Manual Trigger node’s Execute Workflow button.
  2. Check n8n executions for any errors and confirm workflows are restored.
  3. When happy, toggle the workflow to active on live n8n for use.

Make sure to back up current workflows before running to avoid overwriting.

For anyone using self-host n8n, this workflow works the same.


Common errors and fixes

  • GitHub authentication failed: Check GitHub API Key in n8n Credentials and update if expired or missing.
  • Workflow creation permission denied: Ensure n8n API user has admin rights and API key allows workflow creation.
  • Incorrect repository info: Make sure repo.owner, repo.name, and repo.path match exactly your GitHub repo structure.

Customization ideas

  • Change backup repo or folder anytime in the Globals node to restore from different backups.
  • Add a Filter node after splitting files to restore only selected workflows by filename.
  • Replace manual trigger with a Cron node to run restores on a schedule for testing backup validity.

Summary of results

✓ Automatically fetches all workflow files from GitHub backups.

✓ Restores each workflow in n8n without manual rebuilding.

✓ Saves hours by avoiding manual restoration steps and errors.

→ Workflows show up ready in n8n editor after running.

→ Users can update repo paths or filter workflows for tailored restore.


Frequently Asked Questions

The workflow calls GitHub’s API to list all files in the specified backup folder and then fetches each file’s content using API requests.
Admin or API access with rights to create workflows in n8n is required to restore workflows using this method.
Yes, by adding a Filter node after splitting files, users can select specific workflow files to restore.
This error usually happens due to invalid or missing GitHub API credentials configured in n8n.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free