- Update rebuild script to automatically sanitize templates after node processing - Update documentation to reflect GitHub push protection changes - Add notes about template sanitization in n8n update process - Ensures databases are always clean before push This prevents GitHub push protection from blocking database updates due to API tokens in workflow templates. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
2.8 KiB
2.8 KiB
n8n Update Process - Quick Reference
Quick Steps to Update n8n
When there's a new n8n version available, follow these steps:
# 1. Update n8n dependencies automatically
npm run update:n8n
# 2. Validate the update
npm run validate
# 3. Commit and push
git add -A
git commit -m "chore: update n8n to vX.X.X
- Updated n8n from X.X.X to X.X.X
- Updated n8n-core from X.X.X to X.X.X
- Updated n8n-workflow from X.X.X to X.X.X
- Updated @n8n/n8n-nodes-langchain from X.X.X to X.X.X
- Rebuilt node database with XXX nodes
- Sanitized XXX workflow templates (if present)
- All validation tests passing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>"
git push origin main
What the Commands Do
npm run update:n8n
This single command:
- Checks for the latest n8n version
- Updates n8n and all its required dependencies (n8n-core, n8n-workflow, @n8n/n8n-nodes-langchain)
- Runs
npm installto update package-lock.json - Automatically rebuilds the node database
- Sanitizes any workflow templates to remove API tokens
- Shows you exactly what versions were updated
npm run validate
- Validates critical nodes (httpRequest, code, slack, agent)
- Shows database statistics
- Confirms everything is working correctly
Important Notes
- Always run on main branch - Make sure you're on main and it's clean
- The update script is smart - It automatically syncs all n8n dependencies to compatible versions
- Database rebuild is automatic - The update script handles this for you
- Template sanitization is automatic - Any API tokens in workflow templates are replaced with placeholders
- Docker image builds automatically - Pushing to GitHub triggers the workflow
GitHub Push Protection
As of July 2025, GitHub's push protection may block database pushes if they contain API tokens in workflow templates. Our rebuild process now automatically sanitizes these tokens, but if you encounter push protection errors:
- Make sure you've run the latest rebuild with
npm run rebuild - Verify sanitization with
npm run sanitize:templates - If push is still blocked, use the GitHub web interface to review and allow the push
Time Estimate
- Total time: ~3-5 minutes
- Most time is spent on
npm installand database rebuild - The actual commands take seconds to run
Troubleshooting
If validation fails:
- Check the error message - usually it's a node type reference issue
- The update script handles most compatibility issues automatically
- If needed, check the GitHub Actions logs for the dependency update workflow
Alternative: Check First
To see what would be updated without making changes:
npm run update:n8n:check
This shows you the available updates without modifying anything.