Convert Document icon

Convert Document

Extracts text, HTML, or Markdown from documents (DOCX, PDF, PPTX, ODT, HTML, TXT, MD) and reads table rows from spreadsheets (XLSX, CSV), also parsing JSON, XML, and Yandex Market YML into structured data

Convert Document

AI-generated

Summary

Extracts document content from each input item’s selected binary property and adds the result under json.document. Handles supported document, spreadsheet, text, JSON, XML, and Yandex Market YML formats, with optional DOCX formatting, JSON flattening, OCR for PDFs, and processing limits.

Inputs

  • Binary Property — Binary property containing the file; defaults to data.
  • Output Format — For DOCX files, choose plain text, HTML, or Markdown; defaults to plain text.
  • JSON Output Mode — For JSON files, preserve the nested structure or flatten it into dotted keys; defaults to preserving structure.
  • Keep Source Binary — When enabled, copies the input item’s binary data to the output; defaults to off.
  • Advanced Options — Sets file size and processing concurrency limits, CSV/XLSX row and text character limits, output size limit, and Office archive entry, expanded size, and compression ratio limits. Defaults include 50 MB per file, concurrency 4, 100,000 rows, and 1,000,000 output characters; zero disables supported limits.
  • OCR Mode — For PDFs, disable OCR, run it when no text is extracted, or always run it; defaults to disabled. OCR uses local Tesseract and PDF rendering dependencies.
  • OCR Options — When OCR is enabled, configures Tesseract languages and optional language data and cache paths, render scale, page limit, page timeout, and OCR concurrency. Defaults include English, scale 2, 10 pages, 60 seconds per page, and concurrency 1.

Output shape

One output item per input item, with the original JSON fields and a document object.

On success, document contains extracted text or spreadsheet sheets, plus warnings and metadata such as file name, size, detected type, and processing time. Parsed JSON, XML, and YML also include structured data; OCR results include OCR metadata. Text may be truncated at the output limit, while oversized structured output fails. With n8n’s Continue On Fail enabled, failures produce document.status: "error" with stage, code, message, and file name; otherwise processing throws. Source binary is included only when Keep Source Binary is enabled.

Links

Discussion