Onboard vendors and 3-way match invoices with Xero and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 39 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Gmail, Google Sheets and Xero. It also calls api.xero.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).
- CONFIG - Vendors (Edit Fields (Set)): sets 8 fields: owner_email, ap_email, sheet_id…
- CONFIG - Invoices (Edit Fields (Set)): sets 8 fields: owner_email, ap_email, sheet_id…
- Extract Vendor Data - Info Extractor (Information Extractor): extracts structured fields from text with AI, with model: Chat Model - Vendor
- Normalize Invoice - Code (Code): runs custom JavaScript code
- Validate Vendor - Code (Code): runs custom JavaScript code
- Lookup Vendor - Sheets (Google Sheets): read (sheet)
- If: checks a condition and branches into true / false
- Aggregate Vendors - Code (Code): runs custom JavaScript code
- Save Vendor - Sheets (Google Sheets): append (sheet)
- Email Vendor - Missing Info (Gmail): send (message)
…plus 26 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: api.xero.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 (10)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail - Google Sheets
n8n-nodes-base.googleSheets - Xero
n8n-nodes-base.xero - HTTP Request
n8n-nodes-base.httpRequest
From the author
Quick overview Onboard vendors and pay only matched invoices: AI verification with human approval, 3-way invoice matching within 2% tolerance, approved Xero payments, and a full Sheets audit trail — the whole procure-to-pay loop in one flow, unlike 18447,…