n8n-io/n8n · error · NodeOperationError
Unsupported mime type
Error message
Unsupported mime type: ${mimeType} What it means
Validation error from the Default Data Loader's validateMimeType, raised as NodeOperationError. It fires when the binary data's mime type is not in any loader's supported list in SUPPORTED_MIME_TYPES — the data cannot be loaded as documents at all, regardless of loader selection. Generic mime-type support check, not a loader-choice problem.
Solutions
- Use a binary data source whose mime type is one of the types listed in SUPPORTED_MIME_TYPES.
- Convert the file (e.g. to PDF, CSV, or plain text) before loading it.
- If the data is genuinely text-like, serve it as text/plain so a loader can accept it.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/@n8n/ai-utilities/src/utils/n8n-binary-loader.ts:71 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/9346771c1ed88b1f.
Report an issue: GitHub.
Appendix: source
Thrown at packages/@n8n/ai-utilities/src/utils/n8n-binary-loader.ts:71
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}`,
);
}
}
private async getFilePathOrBlob(
binaryData: IBinaryData,
mimeType: string,
): Promise<string | Blob> {View on GitHub (pinned to 5ac6606e81)