Templates / Backup your workflows to GitHub

Backup your workflows to GitHub

Ready for 3.0

by Solomon ✓ · 13,461 views · created 2024-12-18 · 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 19 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. n8n: uses n8n
  2. Globals (Edit Fields (Set)): sets 3 fields: repo.owner, repo.name, repo.path
  3. Merge: merges the data from its input branches
  4. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  5. Get file data (GitHub): get (file)
  6. isDiffOrNew (Code): runs custom JavaScript code
  7. Execute Workflow (Execute Sub-workflow): calls another n8n workflow
  8. If: checks a condition and branches into true / false
  9. Check Status (Switch): routes items into 3 branches
  10. Get File (HTTP Request): calls an HTTP API

…plus 3 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. How it works This workflow will backup your workflows to GitHub. It uses the n8n API node to export all workflows. It then loops over the data, checks in GitHub to see if a file exists that uses the…

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.