n8n

How to Restore GitHub Backups for n8n Recovery?

Recover your n8n instance from a GitHub repo in minutes. Use this setup to pull workflow backups from a folder and rebuild them without manual steps. It suits teams that version control n8n and need fast restore after changes or outages.

The run starts on a manual click. A Globals node stores the repo owner, repository name, and folder path. An HTTP Request lists files in that path using the GitHub API. The flow then splits the list, fetches each file with the GitHub node, converts the JSON content to data, and sends it to the n8n API to create workflows. This sequence replaces copy and paste and keeps your instance aligned with the repo.

Set the repo values in the Globals node, connect your GitHub credential, and connect your n8n API key. Keep each backup as a valid n8n JSON file in the chosen folder. Expect restore time to drop from hours to minutes, which helps with disaster recovery, staging to production sync, and setting up new environments fast.

What are the key features?

  • Manual trigger lets you run restores on demand for full control.
  • Globals node centralizes repo owner, repository name, and folder path settings.
  • HTTP Request lists all files in the chosen repo path using the GitHub API.
  • Split Out processes each file path one by one for stable imports.
  • GitHub node downloads the content of each backup file.
  • Extract from File converts JSON text to structured data ready for import.
  • n8n node creates workflows by calling the n8n API with the parsed data.
  • Uses authenticated calls so private repositories and secured n8n instances are supported.

What are the benefits?

  • Reduce manual restore work from 2 hours to 5 minutes
  • Automate up to 95 percent of restore steps
  • Improve accuracy by importing exact JSON backups
  • Handle hundreds of workflows in one run
  • Connect GitHub and n8n without custom scripts

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with GitHub and n8n. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create a GitHub credential. If unsure, double click the GitHub nodes, choose the 'Credential to connect with' dropdown, click 'Create new credential', and follow the on screen steps. For a personal access token, grant repo read permissions so contents can be listed and fetched.
  4. In the n8n credentials manager, create an n8n API credential. If unsure, double click the n8n node, create a new credential, then enter your n8n base URL and API key. You can create an API key in your n8n settings if needed.
  5. Open the Globals node and set repo.owner, repo.name, and repo.path. Include a trailing slash in the path if your backups live in a folder.
  6. Open the HTTP Request node and select your GitHub credential. Confirm the URL expression points to the repo owner, repository name, and path from the Globals node.
  7. Open the GitHub node and select the same GitHub credential. Verify the owner, repository, and filePath fields match your repo and that filePath reads the path from the previous step.
  8. Open the n8n node and select your n8n API credential. Confirm operation is set to create and the workflow data field maps to the parsed JSON from the previous node.
  9. Click Execute Test. Check that the HTTP Request node returns a list of files, the GitHub node outputs file content, and the Convert step returns valid JSON data.
  10. Open your n8n Workflows list and confirm new workflows appear. If duplicates show up, clear test data before running again.
  11. Troubleshoot common issues: 401 errors mean credentials are wrong or missing access, 404 errors often mean the path is incorrect, invalid JSON means the backup file is not a valid n8n export, and rate limits can be avoided by reducing the number of files per run.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

GitHub

Sign up

Free tier: $0 / mo

n8n API

Sign up

Community Edition (self-hosted): $0 (public REST API available). Cloud Starter: $20 / mo billed annually ($24 monthly); API unavailable during free trial.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.