{"record":{"id":"7e5a84b5a320b5ab","repo":"n8n-io/n8n","slug":"invalid-expression-path","errorCode":"INVALID_EXPRESSION_PATH","errorMessage":"'${nodeName}' parameter '${paramPath}' uses $json.${fieldPathStr} but no predecessor outputs this field.","messagePattern":"'(.+?)' parameter '(.+?)' uses \\$json\\.(.+?) but no predecessor outputs this field\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/expression-path-validator.ts","lineNumber":106,"sourceCode":"\tconst validIn: string[] = [];\n\tconst invalidIn: string[] = [];\n\n\tfor (const pred of predecessors) {\n\t\tconst shape = outputShapes.get(pred);\n\t\tif (shape) {\n\t\t\tif (hasPath(shape, fieldPath)) {\n\t\t\t\tvalidIn.push(pred);\n\t\t\t} else {\n\t\t\t\tinvalidIn.push(pred);\n\t\t\t}\n\t\t}\n\t}\n\n\tconst fieldPathStr = fieldPath.join('.');\n\n\tif (invalidIn.length > 0 && validIn.length === 0) {\n\t\tissues.push({\n\t\t\tcode: 'INVALID_EXPRESSION_PATH',\n\t\t\tmessage: `'${nodeName}' parameter '${paramPath}' uses $json.${fieldPathStr} but no predecessor outputs this field.`,\n\t\t\tseverity: 'warning',\n\t\t\tnodeName,\n\t\t\tparameterPath: paramPath,\n\t\t});\n\t} else if (invalidIn.length > 0 && validIn.length > 0) {\n\t\tissues.push({\n\t\t\tcode: 'PARTIAL_EXPRESSION_PATH',\n\t\t\tmessage: `'${nodeName}' parameter '${paramPath}' uses $json.${fieldPathStr} - exists in [${validIn.join(', ')}] but NOT in [${invalidIn.join(', ')}].`,\n\t\t\tseverity: 'warning',\n\t\t\tnodeName,\n\t\t\tparameterPath: paramPath,\n\t\t});\n\t}\n}\n\n/**\n * Validate that $('NodeName').item.json.path references a valid field","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/expression-path-validator.ts#L88-L124","documentation":"Warning-level validator issue (code INVALID_EXPRESSION_PATH) emitted when an expression in parameter paramPath references $json.<fieldPath> but NONE of the predecessor nodes' output shapes contain that field. The field will resolve to undefined at runtime, so the validator flags it. Message interpolates nodeName, paramPath, and the dotted field path.","triggerScenarios":"Writing '={{ $json.email }}' when no upstream node outputs an 'email' field; renaming an upstream field without updating downstream expressions.","commonSituations":"Stale expressions after a schema change; typos in field names; assuming a field exists because an example item had it.","solutions":["Verify the upstream node actually outputs the referenced field (check its output shape).","Correct the field name in the expression to match the real output.","Add a Set/code node upstream that produces the required field."],"exampleFix":"// before\n'={{ $json.emailAddress }}' // upstream outputs 'email'\n// after\n'={{ $json.email }}'","handlingStrategy":"validation","validationCode":"function fieldExistsInAllPreds(fieldPath: string[], predShapes: Map<string, Record<string, unknown>>): boolean {\n  for (const shape of predShapes.values()) {\n    if (!hasPath(shape, fieldPath)) return false;\n  }\n  return true;\n}\nif (!fieldExistsInAllPreds(fieldPath, predShapes)) {\n  // warn: $json.field not provided by any predecessor\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cross-check $json.field references against upstream output shapes.","Update downstream expressions after renaming upstream fields.","Use the expression-path validator during local builds."],"tags":["expression","validator","field-path","output-shape"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}