Templates / Sync staging n8n workflows to GitHub via pull request

Sync staging n8n workflows to GitHub via pull request

Ready for 3.0

by Adriaan van Niekerk ✓ · 3 views · created 2026-09-05 · 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 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).

  1. Set publish variables (Edit Fields (Set)): sets or maps fields
  2. Get n8n workflow JSON (HTTP Request): calls an HTTP API
  3. Strip workflow metadata (Code): runs custom JavaScript code
  4. Get a repository (GitHub): uses GitHub
  5. Convert JSON to file (Convert to File): converts data to a file
  6. Get main branch SHA (HTTP Request): calls an HTTP API
  7. Create Github Repo (HTTP Request): calls an HTTP API
  8. Extract JSON from file (Extract from File): extracts data from a file
  9. Create Github branch (HTTP Request): calls an HTTP API
  10. Merge: merges the data from its input branches

…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 (10)

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…

Excerpt from Adriaan van Niekerk'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.