{"record":{"id":"2446ed93e6196bb3","repo":"n8n-io/n8n","slug":"the-operation-operation-is-not-supported-2446ed","errorCode":null,"errorMessage":"The operation \"${operation}\" is not supported!","messagePattern":"The operation \"(.+?)\" is not supported!","errorType":"validation","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/v1/actions/router.ts","lineNumber":46,"sourceCode":"\tlet execute;\n\tswitch (openAiTypeData.resource) {\n\t\tcase 'assistant':\n\t\t\texecute = assistant[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'audio':\n\t\t\texecute = audio[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'file':\n\t\t\texecute = file[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'image':\n\t\t\texecute = image[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'text':\n\t\t\texecute = text[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tthis.getNode(),\n\t\t\t\t`The operation \"${operation}\" is not supported!`,\n\t\t\t);\n\t}\n\n\tfor (let i = 0; i < items.length; i++) {\n\t\ttry {\n\t\t\tconst responseData = await execute.call(this, i);\n\n\t\t\treturnData.push(...responseData);\n\t\t} catch (error) {\n\t\t\tif (this.continueOnFail()) {\n\t\t\t\treturnData.push({ json: { error: error.message }, pairedItem: { item: i } });\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (error instanceof NodeApiError) {\n\t\t\t\t// If the error is a rate limit error, we want to handle it differently","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/v1/actions/router.ts#L28-L64","documentation":"The v1 OpenAI node router dispatches based on the resource type (assistant, audio, file, image, text). If the resource falls outside these known cases, it throws a NodeOperationError. This typically indicates a corrupt workflow JSON where the resource value was manually edited to something invalid, since the UI constrains the selection to known values.","triggerScenarios":"The resource field in the OpenAI v1 node is set to a value that is not 'assistant', 'audio', 'file', 'image', or 'text'. This requires the workflow JSON to be hand-edited, imported from a malformed export, or constructed via API with an invalid resource value.","commonSituations":"Workflow JSON was edited externally and the resource was misspelled or set to a value from a different node version; workflow imported from an incompatible n8n version; programmatic workflow creation via the REST API with a typo in the resource name.","solutions":["Open the node in the n8n UI and re-select the resource from the dropdown to get a valid value","If editing JSON directly, use one of: 'assistant', 'audio', 'file', 'image', 'text'","Re-import the workflow from a known-good export"],"exampleFix":"// before — resource: 'asistant' (typo)\n// after  — resource: 'assistant'","handlingStrategy":"validation","validationCode":"const validResources = ['assistant', 'audio', 'file', 'image', 'text'];\nif (!validResources.includes(resource)) {\n  throw new UserError(`Invalid resource '${resource}'. Must be one of: ${validResources.join(', ')}`);\n}","typeGuard":"function isValidResource(value: string): value is 'assistant' | 'audio' | 'file' | 'image' | 'text' {\n  return ['assistant', 'audio', 'file', 'image', 'text'].includes(value);\n}","tryCatchPattern":null,"preventionTips":["Always select resource and operation through the n8n UI dropdown","When importing workflow JSON, validate resource values match the expected enum","Avoid hand-editing workflow JSON for node parameter values"],"tags":["openai","router","invalid-operation","workflow-json","v1"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}