n8n-io/n8n · warning
PARTIAL_EXPRESSION_PATH
PARTIAL_EXPRESSION_PATH
Error message
'${nodeName}' parameter '${paramPath}' uses $json.${fieldPathStr} - exists in [${validIn.join(', ')}] but NOT in [${invalidIn.join(', ')}]. What it means
Warning-level validator issue (code PARTIAL_EXPRESSION_PATH) emitted when an expression references $json.<fieldPath> that exists in SOME predecessors but NOT all of them. The message lists which predecessors provide the field (validIn) and which do not (invalidIn), so the builder knows which branches will resolve and which will return undefined.
Source
Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/expression-path-validator.ts:114
} 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 field
*/
function validateNodePath(
nodeName: string,
paramPath: string,
referencedNode: string,
fieldPath: string[],
outputShapes: Map<string, Record<string, unknown>>,
issues: ValidationIssue[],View on GitHub (pinned to 5ac6606e81)
Solutions
- Make all predecessor branches output the referenced field (normalize outputs).
- Restructure so only branches that actually have the field are predecessors.
- Use a conditional/fallback in the expression to handle the missing-field case.
Example fix
// before
'={{ $json.optionalField }}'
// some predecessors omit optionalField
// after
'={{ $json.optionalField ?? "default" }}' Defensive patterns
Strategy: validation
Validate before calling
const valid = preds.filter(p => hasPath(shapeOf(p), fieldPath));
const invalid = preds.filter(p => !hasPath(shapeOf(p), fieldPath));
if (valid.length > 0 && invalid.length > 0) {
// warn: partial — normalize outputs or guard the expression
} Prevention
- Normalize output schemas across branches that merge into one node.
- Add fallbacks ('?? default') when a field may be absent on some branches.
- Prefer homogeneous upstream outputs for shared expressions.
When it happens
Trigger: A node with multiple upstream branches where only some output the referenced field; merging heterogeneous sources and referencing a field only one branch provides.
Common situations: Conditional branches that diverge in output schema; nodes whose output depends on a mode/option; refactors that change one branch's fields.
Related errors
- INVALID_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/b579e8a02655acf5.
Report an issue: GitHub.