Templates / Extract and validate invoice data from PDFs with DeepSeek and webhooks

Extract and validate invoice data from PDFs with DeepSeek and webhooks

Ready for 3.0

by Sirui W. · 0 views · created 2026-10-31

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-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

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.

  1. Settings (Edit Fields (Set)): sets 9 fields: llm_base_url, llm_model, llm_extra_body…
  2. Find PDF file (Code): runs custom JavaScript code
  3. Is it a PDF? (Switch): routes items into branches
  4. Extract PDF text (Extract from File): extracts data from a file (pdf)
  5. Mark as needs review (Code): runs custom JavaScript code
  6. Clean text (Code): runs custom JavaScript code
  7. Return result (Respond to Webhook): sends the response back to the webhook caller
  8. Has a text layer? (Switch): routes items into branches
  9. Extract fields with LLM (HTTP Request): calls an HTTP API (POST)
  10. 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.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (7)

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…

Excerpt from Sirui W.'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.