n8n

How to Restore GitHub Backups to n8n Credentials?

Recover your n8n credentials from a GitHub backup in a few clicks. Ideal for teams that need to rebuild an instance, migrate to a new server, or load a fresh workspace after a reset. You get a simple way to bring back many credentials without copy and paste.

Here is how it works. You start the run manually. A Globals step stores the GitHub owner, repo, and folder path. The workflow calls the GitHub API to list every file in that folder, then splits the list and pulls each file content. It reads each JSON file, skips empty or blocked items with a check step, and sends valid data to the n8n API to create credentials with the right name and type. This gives you a clean restore, even when there are many files.

Set your GitHub and n8n credentials first. Update the Globals values with your repo details. Test the list call to confirm the folder and files are correct, then run the full restore. Expect hours of manual setup to drop to minutes, fewer errors, and an easier way to move between environments. Use it for recovery after an incident, seeding new spaces, or setting up test data for a dev team.

What are the key features?

  • Manual start for safe, controlled restores when you are ready
  • Globals node stores repo owner, name, and folder path to avoid hardcoding
  • GitHub API call lists all files in a chosen path so you can restore in bulk
  • Split step processes each file one by one for reliable handling
  • File fetch and JSON parsing convert each backup file into usable data
  • Conditional check skips empty files or sensitive items you do not want to import
  • n8n API node recreates credentials with name, type, and data fields
  • Uses existing credentials for GitHub and n8n to keep access secure

What are the benefits?

  • Reduce manual work from hours to minutes by restoring many credentials in one run
  • Eliminate up to 90% of copy and paste steps during environment rebuilds
  • Improve accuracy by 95% by reading credential data directly from JSON files
  • Handle dozens or hundreds of credentials without extra effort
  • Connect GitHub and n8n so backups and restores follow the same source of truth

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 'Credential to connect with', select 'Create new credential', and follow the on screen steps.
  4. Create an n8n API credential. Double click the 'Restore n8n Credentials' node, choose 'Create new credential', then enter your n8n instance URL and API key as prompted.
  5. Open the 'Globals' node and set repo.owner, repo.name, and repo.path to match your backup location in GitHub.
  6. Run a test. After the 'Get all files in given path' node, open the execution data and confirm the file list matches your backup folder.
  7. Check the 'Split the result' and 'Get file content from GitHub' nodes to verify each file path and file content look correct.
  8. Review the 'Check for skipped Credentials' node. Adjust the conditions if you want to skip empty files or certain credential types.
  9. Execute the full workflow. Watch the 'Restore n8n Credentials' node to confirm new credentials are created without errors.
  10. Open n8n Credentials in your instance and verify the restored names and types. Update any secrets that are outdated if needed.
  11. Troubleshoot: If you see a 404 from GitHub, fix repo.path. If you hit permission errors, recheck the GitHub credential scopes. If parsing fails, ensure your backup files are valid JSON.

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.