This repository demonstrates automated export and versioning of n8n workflows using Bash, Git, and GitHub Actions.
- Exports all active workflows from n8n via API
- Saves each workflow in structured folders by funnel/category
- Removes sensitive data before commit
- Commits and pushes only changed files
- Copy
.env.templateto.envand fill in your n8n API URL and token. - Make sure you have
jqandcurlinstalled. - Run
bash export_n8n.shlocally or rely on the scheduled GitHub Action. - Workflows are saved in
funnels/<category>/workflow_<id>.json.
The workflow in .github/workflows/export_n8n.yml runs the export every 4 hours and pushes changes automatically.
- Secrets and credentials are stripped before saving.
.envis gitignored.