Extract and validate invoice data with OpenAI, Google Sheets, and Gmail
Ready for 3.0What this workflow does
This AI workflow has 22 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Google Sheets and Gmail. It also calls quickbooks.api.intuit.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).
- CONFIG - Invoices (Edit Fields (Set)): sets 3 fields: owner_email, log_sheet_id, accounting_note
- CONFIG - Invoices (Schedule) (Edit Fields (Set)): sets 3 fields: owner_email, log_sheet_id, accounting_note
- Validate File Type - Code (Code): runs custom JavaScript code
- Get Review Queue - Sheets (Google Sheets): read (sheet)
- If: checks a condition and branches into true / false
- Filter Pending Review - Code (Code): runs custom JavaScript code
- Extract Text - PDF (Extract from File): extracts data from a file (pdf)
- Respond Received (Respond to Webhook): sends the response back to the webhook caller
- Email Reminder - Gmail (Gmail): send (message)
- Extract Fields - Info Extractor (Information Extractor): extracts structured fields from text with AI, with model: Chat Model - Invoices
…plus 9 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
HTTP calls to: quickbooks.api.intuit.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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (12)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Extract from File
n8n-nodes-base.extractFromFile - Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Google Sheets
n8n-nodes-base.googleSheets - Gmail
n8n-nodes-base.gmail - HTTP Request
n8n-nodes-base.httpRequest - Respond to Webhook
n8n-nodes-base.respondToWebhook - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
Quick overview This workflow receives uploaded invoice files via a webhook, uses OpenAI to extract structured invoice fields, checks and logs invoices in Google Sheets, and emails status updates via Gmail, optionally posting clean invoices to your accounting…