Prepare PDFs for RAG with pdfRest OCR and Markdown chunks
UnknownWhat this workflow does
This workflow has 28 nodes and runs when someone submits an n8n form (“Prepare a PDF for RAG”). Along the way it connects Pdfrest (community).
How it runs
Trigger: When someone submits an n8n form (“Prepare a PDF for RAG”).
- Settings (Code): runs custom JavaScript code
- Check upload and checkpoint (Code): runs custom JavaScript code
- Inspect source PDF (Pdf Rest): pdf info
- Explain preparation failure (Code): runs custom JavaScript code
- Plan next page batch (Code): runs custom JavaScript code
- Preparation could not finish (n8n Form): shows the next form page
- Loop pages (Loop Over Items (Split in Batches)): loops over the items in batches
- Mark preparation failure (Stop and Error): stops the run with an error
- Build review package (Code): runs custom JavaScript code
- Page work item (Code): runs custom JavaScript code
…plus 17 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
We can't fully verify this one: it relies on 1 community package, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
- Check that @pdfrest/n8n-nodes-pdfrest is verified or supports 3.0 (used in Inspect source PDF, Read original page, Isolate page for OCR).
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (8)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Code
n8n-nodes-base.code - Pdf Rest
@pdfrest/n8n-nodes-pdfrest.pdfRest - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - If
n8n-nodes-base.if - Compression
n8n-nodes-base.compression - n8n Form
n8n-nodes-base.form - Stop and Error
n8n-nodes-base.stopAndError
From the author
Quick overview Prepare PDFs for RAG with a low-code workflow that extracts Markdown, applies OCR when needed, and creates page-referenced text chunks. Resume processing from checkpoints, review flagged pages, and download the results before indexing in your…