Templates / Back up your n8n workflows to Github

Back up your n8n workflows to Github

Ready for 3.0

by Jonathan ✓ · 104,318 views · created 2022-03-17 · 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 23 nodes and runs manually, when you click “Execute workflow” (plus 2 other triggers). Along the way it connects GitHub and Slack.

How it runs

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

  1. Starting Message (Slack): uses Slack
  2. Config (Edit Fields (Set)): sets 3 fields: repo_owner, repo_name, repo_path
  3. n8n: uses n8n
  4. Get file data (GitHub): get (file)
  5. Merge: merges the data from its input branches
  6. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  7. If: checks a condition and branches into true / false
  8. isDiffOrNew (Code): runs custom JavaScript code
  9. Completed Notification (Slack): uses Slack
  10. Execute Workflow (Execute Sub-workflow): calls another n8n workflow

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

Services it uses

GitHubSlack

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 (15)

From the author

This workflow will backup your workflows to Github. It uses the public api to export all of the workflow data using the n8n node. It then loops over the data checks in Github to see if a file exists that uses the workflow name. Once checked it will then…

Excerpt from Jonathan'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.