Templates / Extract structured invoice JSON from PDFs with Mistral OCR and an LLM API

Extract structured invoice JSON from PDFs with Mistral OCR and an LLM API

Ready for 3.0

by Venkata V ✓ · 297 views · created 2026-04-22 · Invoice Processing, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 8 nodes and runs when an HTTP POST request hits its webhook URL. It uses only n8n's built-in nodes. It also calls api.mistral.ai over HTTP.

How it runs

Trigger: When an HTTP POST request hits its webhook URL.

  1. Mistral OCR (Mistral AI): uses Mistral AI
  2. Normalize OCR Text (Code): runs custom JavaScript code
  3. LLM Extract JSON (HTTP Request): calls api.mistral.ai (POST)
  4. Clean JSON (Code): runs custom JavaScript code
  5. Confidence >= 0.5? (If): checks a condition and branches into true / false
  6. Respond OK (Respond to Webhook): sends the response back to the webhook caller
  7. Respond Review (Respond to Webhook): sends the response back to the webhook caller

HTTP calls to: api.mistral.ai

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (6)

From the author

N8N AI LLM Unstructured Invoice data PDF OCR recognition to JSON output API What this workflow does 1. Accepts a PDF or image upload via Webhook as binary property "data" 2. Runs OCR with the Mistral OCR node 3. Normalizes OCR text 4. Sends OCR text to an LLM…

Excerpt from Venkata V's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.