n8n-io/n8n · error

MAX_NODES_EXCEEDED

MAX_NODES_EXCEEDED

Error message

Workflow has ${count} ${displayName} nodes. Maximum allowed is ${maxNodes}.

What it means

Workflow-level validator: it counts nodes per type and compares against the node type's declared maxNodes limit. More instances of that node type exist than maxNodes allows (e.g. multiple Schedule Triggers where the type permits one), so the built workflow is rejected with the counts and the limit.

Solutions

  1. Remove nodes of that type until the count is within maxNodes
  2. Consolidate the duplicated functionality into fewer instances of the node type
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/max-nodes-validator.ts:52 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/f8f8de41e64b63b0. Report an issue: GitHub.

Appendix: source

Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/max-nodes-validator.ts:52

			const type = graphNode.instance.type;
			nodeCountByType.set(type, (nodeCountByType.get(type) ?? 0) + 1);
		}

		// Check each type against its maxNodes limit
		for (const [type, count] of nodeCountByType) {
			if (count <= 1) continue;

			const firstNode = [...ctx.nodes.values()].find((n) => n.instance.type === type);
			const versionRaw = firstNode?.instance.version;
			const version = parseVersion(versionRaw);

			const nodeType = provider.getByNameAndVersion(type, version);
			const maxNodes = nodeType?.description?.maxNodes;

			if (maxNodes !== undefined && count > maxNodes) {
				const displayName = nodeType?.description?.displayName ?? type;
				issues.push({
					code: 'MAX_NODES_EXCEEDED',
					message: `Workflow has ${count} ${displayName} nodes. Maximum allowed is ${maxNodes}.`,
					severity: 'error',
				});
			}
		}

		return issues;
	},
};

View on GitHub (pinned to 5ac6606e81)