Templates / Backup your credentials to GitHub

Backup your credentials to GitHub

Ready for 3.0

by Solomon ✓ · 14,551 views · created 2024-07-02 · DevOps

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 20 nodes and runs manually, when you click “Execute workflow” (plus 2 other triggers). Along the way it connects GitHub.

How it runs

Trigger: Manually, when you click “Execute workflow” (plus 2 other triggers).

  1. Execute Command: runs a shell command on the n8n host
  2. Globals (Edit Fields (Set)): sets 3 fields: repo.owner, repo.name, repo.path
  3. Merge: merges the data from its input branches
  4. JSON formatting (Code): runs custom JavaScript code
  5. isDiffOrNew (Code): runs custom JavaScript code
  6. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  7. Check Status (Switch): routes items into 3 branches
  8. Execute Workflow (Execute Sub-workflow): calls another n8n workflow
  9. Return (Edit Fields (Set)): sets 1 field: Done
  10. Edit existing file (GitHub): edit (file)

…plus 4 more steps. See the full node list below.

Services it uses

GitHub

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (14)

From the author

Based on Jonathan's work. Check out his templates. This workflow will backup your credentials to GitHub. It uses a CLI command to export all credentials. It then loops over the data, checks in GitHub to see if a file exists that uses the credential's ID. Once…

Excerpt from Solomon's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.