I’ve built a Doc4AI node for n8n to fix PDF/Office extraction issues in AI workflows

I’ve published a new n8n community node called n8n-nodes-doc4ai that focuses on one thing: turning real-world documents into clean, AI-ready text (and back into files when needed).

In many n8n setups, PDF and Office handling is fragile: errors like The API version "5.6.205" does not match the Worker version "5.3.31" and inconsistent extraction make RAG and LLM workflows hard to trust.

Doc4AI provides two operations:

  • Extract Text from File

    • Input: binary files (PDF, DOC/DOCX, XLS/XLSX, CSV, ODS)

    • Output: Markdown, HTML, or plain text

    • Extras: page ranges for PDFs, sheet selection for Excel, header handling, basic metrics (file size, raw chars, converted chars).

  • Convert Text to File

    • Input: text or JSON

    • Output: CSV, Excel (XLSX), HTML, or TXT

    • Supports JSON arrays and 2D arrays for spreadsheets, with custom sheet names and CSV delimiters.

On top of that, Doc4AI also includes:

  • Input size limiting
    You can configure a maximum input file size so oversized documents are rejected early and don’t blow up your AI pipeline or token budget.

  • Aggressive cleanup for AI consumption
    Doc4AI strips away unnecessary styles, boilerplate, and embedded base64 blobs, and keeps only the meaningful text and document structure that LLMs actually need to understand the content. This makes the extracted output much cleaner and more efficient for RAG and AI agents.

Typical use cases:

  • Ingest PDFs and Office docs for RAG (binary → cleaned Markdown → embeddings → vector store).

  • Build document Q&A flows where you need consistent, predictable text extraction.

  • Generate CSV/XLSX/HTML/TXT from AI outputs or processed data inside n8n.

You can install it via Settings → Community nodes → Install with the package name n8n-nodes-doc4ai, or run npm install n8n-nodes-doc4ai in your n8n directory and restart.
npm: https://www.npmjs.com/package/n8n-nodes-doc4ai

إعجاب واحد (1)