CLI tool to sync n8n workflows between environments (staging → production) without paying for n8n Enterprise source control (€667/month).
Uses the n8n REST API (available in self-hosted n8n 0.214+).
npm install -g github:jchandler187/n8n-syncn8n-sync pull \
--host http://staging.example.com \
--api-key n8n_api_... \
--output ./staging-workflowsDownloads all workflows as JSON files to ./staging-workflows/.
n8n-sync push \
--input ./staging-workflows \
--host http://prod.example.com \
--api-key n8n_api_... \
--cred-map staging-postgres:prod-postgres,staging-redis:prod-redisCreates new workflows or updates existing ones by name match.
--cred-map remaps credential names between environments (comma-separated src:dest pairs).
n8n-sync diff \
--src http://staging.example.com --src-key n8n_api_... \
--dest http://prod.example.com --dest-key n8n_api_...Shows:
- Workflows only in staging (not yet deployed)
- Workflows only in production (deleted from staging)
- Workflows with node-level changes
# On deploy day: see what's different
n8n-sync diff --src http://staging:5678 --src-key $STAGING_KEY \
--dest http://prod:5678 --dest-key $PROD_KEY
# Deploy staging → prod
n8n-sync pull --host http://staging:5678 --api-key $STAGING_KEY --output /tmp/release
n8n-sync push --input /tmp/release \
--host http://prod:5678 --api-key $PROD_KEY \
--cred-map staging-postgres:prod-postgresIn n8n: Settings → n8n API → Create an API key
Requires n8n 0.214+ (self-hosted). Works with any version of n8n that exposes /api/v1/.
n8n Enterprise (€667/month) is the only first-party way to sync workflows between environments.
This tool uses the public n8n REST API to do the same thing for free.