Extract and validate invoice data from PDFs with DeepSeek and webhooks
Ready for 3.0Ready 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-12-01.
What this workflow does
This workflow has 11 nodes and runs when an HTTP POST request hits its webhook URL. It uses only n8n's built-in nodes.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Settings (Edit Fields (Set)): sets 9 fields: llm_base_url, llm_model, llm_extra_body…
- Find PDF file (Code): runs custom JavaScript code
- Is it a PDF? (Switch): routes items into branches
- Extract PDF text (Extract from File): extracts data from a file (pdf)
- Mark as needs review (Code): runs custom JavaScript code
- Clean text (Code): runs custom JavaScript code
- Return result (Respond to Webhook): sends the response back to the webhook caller
- Has a text layer? (Switch): routes items into branches
- Extract fields with LLM (HTTP Request): calls an HTTP API (POST)
- Validate fields (Code): runs custom JavaScript code
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.
Check at runtime on n8n 3.0
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (7)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Extract from File
n8n-nodes-base.extractFromFile - HTTP Request
n8n-nodes-base.httpRequest - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick Overview This workflow receives invoice PDFs via a secured webhook, extracts the PDF text, uses an OpenAI-compatible chat completion API (DeepSeek by default) to return invoice fields as JSON, validates the extracted values, and responds with a single…