n8n-io/n8n · error · NodeOperationError
The operation "${operation}" is not supported!
Error message
The operation "${operation}" is not supported! What it means
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.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/v1/actions/router.ts:46
let execute;
switch (openAiTypeData.resource) {
case 'assistant':
execute = assistant[openAiTypeData.operation].execute;
break;
case 'audio':
execute = audio[openAiTypeData.operation].execute;
break;
case 'file':
execute = file[openAiTypeData.operation].execute;
break;
case 'image':
execute = image[openAiTypeData.operation].execute;
break;
case 'text':
execute = text[openAiTypeData.operation].execute;
break;
default:
throw new NodeOperationError(
this.getNode(),
`The operation "${operation}" is not supported!`,
);
}
for (let i = 0; i < items.length; i++) {
try {
const responseData = await execute.call(this, i);
returnData.push(...responseData);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ json: { error: error.message }, pairedItem: { item: i } });
continue;
}
if (error instanceof NodeApiError) {
// If the error is a rate limit error, we want to handle it differentlyView on GitHub (pinned to 5ac6606e81)
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
Example fix
// before — resource: 'asistant' (typo) // after — resource: 'assistant'
Defensive patterns
Strategy: validation
Validate before calling
const validResources = ['assistant', 'audio', 'file', 'image', 'text'];
if (!validResources.includes(resource)) {
throw new UserError(`Invalid resource '${resource}'. Must be one of: ${validResources.join(', ')}`);
} Type guard
function isValidResource(value: string): value is 'assistant' | 'audio' | 'file' | 'image' | 'text' {
return ['assistant', 'audio', 'file', 'image', 'text'].includes(value);
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- ${error.message}
- The resource "${resource}" is not supported!
- The resource "${resource}" is not supported!
- The resource "${resource}" is not supported!
- An assistant with the same name '${name}' already exists
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/2446ed93e6196bb3.
Report an issue: GitHub.