n8n-io/n8n · error
EXECUTE_WORKFLOW_INVALID_INPUT_MAPPING
EXECUTE_WORKFLOW_INVALID_INPUT_MAPPING
Error message
${nodeRef} has an invalid ${WORKFLOW_INPUTS_VALUE_PATH}. When parameters.workflowInputs.mappingMode is '${DEFINE_BELOW_MODE}', an explicitly provided ${WORKFLOW_INPUTS_VALUE_PATH} must be an object. If the selected sub-workflow accepts all data, omit parameters.workflowInputs. Otherwise set parameters.workflowInputs to a full Resource Mapper mapping whose value and schema match the declared inputs, such as ${VALID_MAPPING_EXAMPLE}. What it means
Error-level validator issue (code EXECUTE_WORKFLOW_INVALID_INPUT_MAPPING, violationLevel 'major') emitted when an Execute Workflow node has parameters.workflowInputs.mappingMode set to 'defineBelow' (DEFINE_BELOW_MODE) AND an explicitly provided parameters.workflowInputs.value is not a record/object. In defineBelow mode the value must be a full Resource Mapper mapping object; otherwise it must be omitted entirely (which lets the sub-workflow accept all data).
Source
Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/execute-workflow-validator.ts:70
return [];
}
if (isRecord(workflowInputs)) {
const mappingMode = workflowInputs.mappingMode ?? DEFINE_BELOW_MODE;
const value = workflowInputs.value;
if (mappingMode !== DEFINE_BELOW_MODE || value === undefined || isRecord(value)) return [];
}
const mapKey = findMapKey(graphNode, ctx);
const originalName = node.name;
const renamed = isAutoRenamed(mapKey, originalName);
const displayName = renamed ? mapKey : originalName;
const origForWarning = renamed ? originalName : undefined;
const nodeRef = formatNodeRef(displayName, origForWarning, node.type);
return [
{
code: 'EXECUTE_WORKFLOW_INVALID_INPUT_MAPPING',
message:
`${nodeRef} has an invalid ${WORKFLOW_INPUTS_VALUE_PATH}. ` +
`When parameters.workflowInputs.mappingMode is '${DEFINE_BELOW_MODE}', an explicitly provided ${WORKFLOW_INPUTS_VALUE_PATH} must be an object. ` +
`If the selected sub-workflow accepts all data, omit parameters.workflowInputs. Otherwise set parameters.workflowInputs to a full Resource Mapper mapping whose value and schema match the declared inputs, such as ${VALID_MAPPING_EXAMPLE}.`,
severity: 'error',
violationLevel: 'major',
nodeName: displayName,
parameterPath: WORKFLOW_INPUTS_VALUE_PATH,
originalName: origForWarning,
},
];
},
};
View on GitHub (pinned to 5ac6606e81)
Solutions
- If the sub-workflow accepts all data, omit parameters.workflowInputs entirely.
- Otherwise set parameters.workflowInputs to a full Resource Mapper mapping whose value and schema match the declared inputs (see VALID_MAPPING_EXAMPLE).
- Ensure mappingMode 'defineBelow' is paired with an object value, not a primitive.
Example fix
// before
executeWorkflow({
workflowId: '123',
workflowInputs: { mappingMode: 'defineBelow', value: 'hardcoded' }
})
// after
executeWorkflow({
workflowId: '123'
// omit workflowInputs to accept all data
}) Defensive patterns
Strategy: validation
Validate before calling
const wi = params.workflowInputs;
const DEFINE_BELOW_MODE = 'defineBelow';
if (wi && wi.mappingMode === DEFINE_BELOW_MODE && wi.value !== undefined && typeof wi.value !== 'object') {
// error: value must be an object or omitted
} Type guard
function isValidWorkflowInputs(wi: unknown): boolean {
if (wi == null) return true;
if (typeof wi !== 'object') return false;
const v = (wi as any);
if (v.mappingMode !== 'defineBelow') return true;
return v.value === undefined || (typeof v.value === 'object' && !Array.isArray(v.value));
} Prevention
- Omit workflowInputs when the sub-workflow accepts all data.
- When using 'defineBelow', provide a full Resource Mapper mapping object.
- Validate executeWorkflow config against the Resource Mapper schema before saving.
When it happens
Trigger: Setting mappingMode: 'defineBelow' with a non-object value (e.g. a string, array, or number) under workflowInputs.value; providing a partial mapping that is not a complete Resource Mapper shape.
Common situations: Hand-writing executeWorkflow config without the Resource Mapper schema; LLM-generated mapping that uses a primitive where an object is required; partial migration from an older mapping format.
Related errors
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/08648140143146aa.
Report an issue: GitHub.