Templates / Invoice data extraction with LlamaParse and OpenAI

Invoice data extraction with LlamaParse and OpenAI

Needs changes

by Jimleuk ✓ · 46,657 views · created 2024-07-09 · Invoice Processing, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: OpenAI Model. 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 17 nodes and runs on Gmail events. Along the way it connects OpenAI Model, Gmail and Google Sheets. It also calls api.cloud.llamaindex.ai over HTTP.

How it runs

Trigger: On Gmail events.

  1. Split Out: splits a list into separate items
  2. Email with Label Names (Merge): merges the data from its input branches
  3. Get Labels Names (Gmail): get (label)
  4. Should Process Email? (If): checks a condition and branches into true / false
  5. Combine Label Names (Aggregate): combines items into one
  6. Upload to LlamaParse (HTTP Request): calls api.cloud.llamaindex.ai (POST)
  7. Get Processing Status (HTTP Request): calls an HTTP API
  8. Is Job Ready? (Switch): routes items into 4 branches
  9. Get Parsed Invoice Data (HTTP Request): calls an HTTP API
  10. Wait: waits 1 seconds

…plus 4 more steps. See the full node list below.

Services it uses

OpenAI ModelGmailGoogle Sheets

HTTP calls to: api.cloud.llamaindex.ai

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • OpenAI Model: replace with OpenAI Chat Model.
  • Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Removed in 3.0Replace with
OpenAI Model
OpenAI Model
OpenAI Chat Model

Nodes used (14)

From the author

This n8n workflow automates the process of parsing and extracting data from PDF invoices. With this workflow, accounts and finance people can realise huge time and cost savings in their busy schedules. Read the Blog:…

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