n8n-io/n8n · warning · ParameterTooLargeError
NODE_PARAMETER_TOO_LARGE
NODE_PARAMETER_TOO_LARGE
Error message
Parameter value is too large to retrieve
What it means
Factory createNodeParameterTooLargeError wraps a ParameterTooLargeError with the literal message 'Parameter value is too large to retrieve'. It is returned when a parameter's serialized value exceeds the configured maxSize (in bytes), protecting tool-response size and LLM context windows from runaway parameter data.
Source
Thrown at packages/@n8n/ai-workflow-builder.ee/src/tools/helpers/validation.ts:133
}
/**
* Create a node parameter is too large error
*/
export function createNodeParameterTooLargeError(
nodeId: string,
parameter: string,
maxSize: number,
): ToolError {
const error = new ParameterTooLargeError('Parameter value is too large to retrieve', {
parameter,
nodeId,
maxSize,
});
return {
message: error.message,
code: 'NODE_PARAMETER_TOO_LARGE',
details: { nodeId, parameter, maxSize: maxSize.toString() },
};
}
/**
* Check if a workflow has nodes
*/
export function hasNodes(workflow: SimpleWorkflow): boolean {
return workflow.nodes.length > 0;
}
View on GitHub (pinned to 5ac6606e81)
Solutions
- Reference the parameter via an expression ($json, $('Node').item) instead of materializing its raw value.
- Reduce the parameter size at the source node (limit response body, shorten code, externalize data).
- Stream or paginate the data rather than reading it whole.
Example fix
// before: read raw parameter (may exceed limit)
const value = node.parameters.bigBody;
// after: reference via expression in downstream node
// $('HTTP Request').item.json.body // lazy, not materialized Defensive patterns
Strategy: validation
Validate before calling
// Estimate serialized size before reading a parameter.
function estimateParamSize(node: INode, param: string): number {
const v = (node.parameters as Record<string, unknown>)[param];
return Buffer.byteLength(typeof v === 'string' ? v : JSON.stringify(v ?? ''), 'utf8');
}
if (estimateParamSize(node, 'body') > MAX_SIZE) { /* reference via expression instead */ } Try / catch
const res = await getParameterTool.invoke(input);
if (isToolError(res) && res.code === 'NODE_PARAMETER_TOO_LARGE') {
// switch strategy: read via expression or paginate
} Prevention
- Prefer expression references ($('Node').item.json) over materializing large parameters.
- Cap response bodies and code sizes at the source node configuration.
- Stream or paginate large data into the workflow instead of embedding it in parameters.
When it happens
Trigger: Reading a parameter whose value (e.g. HTTP Request body, Code node source, Set node JSON) exceeds maxSize bytes; binary/base64 blobs stored as a parameter value.
Common situations: HTTP Request node storing a large response body in a parameter; Code node with a very large script; Set node assigning a big JSON literal; version-upgrade migration that inflated a parameter.
Related errors
- Attachment exceeds maximum size of 10.0 MB (got ${formatMB(a
- Run ${this.runId} is not suspended. Cannot resume.
- Agent run was aborted
- ${turn.errorReason.message}
- Tool name "${RECALL_MEMORY_TOOL_NAME}" is reserved while epi
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/5c0ba352f448f52c.
Report an issue: GitHub.