n8n-io/n8n · warning
INVALID_EXPRESSION_PATH
INVALID_EXPRESSION_PATH
Error message
'${nodeName}' parameter '${paramPath}' uses $json.${fieldPathStr} but no predecessor outputs this field. What it means
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.
Source
Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/expression-path-validator.ts:106
const validIn: string[] = [];
const invalidIn: string[] = [];
for (const pred of predecessors) {
const shape = outputShapes.get(pred);
if (shape) {
if (hasPath(shape, fieldPath)) {
validIn.push(pred);
} else {
invalidIn.push(pred);
}
}
}
const fieldPathStr = fieldPath.join('.');
if (invalidIn.length > 0 && validIn.length === 0) {
issues.push({
code: 'INVALID_EXPRESSION_PATH',
message: `'${nodeName}' parameter '${paramPath}' uses $json.${fieldPathStr} but no predecessor outputs this field.`,
severity: 'warning',
nodeName,
parameterPath: paramPath,
});
} else if (invalidIn.length > 0 && validIn.length > 0) {
issues.push({
code: 'PARTIAL_EXPRESSION_PATH',
message: `'${nodeName}' parameter '${paramPath}' uses $json.${fieldPathStr} - exists in [${validIn.join(', ')}] but NOT in [${invalidIn.join(', ')}].`,
severity: 'warning',
nodeName,
parameterPath: paramPath,
});
}
}
/**
* Validate that $('NodeName').item.json.path references a valid fieldView on GitHub (pinned to 5ac6606e81)
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.
Example fix
// before
'={{ $json.emailAddress }}' // upstream outputs 'email'
// after
'={{ $json.email }}' Defensive patterns
Strategy: validation
Validate before calling
function fieldExistsInAllPreds(fieldPath: string[], predShapes: Map<string, Record<string, unknown>>): boolean {
for (const shape of predShapes.values()) {
if (!hasPath(shape, fieldPath)) return false;
}
return true;
}
if (!fieldExistsInAllPreds(fieldPath, predShapes)) {
// warn: $json.field not provided by any predecessor
} Prevention
- Cross-check $json.field references against upstream output shapes.
- Update downstream expressions after renaming upstream fields.
- Use the expression-path validator during local builds.
When it happens
Trigger: Writing '={{ $json.email }}' when no upstream node outputs an 'email' field; renaming an upstream field without updating downstream expressions.
Common situations: Stale expressions after a schema change; typos in field names; assuming a field exists because an example item had it.
Related errors
- PARTIAL_EXPRESSION_PATH
- AGENT_STATIC_PROMPT
- AGENT_STATIC_PROMPT
- INVALID_DATE_METHOD
- MISSING_EXPRESSION_PREFIX
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/7e5a84b5a320b5ab.
Report an issue: GitHub.