MEMORY_N8N_UPDATE.md
CRITICAL FIRST STEP: Check existing releases to avoid version conflicts!
IMPORTANT: Community nodes are preserved incrementally!
npm run update:n8n rebuilds the base node DB (wipes community nodes temporarily)npm run fetch:community now upserts by default (preserves READMEs + AI summaries)npm run generate:docs:incremental only processes nodes missing docsgenerate:docs:readme-only first, then generate:docs:summary-only with a local LLM# 1. CHECK EXISTING RELEASES FIRST (prevents version conflicts!)
gh release list | head -5
# Look at the latest version - your new version must be higher!
# 2. Switch to main and pull
git checkout main && git pull
# 3. Check for updates (dry run)
npm run update:n8n:check
# 4. Back up community nodes BEFORE update (update:n8n rebuilds base DB!)
sqlite3 data/nodes.db ".mode insert nodes" "SELECT * FROM nodes WHERE is_community = 1;" > /tmp/n8n_community_backup.sql
# 5. Run update and skip tests (we'll test in CI)
yes y | npm run update:n8n
# 6. Restore community nodes after rebuild
sqlite3 data/nodes.db < /tmp/n8n_community_backup.sql
# 7. Refresh community nodes (upserts - preserves existing READMEs + AI summaries!)
npm run fetch:community
# NOTE: Default mode is now "upsert" - no deletion. Use --rebuild for clean slate.
# 8. Generate docs incrementally (only for new/missing nodes)
npm run generate:docs:readme-only # Fetch READMEs from npm (no LLM needed)
# Then with a local LLM server running (LM Studio, vLLM, Ollama):
N8N_MCP_LLM_BASE_URL="http://YOUR_SERVER:PORT/v1" \
N8N_MCP_LLM_MODEL="your-model-name" \
node dist/scripts/generate-community-docs.js --summary-only --skip-existing-summary --llm-concurrency=11
# For vLLM with thinking models, the code auto-sends chat_template_kwargs: {enable_thinking: false}
# Context length needed: 8K minimum (README truncated to 6000 chars, output max 2000 tokens)
# 9. Create feature branch
git checkout -b update/n8n-X.X.X
# 10. Update version in package.json (must be HIGHER than latest release!)
# Edit: "version": "2.XX.X" (not the version from the release list!)
# 11. Update CHANGELOG.md
# - Change version number to match package.json
# - Update date to today
# - Update dependency versions
# - Include community node refresh counts
# 12. Update README badge and node counts
# Edit line 8: Change n8n version badge to new n8n version
# Update total node count in description (core + community)
# 13. Commit and push
git add -A
git commit -m "chore: update n8n to X.X.X and bump version to 2.XX.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 (XXX from n8n-nodes-base, XXX from @n8n/n8n-nodes-langchain)
- Refreshed community nodes (XXX verified + XXX npm)
- Updated README badge with new n8n version and node counts
- Updated CHANGELOG with dependency changes
Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>"
git push -u origin update/n8n-X.X.X
# 14. Create PR
gh pr create --title "chore: update n8n to X.X.X" --body "Updates n8n and all related dependencies to the latest versions..."
# 15. After PR is merged, verify release triggered
gh release list | head -1
# If the new version appears, you're done!
# If not, the version might have already been released - bump version again and create new PR
✅ Fast: Skip local tests (2-3 min saved) - CI runs them anyway ✅ Safe: Unit tests in CI verify compatibility ✅ Clean: All changes in one PR with proper tracking ✅ Automatic: Release workflow triggers on merge if version is new
Problem: Release workflow doesn't trigger after merge
Cause: Version number was already released (check gh release list)
Solution: Create new PR bumping version by one patch number
Problem: Integration tests fail in CI with "unauthorized" Cause: n8n test instance credentials expired (infrastructure issue) Solution: Ignore if unit tests pass - this is not a code problem
Problem: CI takes 8+ minutes Reason: Integration tests need live n8n instance (slow) Normal: Unit tests (~2 min) + integration tests (~6 min) = ~8 min total
For a complete update with tests and publish preparation:
npm run update:all
This single command will:
# 1. Update n8n dependencies automatically
npm run update:n8n
# 2. Run tests
npm test
# 3. Validate the update
npm run validate
# 4. Build
npm run build
# 5. Bump version
npm version patch
# 6. Update README badges manually
# - Update version badge
# - Update n8n version badge
# 7. 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 ~5,418 tests passing (~4,661 unit, ~757 integration)
- All validation tests passing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>"
git push origin main
npm run update:allThis comprehensive command:
npm run update:n8nThis command:
npm install to update package-lock.jsonnpm run validatenpm testgh release list to see what versions are already released. Your new version must be higher!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:
npm run rebuildnpm run sanitize:templatesTotal hands-on time: ~3 minutes (then wait for CI)
Note: The fast workflow is recommended since CI runs the same tests anyway.
If tests fail:
npm run test:unit or npm run test:integration separatelyIf validation fails:
To see what would be updated without making changes:
npm run update:n8n:check
This shows you the available updates without modifying anything.
After updating:
# Prepare for publish (runs tests automatically)
npm run prepare:publish
# Follow the instructions to publish with OTP
cd npm-publish-temp
npm publish --otp=YOUR_OTP_CODE
After pushing:
gh release create vX.X.X --title "vX.X.X" --notes "Updated n8n to vX.X.X"