n8n-io/n8n · error

MERGE_SINGLE_INPUT

MERGE_SINGLE_INPUT

Error message

'${mapKey}' has only ${inputCount} input connection(s). Merge nodes require at least 2 inputs. Wire each upstream branch to a distinct input via `.to(mergeNode.input(0))`, `.to(mergeNode.input(1))`, etc.

What it means

Error "'${mapKey}' has only ${inputCount} input connection(s). Merge nodes require at least 2 inputs. Wire each upstream branch to a distinct input via `.to(mergeNode.input(0))`, `.to(mergeNode.input(1))`, etc." thrown in n8n-io/n8n.

Source

Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/merge-node-validator.ts:78

					// Handle both NodeInstance and InputTarget
					const targetNode = isInputTarget(conn.target) ? conn.target.node : conn.target;
					const targetNodeName =
						typeof targetNode === 'object' && 'name' in targetNode ? targetNode.name : undefined;
					if (targetNode === node || targetNodeName === originalName) {
						// For InputTarget, use the specified index; for regular connections use targetInputIndex; default to 0
						const targetIndex = isInputTarget(conn.target)
							? conn.target.inputIndex
							: (conn.targetInputIndex ?? 0);
						connectedInputIndices.add(targetIndex);
					}
				}
			}
		}

		const inputCount = connectedInputIndices.size;
		if (inputCount < 2) {
			issues.push({
				code: 'MERGE_SINGLE_INPUT',
				message: `'${mapKey}' has only ${inputCount} input connection(s). Merge nodes require at least 2 inputs. Wire each upstream branch to a distinct input via \`.to(mergeNode.input(0))\`, \`.to(mergeNode.input(1))\`, etc.`,
				severity: 'warning',
				violationLevel: 'major',
				nodeName: mapKey,
			});
		}

		return issues;
	},
};

View on GitHub (pinned to 5ac6606e81)

When it happens

Trigger: Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/merge-node-validator.ts:78 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/47d9747d89124b68. Report an issue: GitHub.