Home / Integrations / n8n / PDF and Office files to Markdown for LLMs

Updated

PDF and Office files to Markdown for LLMs in n8n

Run Document to Markdown & JSON (PDF, DOCX, PPTX, HTML, OCR) from n8n for feeding PDF and Office documents to an LLM, a RAG index or a knowledge base. The tool runs on Apify as plainprobe/document-to-markdown, returns one JSON item per document and costs $0.004 per document; failed items are not charged.

Download the n8n workflow (JSON)

Apify Store page

Steps

  1. Import the workflow. Download the ready workflow for this tool and import it in n8n (workflow menu, Import from File). It contains a manual trigger and an HTTP Request node that sends POST https://api.apify.com/v2/acts/plainprobe~document-to-markdown/run-sync-get-dataset-items.
  2. Add your Apify token. Create a Header Auth credential with name Authorization and value Bearer YOUR_APIFY_TOKEN (token from Apify Console, Settings, API & Integrations) and select it in the HTTP Request node.
  3. Set the input. Edit the JSON body of the HTTP Request node: put your own values in urls. Click Test workflow; each result comes back as one n8n item.
  4. Send results to Notion. Add an If node (status equals ok) and then a Notion node, and map the fields listed in the table below.
  5. Schedule it. Replace the manual trigger with a Schedule Trigger node and activate the workflow.

Alternative: if you installed the Apify community node, use its operation Run an Actor and get dataset with the Actor plainprobe/document-to-markdown and the same input.

Input to paste

The input is a JSON object; replace the example values with your own.

{
  "urls": [
    {
      "url": "https://arxiv.org/pdf/1706.03762"
    }
  ],
  "chunking": true
}

Which output fields to map to Notion

Each result contains these fields (shortened example below). A useful mapping to Notion, with an OpenAI or AI Agent step as another common destination:

Result fieldWhere it goes
titlepage title
markdownpage content, or the prompt sent to the AI step
pageCountnumber property: pages
wordCountnumber property: words
urlURL property: source document
{
  "url": "https://arxiv.org/pdf/1706.03762",
  "status": "ok",
  "format": "pdf",
  "title": "Attention Is All You Need",
  "pageCount": 15,
  "pagesConverted": 15,
  "truncated": false,
  "wordCount": 6383,
  "ocrPages": 0,
  "markdown": "Provided proper attribution is provided, Google hereby grants permission to\nreproduce the tables and figures\u2026",
  "error": null,
  "durationMs": 2126,
  "convertedAt": "2026-12-01T09:47:45Z"
}

A scheduled workflow you can copy

Every morning, convert the PDF reports published at a list of public URLs, send each markdown text to an AI step for a five-line summary, and save title, source URL and summary as a new Notion page.

What it costs

$0.004 per document (one document converted, first 50 pages included), billed by Apify per successful result, with no subscription. Failed documents are free. A 30-page text PDF costs $0.004, a 200-page manual $0.019, a 10-page scan $0.024.

Full details, benchmark and pricing table: Document to Markdown & JSON (PDF, DOCX, PPTX, HTML, OCR).

Questions about pdf and office files to markdown for llms in n8n

How much does pdf and office files to markdown for llms cost when run from n8n?

$0.004 per document (one document converted, first 50 pages included), charged by Apify to your Apify account; n8n only counts its own executions or operations. Failed items are not charged.

Can I send several items in one n8n run?

Yes. Put all of them in the urls list of the input; one Actor run returns one result per document, and n8n handles them as separate items.

Do I need the Apify community node?

No. The template uses n8n's built-in HTTP Request node. The Apify node (Run an Actor and get dataset) works too if you have installed it.

Same tool in other platforms: Make · Zapier · all n8n workflows