n8n-io/n8n · error · NodeOperationError

Mime type doesn't match selected loader. Please select…

Error message

Mime type doesn't match selected loader. Please select under "Loader Type": ${neededLoader}

What it means

Validation error from the Default Data Loader's validateMimeType, raised as NodeOperationError. It fires when a specific loader is selected (not 'auto') but the binary data's mime type belongs to a different loader's supported set. The mime type is known and loadable — only the loader choice is wrong — and the message names the loader that does support it.

Solutions

  1. Set the node's Loader Type to the loader suggested in the message, or set it to 'auto' to pick the loader from the mime type.
  2. Convert the binary data to a mime type the selected loader supports.
  3. Verify the file actually has the content type you expect; servers sometimes serve wrong mime types.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/@n8n/ai-utilities/src/utils/n8n-binary-loader.ts:64 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/f3c5ec00bc0bb0a4. Report an issue: GitHub.

Appendix: source

Thrown at packages/@n8n/ai-utilities/src/utils/n8n-binary-loader.ts:64

			const processedDocuments = await this.processItem(items[itemIndex], itemIndex);

			docs.push(...processedDocuments);
		}

		return docs;
	}

	private async validateMimeType(
		mimeType: string,
		selectedLoader: keyof typeof SUPPORTED_MIME_TYPES,
	): Promise<void> {
		// Check if loader matches the mime-type of the data
		if (selectedLoader !== 'auto' && !SUPPORTED_MIME_TYPES[selectedLoader].includes(mimeType)) {
			const neededLoader = Object.keys(SUPPORTED_MIME_TYPES).find((loader) =>
				SUPPORTED_MIME_TYPES[loader as keyof typeof SUPPORTED_MIME_TYPES].includes(mimeType),
			);

			throw new NodeOperationError(
				this.context.getNode(),
				`Mime type doesn't match selected loader. Please select under "Loader Type": ${neededLoader}`,
			);
		}

		if (!Object.values(SUPPORTED_MIME_TYPES).flat().includes(mimeType)) {
			throw new NodeOperationError(this.context.getNode(), `Unsupported mime type: ${mimeType}`);
		}

		if (
			!SUPPORTED_MIME_TYPES[selectedLoader].includes(mimeType) &&
			selectedLoader !== 'textLoader' &&
			selectedLoader !== 'auto'
		) {
			throw new NodeOperationError(
				this.context.getNode(),
				`Unsupported mime type: ${mimeType} for selected loader: ${selectedLoader}`,
			);

View on GitHub (pinned to 5ac6606e81)