{"record":{"id":"f2e5a4cdcb2c7fd5","repo":"n8n-io/n8n","slug":"the-operation-operation-is-not-supported-f2e5a4","errorCode":null,"errorMessage":"The operation \"${operation}\" is not supported!","messagePattern":"The operation \"(.+?)\" is not supported!","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vendors/GoogleGemini/actions/router.ts","lineNumber":48,"sourceCode":"\t\t\texecute = document[googleGeminiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'file':\n\t\t\texecute = file[googleGeminiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'fileSearch':\n\t\t\texecute = fileSearch[googleGeminiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'image':\n\t\t\texecute = image[googleGeminiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'text':\n\t\t\texecute = text[googleGeminiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'video':\n\t\t\texecute = video[googleGeminiTypeData.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\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\tthrow new NodeOperationError(this.getNode(), error, {\n\t\t\t\titemIndex: i,\n\t\t\t\tdescription: error.description,","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/GoogleGemini/actions/router.ts#L30-L66","documentation":"Default branch of the resource switch in the Google Gemini router. The switch keys on googleGeminiTypeData.resource (audio/document/file/fileSearch/image/text/video); any other value lands here. Note the message string is misleading — it interpolates the 'operation' variable even though it is the 'resource' that is unsupported, so the reported value is not the thing that failed.","triggerScenarios":"The resource parameter resolves to a value outside the known set: a future/renamed resource (e.g. 'code'), a value injected by an expression that returns undefined or a wrong-case string, or a stale workflow JSON whose resource enum was renamed in a newer node version.","commonSituations":"Loading a workflow exported from a newer n8n version whose Gemini node added a resource the current version doesn't know; hand-editing the workflow JSON and typo'ing the resource; an upstream expression feeding the resource field with unexpected input.","solutions":["Re-open the node and pick a supported Resource from the dropdown (Audio, Document, File, File Search, Image, Text, Video).","If the workflow came from another instance, upgrade n8n / the nodes-langchain package so its router recognises the new resource.","Inspect the raw workflow JSON: ensure the 'resource' value matches one of the switch cases exactly (lowercase, no spaces).","If an expression drives 'resource', bound it to an allowed-values check before this node runs."],"exampleFix":"// before\nconst resource = 'codegen'; // unsupported\n\n// after\nconst resource = 'text';","handlingStrategy":"validation","validationCode":"const SUPPORTED_RESOURCES = ['audio','document','file','fileSearch','image','text','video'] as const;\nconst resource = this.getNodeParameter('resource', 0) as string;\nif (!SUPPORTED_RESOURCES.includes(resource as never)) {\n  throw new Error(`Unsupported resource: ${resource}. Must be one of ${SUPPORTED_RESOURCES.join(', ')}`);\n}","typeGuard":"const SUPPORTED_RESOURCES = ['audio','document','file','fileSearch','image','text','video'] as const;\ntype GeminiResource = typeof SUPPORTED_RESOURCES[number];\nfunction isGeminiResource(v: unknown): v is GeminiResource {\n  return typeof v === 'string' && (SUPPORTED_RESOURCES as readonly string[]).includes(v);\n}","tryCatchPattern":null,"preventionTips":["Never drive the 'resource' field from free text — use the dropdown only.","When importing workflows from other instances, check the Gemini node version matches before running.","Audit hand-edited workflow JSON for resource values not in the supported set."],"tags":["google-gemini","router","resource","switch-default","validation","node-operation-error"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}