Updated
How to Extract Text from a PDF in n8n (Scans, Tables and URLs)
1. Simple case: the built-in node
Read Binary File, Google Drive or an HTTP Request node with response format File gives you the PDF as binary data; then Extract From File, operation Extract From PDF, returns its text. It is free and runs inside n8n. Its limits: no OCR (a scanned PDF returns an empty string), tables come out as loose lines, multi-column pages can be read across the columns, and headings are lost, which hurts chunking for RAG.
2. URLs, scans and tables: one HTTP Request node
Header Auth credential: Authorization = Bearer YOUR_APIFY_TOKEN. Node: POST https://api.apify.com/v2/acts/plainprobe~document-to-markdown/run-sync-get-dataset-items, body JSON:
{
"urls": [{"url": "https://arxiv.org/pdf/1706.03762"}],
"chunking": true,
"includePages": true
}One item per document with status, title, pageCount, wordCount, markdown, ocrPages, chunks (each with text, headings, page_start and page_end) and, with includePages, each page's Markdown and tables as JSON records. DOCX, PPTX, HTML and images work the same way.
Or import the free n8n workflow template (setup note, Manual Trigger, HTTP Request node ready to run).
3. Send the text to an AI model or a vector store
- IF node on
statusequal took; route the others to a log or an alert witherror.code. - Split Out node on
chunksto get one item per chunk. - An embeddings node and your vector store (Pinecone, Qdrant, Supabase, Postgres pgvector), keeping
url,headingsandpage_startas metadata so answers can cite their source.
For a summary instead, pass {{ $json.markdown }} to an AI node; Markdown keeps headings and tables, which models read better than raw text.
4. Costs and limits
$0.004 per document with the first 50 pages included, $0.0001 per extra page, $0.002 per page read with OCR; failed documents are free. A 30-page text PDF costs $0.004, a 10-page scan $0.024. In our benchmark on 20 public PDFs (502 pages, 1 December 2026), all 20 were converted and 118 tables came back as Markdown and JSON. Files behind a login, handwriting and complex formulas are out of scope. Background: PDF to Markdown for LLMs and extract tables from a PDF.
FAQ
How do I extract text from a PDF in n8n?
For a PDF you already hold as a binary file, the built-in Extract From File node (operation Extract From PDF) returns its text. For PDFs given by URL, scans, tables or long documents, an HTTP Request node can POST the URLs to a document conversion Actor on Apify and get back Markdown, page count, tables as JSON and RAG chunks.
Can n8n read scanned PDFs?
Not with the built-in node: a scanned PDF has no text layer, so Extract From PDF returns an empty string. Send it to a converter with OCR instead; Plainprobe Document to Markdown runs Tesseract on pages without text and reports a confidence score per page.
How much does it cost?
With Plainprobe Document to Markdown, $0.004 per document (first 50 pages included), $0.0001 per extra page and $0.002 per OCR page. Failed documents are free.