{"record":{"id":"decc173ee8c7d8c0","repo":"n8n-io/n8n","slug":"attachment-exceeds-maximum-size-of-10-0-mb-got-decc17","errorCode":null,"errorMessage":"Attachment exceeds maximum size of 10.0 MB (got ${actualBytes})","messagePattern":"Attachment exceeds maximum size of 10\\.0 MB \\(got (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/@n8n/instance-ai/src/tools/attachments/parse-file.tool.ts","lineNumber":141,"sourceCode":"\treturn (\n\t\tinputFormat ??\n\t\ttoOutputFormat(attachment && detectFormat(attachment.fileName, attachment.mimeType))\n\t);\n}\n\nfunction emptyTabularFields() {\n\treturn {\n\t\tcolumns: [],\n\t\trows: [],\n\t\ttotalRows: 0,\n\t\treturnedRows: 0,\n\t};\n}\n\nfunction extractPlainTextContent(attachment: AttachmentInfo) {\n\tconst decoded = Buffer.from(attachment.data, 'base64');\n\tif (decoded.length > MAX_DECODED_SIZE_BYTES) {\n\t\tthrow new Error(formatSizeLimitMessage(decoded.length));\n\t}\n\n\tconst content = decoded.toString('utf-8').trim();\n\tif (!content) {\n\t\tthrow new Error(`\"${attachment.fileName}\" contains no extractable text.`);\n\t}\n\n\tif (content.length > MAX_RESULT_CHARS) {\n\t\treturn { content: content.slice(0, MAX_RESULT_CHARS), truncated: true };\n\t}\n\n\treturn { content, truncated: false };\n}\n\nexport function createParseFileTool(context: InstanceAiContext) {\n\treturn new Tool('parse-file')\n\t\t.description(\n\t\t\t'Parse parseable user attachments from the current message. ' +","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/instance-ai/src/tools/attachments/parse-file.tool.ts#L123-L159","documentation":"Error \"Attachment exceeds maximum size of 10.0 MB (got ${actualBytes})\" thrown in n8n-io/n8n.","triggerScenarios":"Thrown at packages/@n8n/instance-ai/src/tools/attachments/parse-file.tool.ts:141 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-13T04:17:16.726Z"}