mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-01-30 06:22:04 +00:00
Issue #248 required three iterations to solve due to n8n API version differences: 1. First attempt: Whitelist filtering - Failed: API rejects ANY settings properties via update endpoint 2. Second attempt: Complete settings removal - Failed: Cloud API requires settings property to exist 3. Final solution: Unconditional empty settings object - Success: Satisfies both API requirements Changes: - src/services/n8n-validation.ts:153 - Changed from conditional `if (cleanedWorkflow.settings)` to unconditional - Always sets `cleanedWorkflow.settings = {}` - Works for both cloud (requires property) and self-hosted (rejects properties) - tests/unit/services/n8n-validation.test.ts - Updated all 4 tests to expect `settings: {}` instead of removed settings - Tests verify empty object approach works for all scenarios Tested: - ✅ localhost workflow (wwTodXf1jbUy3Ja5) - ✅ cloud workflow (n8n.estyl.team/workflow/WKFeCRUjTeYbYhTf) - ✅ All 72 unit tests passing References: - https://community.n8n.io/t/api-workflow-update-endpoint-doesnt-support-setting-callerpolicy/161916 - Tested with @agent-n8n-mcp-tester on production workflows