{"record":{"id":"e581e3c0fb6bc002","repo":"n8n-io/n8n","slug":"docx-attachment-filename-contains-no-extracta","errorCode":null,"errorMessage":"docx \"${attachment.fileName}\" contains no extractable text.","messagePattern":"docx \"(.+?)\" contains no extractable text\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/instance-ai/src/parsers/docx-parser.ts","lineNumber":40,"sourceCode":"\tassertOoxmlWithinBounds(decoded, attachment.fileName);\n\n\tconst mammoth = await import('mammoth');\n\tconst extractRawText = mammoth.extractRawText ?? mammoth.default?.extractRawText;\n\tif (typeof extractRawText !== 'function') {\n\t\tthrow new Error('mammoth.extractRawText is not available');\n\t}\n\n\tlet raw: { value: string };\n\ttry {\n\t\traw = await extractRawText({ buffer: decoded });\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : 'unknown error';\n\t\tthrow new Error(`Failed to parse docx \"${attachment.fileName}\": ${message}`);\n\t}\n\n\tconst text = raw.value?.trim() ?? '';\n\tif (!text) {\n\t\tthrow new Error(`docx \"${attachment.fileName}\" contains no extractable text.`);\n\t}\n\n\tif (text.length > MAX_RESULT_CHARS) {\n\t\treturn { text: text.slice(0, MAX_RESULT_CHARS), truncated: true };\n\t}\n\treturn { text, truncated: false };\n}\n","sourceCodeStart":22,"sourceCodeEnd":48,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/instance-ai/src/parsers/docx-parser.ts#L22-L48","documentation":"Error \"docx \"${attachment.fileName}\" contains no extractable text.\" thrown in n8n-io/n8n.","triggerScenarios":"Thrown at packages/@n8n/instance-ai/src/parsers/docx-parser.ts:40 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}