Folder of PDFs to Markdown notes with n8n

An n8n workflow that converts every PDF in a folder to a Markdown note in your Obsidian vault, with tables as Markdown tables and OCR for scanned pages.

Last updated

Operations submit_conversion_job, get_job, get_conversion_result
Platform n8n (self-hosted), with the flatmark community node
Output One .md note per PDF; images are not extracted

What it does

You keep notes as PDFs and want them in Obsidian as text you can link and edit. Copying text out works, but tables and scanned pages do not survive it.

The workflow reads every PDF in an inbox folder, sends each one to the flatmark queue and writes the Markdown into your vault, named after the PDF. Tables arrive as Markdown tables, and scanned pages are read with OCR.

Steps

  1. In a self-hosted n8n, install the community node @flatmark-dev/n8n-nodes-flatmark under Settings > Community nodes.
  2. Import workflow.json from the template folder below and add your API key as a flatmark API credential.
  3. Make your PDF folder and your vault folder visible to n8n. The workflow uses /home/node/.n8n-files/pdf-inbox and /home/node/.n8n-files/vault.
  4. Click Execute workflow. notes.pdf becomes notes.md in the vault.

Each run converts every PDF in the inbox, so move converted files out before the next run.

Get the template

The workflow and its README are on GitHub: templates/folder-to-markdown-notes.

Get your API key

Create an API key and paste it into the flatmark credential in n8n.

FAQ

Does the workflow keep the images from my PDFs?
No. flatmark returns text and tables. Put the PDF in your vault too and embed it in the note with ![[notes.pdf]] if you need the figures.
Does this work on n8n Cloud?
No. The workflow reads and writes files on the machine that runs n8n, which only a self-hosted n8n allows.