n8n

How to Restore GitHub Backups to n8n Workflows?

Recover lost or new environments fast by loading workflow backups from GitHub straight into n8n. It finds files in your repo and creates only the workflows that are missing. Teams use it after a reset, a move to a new space, or when setting up a fresh tenant.

Start it by clicking execute. A Globals step holds your repo owner, repo name, and folder path. The flow lists all files in that folder, fetches each file, and decodes the base64 content into readable JSON. It also pulls all current workflows from n8n, builds a list of names, and compares the two lists. Only names not found in n8n move forward. A final check prevents any edge case duplicates. The create step uses the stored JSON and the file name to build each workflow.

You need GitHub access to a repository that stores exported n8n workflow JSON files and an n8n API credential with rights to read and create workflows. Expect restore time to drop from hours to minutes while avoiding manual errors. Ideal for disaster recovery, workspace migrations, and keeping staging and production aligned without copy paste.

What are the key features?

  • Manual start so you control when recovery runs
  • Globals store repo owner, repo name, and folder path for easy reuse
  • GitHub file list step scans the chosen repository folder
  • Per file fetch decodes base64 content into clean JSON
  • n8n list step gathers all current workflows and extracts names
  • Merge logic keeps only items that do not exist in n8n
  • If check adds a final guard to skip any remaining duplicates
  • Create step builds each workflow in n8n using file name and content

What are the benefits?

  • Reduce manual restore work from 2 hours to 5 minutes
  • Eliminate 100 percent of duplicate imports by name matching
  • Handle 10 times more workflows without extra effort
  • Connect GitHub and n8n so backups become a reliable source
  • Improve data quality by importing exact JSON from source files

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, open the GitHub nodes by double clicking them, choose Credential to connect with, click Create new credential, then follow the on screen steps. Use a token with repo read access or authorize with OAuth.
  4. For the n8n API nodes, double click the n8n nodes, choose Credential to connect with, click Create new credential, then follow the on screen steps. Use an account or token that can read and create workflows. Name credentials clearly for your workspace.
  5. Open the Globals node and fill repo.owner, repo.name, and repo.path. Make sure repo.path points to the folder that contains your exported workflow JSON files.
  6. Confirm your GitHub repository holds valid n8n workflow JSON exports in the folder set in repo.path. Keep file names aligned with workflow names if you want exact name matching.
  7. Test GitHub access: run the GitHub list files node. If you see no files, check the folder path and your token permissions.
  8. Test file decoding: run the GitHub get file node and the Set name and content node. Verify that content is decoded JSON and that a name is present.
  9. Fetch current items: run the n8n get all workflows node and confirm names appear in the Set n8n existing workflows names step.
  10. Run the full workflow by clicking execute. Check the Merge keep non matches step to see only items that will be created. Duplicates should route to the Workflow name already exists path.
  11. Validate results in your n8n workflows list. If nothing is created, confirm that names actually differ from existing items or adjust the name mapping in Set name and content and the merge join fields.
  12. If errors appear, verify repo.path formatting, token scopes, and that files are valid n8n workflow JSON exports.

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.