n8n-io/n8n · error · Error

Input data must contain a "input" field with the search quer

Error message

Input data must contain a "input" field with the search query

What it means

Error "Input data must contain a "input" field with the search query" thrown in n8n-io/n8n.

Source

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

	itemIndex: number,
): Promise<INodeExecutionData[]> {
	const filter = getMetadataFiltersValues(context, itemIndex);
	const vectorStore = await args.getVectorStoreClient(
		context,
		// We'll pass filter to similaritySearchVectorWithScore instead of getVectorStoreClient
		undefined,
		embeddings,
		itemIndex,
	);

	try {
		// Get the search parameters - query from input data, others from node parameters
		const inputData = context.getInputData();
		const item = inputData[itemIndex];
		const query = typeof item.json.input === 'string' ? item.json.input : undefined;

		if (!query || typeof query !== 'string') {
			throw new Error('Input data must contain a "input" field with the search query');
		}

		const topK = context.getNodeParameter('topK', itemIndex, 4);
		assertParamIsNumber('topK', topK, context.getNode());
		const useReranker = context.getNodeParameter('useReranker', itemIndex, false);
		assertParamIsBoolean('useReranker', useReranker, context.getNode());

		const includeDocumentMetadata = context.getNodeParameter(
			'includeDocumentMetadata',
			itemIndex,
			true,
		);
		assertParamIsBoolean('includeDocumentMetadata', includeDocumentMetadata, context.getNode());

		// Embed the query to prepare for vector similarity search
		const embeddedQuery = await embeddings.embedQuery(query);

		// Get the most similar documents to the embedded query

View on GitHub (pinned to 5ac6606e81)

When it happens

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