Match supplier invoices to purchase orders and post to Xero, QuickBooks, or Sheets using Gmail, OpenAI, and Telegram
Ready for 3.0What this workflow does
This workflow has 27 nodes and runs on Gmail events. Along the way it connects Gmail, Telegram and Google Sheets.
How it runs
Trigger: On Gmail events.
- Keep PDF Attachments Only (Code): runs custom JavaScript code
- Extract Invoice Text (Extract from File): extracts data from a file
- Read Invoice With LLM (HTTP Request): calls an HTTP API
- Send For Human Review (Telegram): uses Telegram
- Parse And Normalise Invoice (Code): runs custom JavaScript code
- Totals And Fields Valid? (If): checks a condition and branches into true / false
- Read Ledger (Google Sheets): uses Google Sheets
- Detect Duplicate Invoice (Code): runs custom JavaScript code
- Is New Invoice? (If): checks a condition and branches into true / false
- Read Purchase Orders (Google Sheets): uses Google Sheets
…plus 15 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other Telegram + Google Sheets templates (674) · Other Gmail + Telegram templates (361)
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) (Watch Invoice Inbox).
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (10)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Code
n8n-nodes-base.code - Extract from File
n8n-nodes-base.extractFromFile - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Telegram
n8n-nodes-base.telegram - Google Sheets
n8n-nodes-base.googleSheets - Switch
n8n-nodes-base.switch - No Operation, do nothing
n8n-nodes-base.noOp - Wait
n8n-nodes-base.wait
From the author
Quick overview Reads invoice PDFs from Gmail, matches every one to its purchase order, asks a human on Telegram to approve anything that does not reconcile, and posts approved bills to Xero or QuickBooks exactly once. How it works 1. A Gmail trigger polls a…