Skip to product information

n8n Workflow: OCR & Markdown PDF Chunks for RAG Indexing

n8n Workflow: OCR & Markdown PDF Chunks for RAG Indexing

 (200+Reviews)
Regular price £7.99
Regular price £7.99 Sale price
SAVE Sold out
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Workflow: OCR & Markdown PDF Chunks for RAG Indexing

n8n Workflow: OCR & Markdown PDF Chunks for RAG Indexing

Regular price £7.99
Regular price £7.99 Sale price
SAVE Sold out

Turn PDFs into RAG-ready Markdown chunks with OCR—resume safely with checkpoints

This n8n workflow extracts page-referenced Markdown from your PDFs, applies OCR when needed (or forces it), chunks the results for RAG indexing, and packages everything into a ZIP. If any pages fail, you’ll get a clear status and an updated checkpoint so you can resume without reprocessing everything.

What this workflow does

  • Accepts input via an n8n form: a PDF, optional checkpoint.json, an OCR strategy, and optional page exclusions.
  • Validates files and settings: checks file size/type, verifies exclusions, and if a checkpoint is provided, confirms it matches the same PDF and extraction settings.
  • Reads PDF metadata: uses pdfRest PDF Info to determine page count and confirm the document is not password-protected.
  • Processes pages in batches: selects up to a configured batch of unprocessed pages, reuses READY pages from the checkpoint, and skips excluded pages.
  • Extracts Markdown per page with OCR control: reads each page as Markdown and checks for sparse/damaged text. Auto mode applies OCR when needed; Force mode applies OCR to every selected page before Markdown extraction.
  • Creates a review + indexing package: generates source.md, chunks.json (READY pages, chunked within each page), manifest.json, and an updated checkpoint.json, then compresses to a ZIP for download.
  • Stops with actionable results: returns statuses like READY, NEEDS_REVIEW, or PARTIAL to guide your next resume run.

Use cases

  • Preparing a document library for RAG indexing with reliable page-level traceability.
  • Handling scanned PDFs by applying OCR only when text is sparse (Auto) or always (Force).
  • Resuming long PDF pipelines after failures using checkpoint.json and reviewing flagged pages before indexing.

Technical details

  • n8n nodes/workflow logic: if, code, form, sticky note, compression, form trigger.
  • PDF operations: @pdfrest/n8n-nodes-pdfrest community node (PDF Info).

Setup: Install the @pdfrest/n8n-nodes-pdfrest community node package (or update to the latest version) to enable the workflow’s PDF Info step.

View full details