Templates / Match supplier invoices to purchase orders and post to Xero, QuickBooks, or Sheets using Gmail, OpenAI, and Telegram

Match supplier invoices to purchase orders and post to Xero, QuickBooks, or Sheets using Gmail, OpenAI, and Telegram

Ready for 3.0

by Shuo Yuan ✓ · 3 views · created 2026-11-03 · Invoice Processing, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What 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.

  1. Keep PDF Attachments Only (Code): runs custom JavaScript code
  2. Extract Invoice Text (Extract from File): extracts data from a file
  3. Read Invoice With LLM (HTTP Request): calls an HTTP API
  4. Send For Human Review (Telegram): uses Telegram
  5. Parse And Normalise Invoice (Code): runs custom JavaScript code
  6. Totals And Fields Valid? (If): checks a condition and branches into true / false
  7. Read Ledger (Google Sheets): uses Google Sheets
  8. Detect Duplicate Invoice (Code): runs custom JavaScript code
  9. Is New Invoice? (If): checks a condition and branches into true / false
  10. Read Purchase Orders (Google Sheets): uses Google Sheets

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

Services it uses

GmailTelegramGoogle Sheets

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).
Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (10)

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…

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