Automated invoice data extraction with LlamaParse, Gemini 2.5 & Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 17 nodes and runs on Gmail events. Along the way it connects Gmail, Google Sheets and Google Gemini Chat Model. It also calls api.cloud.llamaindex.ai over HTTP.
How it runs
Trigger: On Gmail events.
- Split Out: splits a list into separate items
- Email with Label Names (Merge): merges the data from its input branches
- Get Labels Names (Gmail): get (label)
- Should Process Email? (If): checks a condition and branches into true / false
- Combine Label Names (Aggregate): combines items into one
- Upload to LlamaParse (HTTP Request): calls api.cloud.llamaindex.ai (POST)
- Get Processing Status (HTTP Request): calls an HTTP API
- Is Job Ready? (Switch): routes items into 4 branches
- Get Parsed Invoice Data (HTTP Request): calls an HTTP API
- Wait: waits 1 seconds
…plus 4 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other Google Gemini + Google Sheets templates (819) · Other Google Gemini + Gmail templates (518)
HTTP calls to: api.cloud.llamaindex.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.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Receiving Invoices).
Nodes used (14)
- Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - HTTP Request
n8n-nodes-base.httpRequest - Gmail Trigger
n8n-nodes-base.gmailTrigger - Google Sheets
n8n-nodes-base.googleSheets - Wait
n8n-nodes-base.wait - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - Edit Fields (Set)
n8n-nodes-base.set - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - If
n8n-nodes-base.if - Split Out
n8n-nodes-base.splitOut - Aggregate
n8n-nodes-base.aggregate - Merge
n8n-nodes-base.merge - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
From the author
This n8n template demonstrates how to automate invoice data extraction from PDF attachments received via Gmail. Using LlamaParse and Gemini LLM, this workflow parses structured fields like PO numbers, line items, tax amounts, and totals — and stores them…