Sync staging n8n workflows to GitHub via pull request
Ready for 3.0Ready 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 16 nodes and runs on n8n instance events (plus 1 other trigger). Along the way it connects GitHub.
How it runs
Trigger: On n8n instance events (plus 1 other trigger).
- Set publish variables (Edit Fields (Set)): sets or maps fields
- Get n8n workflow JSON (HTTP Request): calls an HTTP API
- Strip workflow metadata (Code): runs custom JavaScript code
- Get a repository (GitHub): uses GitHub
- Convert JSON to file (Convert to File): converts data to a file
- Get main branch SHA (HTTP Request): calls an HTTP API
- Create Github Repo (HTTP Request): calls an HTTP API
- Extract JSON from file (Extract from File): extracts data from a file
- Create Github branch (HTTP Request): calls an HTTP API
- Merge: merges the data from its input branches
…plus 4 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 (10)
- GitHub
n8n-nodes-base.github - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Extract from File
n8n-nodes-base.extractFromFile - Convert to File
n8n-nodes-base.convertToFile - Merge
n8n-nodes-base.merge - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - n8n Trigger
n8n-nodes-base.n8nTrigger
From the author
Quick Overview This workflow takes a published workflow from a staging n8n instance, cleans noisy metadata, commits the JSON to a GitHub repository on a new branch, and opens a pull request against a base branch so workflow changes can be promoted via a…