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
Restore n8n workflows with GitHub

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

Learn how to Build this Workflow with AI:

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


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.


Restore n8n workflows with GitHub

Visit through Desktop to Interact with the Workflow.

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 Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.