Deploy n8n workflows with GitHub-based version control
Ready for 3.0What this workflow does
This workflow has 22 nodes and runs when someone submits an n8n form (“🚀 DevOps Control Center”) (plus 1 other trigger). Along the way it connects GitHub.
How it runs
Trigger: When someone submits an n8n form (“🚀 DevOps Control Center”) (plus 1 other trigger).
- Fetch Local Workflow (n8n): get
- Build Error Response (Edit Fields (Set)): sets 5 fields: success, error, failed_node…
- Repo Config (Edit Fields (Set)): sets 3 fields: repoOwner, repoName, branch
- Build File Context (Code): runs custom JavaScript code
- Get GitHub File SHA (HTTP Request): calls an HTTP API
- Code: runs custom JavaScript code
- Content Changed? (If): checks a condition and branches into true / false
- GitHub File Exists? (If): checks a condition and branches into true / false
- No Changes Detected (Edit Fields (Set)): sets 5 fields: success, message, workflow_name…
- Update GitHub File (GitHub): edit (file)
…plus 10 more steps. See the full node list below.
Services it uses
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 (8)
- GitHub
n8n-nodes-base.github - HTTP Request
n8n-nodes-base.httpRequest - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - n8n Form Trigger
n8n-nodes-base.formTrigger - n8n
n8n-nodes-base.n8n - Error Trigger
n8n-nodes-base.errorTrigger
From the author
Say goodbye to messy JSON exports. Treat your n8n automations like real software with a built-in CI/CD pipeline. Manually moving workflows between testing and production is a recipe for versioning nightmares, overwritten data, and broken webhooks. This…