Templates / Approve supplier invoices from Gmail with GPT-4o-mini, Google Sheets and Telegram

Approve supplier invoices from Gmail with GPT-4o-mini, Google Sheets and Telegram

Ready for 3.0

by Vitaliy Voitik ✓ · 0 views · created 2026-09-04

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-10-19.

What this workflow does

This AI workflow has 38 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects Gmail, OpenAI Chat Model, Telegram and Google Sheets.

How it runs

Trigger: On Gmail events (plus 1 other trigger).

  1. Keep Emails with a PDF Attachment (Filter): keeps only the items that match a condition
  2. Read Bills for Payment Run (Google Sheets): uses Google Sheets
  3. Set Email Fields (Edit Fields (Set)): sets 9 fields: gmail_id, thread_id, from_email…
  4. Keep Approved Unpaid Bills (Filter): keeps only the items that match a condition
  5. Extract Text from PDF (Extract from File): extracts data from a file (pdf)
  6. Build Payment Run (Code): runs custom JavaScript code
  7. Read Invoice with GPT-4o-mini (AI Agent): runs an AI agent, with model: GPT-4o-mini Chat Model; output parser: Enforce Invoice JSON Schema
  8. Email Payment Run (Gmail): uses Gmail
  9. Split Out: splits a list into separate items
  10. Set Invoice Fields (Edit Fields (Set)): sets 21 fields: gmail_id, thread_id, from_email…

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

Services it uses

GmailOpenAI Chat ModelTelegramGoogle 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 Inbox for Supplier Emails).

Nodes used (17)

From the author

Quick Overview This workflow monitors unread Gmail messages with PDF attachments, extracts invoice details with OpenAI GPT-4o-mini, checks vendors and duplicates in Google Sheets, and routes approvals via Telegram. It records outcomes in a Bills sheet, alerts…

Excerpt from Vitaliy Voitik'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.