diff --git a/data/nodes.db b/data/nodes.db index 736d392..fe92ce1 100644 Binary files a/data/nodes.db and b/data/nodes.db differ diff --git a/src/services/n8n-validation.ts b/src/services/n8n-validation.ts index f52beb3..1163419 100644 --- a/src/services/n8n-validation.ts +++ b/src/services/n8n-validation.ts @@ -140,6 +140,7 @@ export function cleanWorkflowForUpdate(workflow: Workflow): Partial { // Remove fields that cause API errors pinData, tags, + description, // Issue #431: n8n returns this field but rejects it in updates // Remove additional fields that n8n API doesn't accept isArchived, usedCredentials, diff --git a/src/types/n8n-api.ts b/src/types/n8n-api.ts index 6b9d30b..be54d28 100644 --- a/src/types/n8n-api.ts +++ b/src/types/n8n-api.ts @@ -56,6 +56,7 @@ export interface WorkflowSettings { export interface Workflow { id?: string; name: string; + description?: string; // Returned by GET but must be excluded from PUT/PATCH (n8n API limitation, Issue #431) nodes: WorkflowNode[]; connections: WorkflowConnection; active?: boolean; // Optional for creation as it's read-only diff --git a/tests/unit/services/n8n-validation.test.ts b/tests/unit/services/n8n-validation.test.ts index b0e5cdc..3e7c7f9 100644 --- a/tests/unit/services/n8n-validation.test.ts +++ b/tests/unit/services/n8n-validation.test.ts @@ -367,6 +367,22 @@ describe('n8n-validation', () => { expect(cleaned.name).toBe('Test Workflow'); }); + it('should exclude description field for n8n API compatibility (Issue #431)', () => { + const workflow = { + name: 'Test Workflow', + description: 'This is a test workflow description', + nodes: [], + connections: {}, + versionId: 'v123', + } as any; + + const cleaned = cleanWorkflowForUpdate(workflow); + + expect(cleaned).not.toHaveProperty('description'); + expect(cleaned).not.toHaveProperty('versionId'); + expect(cleaned.name).toBe('Test Workflow'); + }); + it('should omit settings property when no settings provided (Issue #431)', () => { const workflow = { name: 'Test Workflow',