n8n-io/n8n · error · NodeOperationError

Only the "retrieve" and "retrieve-as-tool" operation mode…

Error message

Only the "retrieve" and "retrieve-as-tool" operation mode is supported to supply data

What it means

Mode-validation error raised in the vector store node's supplyData(). supplyData only serves retrieve and retrieve-as-tool modes (data-supplying operations); any other mode reaches this final throw after the handled branches. The mode is valid for execute() but not for supplying data to a downstream consumer.

Solutions

  1. Set the operation mode to 'retrieve' or 'retrieve-as-tool' when the node is used as a data supplier for an AI chain.
  2. Modes like insert, update, and load only work during normal execution, not supplyData.
  3. Check the workflow connection context: supplyData runs when the node feeds an AI agent, chain, or tool.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/@n8n/ai-utilities/src/utils/vector-store/createVectorStoreNode/createVectorStoreNode.ts:498 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/e5b2f03d2ce8ebed. Report an issue: GitHub.

Appendix: source

Thrown at packages/@n8n/ai-utilities/src/utils/vector-store/createVectorStoreNode/createVectorStoreNode.ts:498

			try {
				const mode = this.getNodeParameter('mode', 0) as NodeOperationMode;

				// Get the embeddings model connected to this node
				const embeddings = (await this.getInputConnectionData(
					NodeConnectionTypes.AiEmbedding,
					0,
				)) as Embeddings;

				// Handle each supply data operation mode with dedicated modules
				if (mode === 'retrieve') {
					return await handleRetrieveOperation(this, args, embeddings, itemIndex);
				}

				if (mode === 'retrieve-as-tool') {
					return await handleRetrieveAsToolOperation(this, args, embeddings, itemIndex);
				}

				throw new NodeOperationError(
					this.getNode(),
					'Only the "retrieve" and "retrieve-as-tool" operation mode is supported to supply data',
				);
			} catch (error) {
				normalizeVectorStoreError(this.getNode(), error, itemIndex);
			}
		}
	};

View on GitHub (pinned to 5ac6606e81)