{"record":{"id":"cfe297d41f482377","repo":"n8n-io/n8n","slug":"subnode-not-connected","errorCode":"SUBNODE_NOT_CONNECTED","errorMessage":"${nodeRef} is a subnode that must be connected to a parent node as ${subnodeInfo.subnodeField}, but it has no such connection. Use the appropriate subnode factory (e.g., embedding(), languageModel()) and connect it to a parent node's subnodes config.","messagePattern":"(.+?) is a subnode that must be connected to a parent node as (.+?), but it has no such connection\\. Use the appropriate subnode factory \\(e\\.g\\., embedding\\(\\), languageModel\\(\\)\\) and connect it to a parent node's subnodes config\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/subnode-connection-validator.ts","lineNumber":108,"sourceCode":"\t// Per-node validation not used - we do workflow-level validation\n\tvalidateNode: () => [],\n\n\tvalidateWorkflow(ctx: PluginContext): ValidationIssue[] {\n\t\tconst issues: ValidationIssue[] = [];\n\n\t\tfor (const [mapKey, graphNode] of ctx.nodes) {\n\t\t\tconst subnodeInfo = getRequiredSubnodeInfo(graphNode.instance.type);\n\t\t\tif (subnodeInfo) {\n\t\t\t\t// This is a subnode-only type - verify it has the required AI connection\n\t\t\t\tif (!hasAiConnectionOfType(graphNode, subnodeInfo.connectionType)) {\n\t\t\t\t\tconst originalName = graphNode.instance.name;\n\t\t\t\t\tconst renamed = isAutoRenamed(mapKey, originalName);\n\t\t\t\t\tconst displayName = renamed ? mapKey : originalName;\n\t\t\t\t\tconst origForDisplay = renamed ? originalName : undefined;\n\t\t\t\t\tconst nodeRef = formatNodeRef(displayName, origForDisplay, graphNode.instance.type);\n\n\t\t\t\t\tissues.push({\n\t\t\t\t\t\tcode: 'SUBNODE_NOT_CONNECTED',\n\t\t\t\t\t\tmessage: `${nodeRef} is a subnode that must be connected to a parent node as ${subnodeInfo.subnodeField}, but it has no such connection. Use the appropriate subnode factory (e.g., embedding(), languageModel()) and connect it to a parent node's subnodes config.`,\n\t\t\t\t\t\tseverity: 'error',\n\t\t\t\t\t\tnodeName: displayName,\n\t\t\t\t\t\toriginalName: origForDisplay,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn issues;\n\t},\n};\n","sourceCodeStart":90,"sourceCodeEnd":121,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/subnode-connection-validator.ts#L90-L121","documentation":"Error \"${nodeRef} is a subnode that must be connected to a parent node as ${subnodeInfo.subnodeField}, but it has no such connection. Use the appropriate subnode factory (e.g., embedding(), languageModel()) and connect it to a parent node's subnodes config.\" thrown in n8n-io/n8n.","triggerScenarios":"Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/subnode-connection-validator.ts:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}