Templates / Extract structured invoice data from text with OpenAI

Extract structured invoice data from text with OpenAI

Ready for 3.0

by Laurence NIcolaou · 1 views · created 2026-09-02 · 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 manually, when you click “Execute workflow”. It uses only n8n's built-in nodes. It also calls api.openai.com over HTTP.

How it runs

Trigger: Manually, when you click “Execute workflow”.

  1. Set Invoice Text (Edit Fields (Set)): sets 1 field: invoice_text
  2. Set Extraction Prompt (Edit Fields (Set)): sets 2 fields: extraction_prompt, model
  3. Extract Invoice Data (OpenAI) (HTTP Request): calls api.openai.com (POST)
  4. Parse AI Response (Code): runs custom JavaScript code
  5. Route Error or Success (If): checks a condition and branches into true / false

HTTP calls to: api.openai.com

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

Quick overview This workflow lets you paste invoice text and uses OpenAI Chat Completions to extract normalized, schema-based invoice fields as clean JSON, routing parse or extraction failures to a separate error output. How it works 1. Starts when you run…

Excerpt from Laurence NIcolaou'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.