Lee este artículo en español.
OCR in n8n: Read Text from Images and Scanned PDFs
Short answer: First try n8n's free Extract From File node: if your PDF already has text, you don't need OCR at all. For images and scans, n8n's own nodes don't do OCR. You have two paths: a node for an outside service (Mistral AI, Mindee or Anthropic, each with its own account), or the HTTP Request node calling Cofferdock's Image OCR, which uses Tesseract, hosted by Cofferdock, and reads printed text in English and Spanish.
Receipts photographed with a phone, invoices sent as screenshots, scanned contracts: all of them hold text that a workflow can't use until it becomes real text. OCR (optical character recognition) turns the picture of a text into the text itself, so n8n can put it in a spreadsheet, a database or an email.
First check: does the PDF already have text?
Many PDFs are not scans. They were made from a document, so the text is already inside the file. The Extract From File node reads that text for free, with no account and no credits.
It does not read images or scans: in a scanned PDF the text is only a picture, so there is nothing for it to read. So check this first: open the PDF, try to select a word with your mouse. If you can select it, you don't need OCR.
Your options for images and scans
| Option | Account | Good for |
|---|---|---|
| Mistral AI (Extract Text) | Mistral | documents and images |
| Mindee | Mindee | invoices and receipts |
| Anthropic (Analyze Image) | Anthropic | describing or reading images |
| Cofferdock Image OCR | Cofferdock | printed text in English or Spanish, image not sent to a third-party AI |
The first three are n8n nodes for outside services. Each one needs its own account and its own billing. Cofferdock Image OCR is called with the HTTP Request node, so it works with any n8n setup, including self-hosted.
Step by step: Image OCR with the HTTP Request node
- Get the image into your workflow as binary data: for example, an email attachment from your email trigger, or a file downloaded with another HTTP Request node.
- Add an HTTP Request node after it and set these fields:
- Method: POST - URL: https://api.cofferdock.com/image-ocr?language=eng (use language=spa for Spanish) - Send Headers: on, with a header named x-api-key and your key as the value - Send Body: on - Body Content Type: n8n Binary File - Input Data Field Name: data
- Run the node. The text comes back in
{{ $json.text }}, and the score for how sure the engine is comes back inconfidence(0 to 100).
Keep your API key in n8n's credentials or environment settings, not typed in clear in every node.
Scanned PDFs
Images are one step. A scanned PDF has no text layer, so it needs one more tool first. Make a scanned PDF searchable (page: Cofferdock PDF OCR) takes the scanned PDF and returns a new PDF with an invisible text layer. The page looks the same, but you can now search and copy the text.
It costs 1 credit per page and works on up to 30 pages per call. Once the PDF is searchable, you can read its text like any text PDF, with Extract From File, or with Cofferdock's Extract text from a PDF tool.
A quick example
A common flow: photos of receipts arrive by email. An email trigger picks them up, the HTTP Request node sends each photo to Image OCR, and a Google Sheets node adds a row with the text.
Tip: use confidence in an IF node. Rows with a low score go to a person to review, and the rest go straight to the sheet. Note that Image OCR returns the raw text, not fields. It does not find the total or the date by itself, so you read those from the text in a later step.
Honest limits
- It is very good on clean printed text, such as a typed invoice or a printed page.
- Handwriting or poor photos (blurred, dark, folded) will give weak results. For those, a specialised paid service will do better.
- Only English and Spanish for now.
Prefer to see it in code?
This is the same call from a terminal. It sends a JPEG file called invoice.jpg:
curl -X POST "https://api.cofferdock.com/image-ocr?language=eng" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: image/jpeg" \
--data-binary @invoice.jpg
How much does it cost?
- Image OCR: 1 credit per image.
- PDF OCR (make a scanned PDF searchable): 1 credit per page.
- The free plan includes 50 credits a month, with no card. Paid plans add more credits.
- Failed calls are not charged.
FAQ
Does n8n have a built-in OCR node? n8n does not have an OCR node of its own. Extract From File reads text that is already inside a PDF, and n8n has nodes for outside services (Mistral AI, Mindee, Anthropic) that need their own accounts.
Which languages? English (eng) and Spanish (spa) for now.
Is my image sent to an AI company? No. Image OCR runs Tesseract on servers hosted by Cofferdock, and the image is not sent to any third-party AI provider.
Handwriting? It is not the best fit. Handwriting and poor photos give weak results, so use a specialised paid service for those.
Related guides
Try it yourself
Try Image OCR at cofferdock.com/image-ocr and make a scanned PDF searchable at cofferdock.com/pdf-ocr. The free sign-up is at cofferdock.com/register.