Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / Email Automation

Email Automation

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

When a new email arrives, it handles email with OpenAI / ChatGPT using Gmail, Google Sheets, Telegram.

What it does

## Approve supplier invoices from Gmail with GPT-4o-mini, duplicate checks, Telegram approvals and a weekly payment run ### How it works Every supplier email with a PDF is picked up from Gmail and the PDF text goes to GPT-4o-mini, which returns the invoice fields in a fixed JSON shape. Two Merge nodes check the invoice against your Vendors tab (known supplier, auto-approve limit) and your Bills tab (same vendor and number already recorded). A Switch then auto-approves small invoices from known vendors, blocks duplicates, parks unknown vendors for review, or asks the approver on Telegram with Approve / Reject buttons and waits for the click. Every outcome is written to the Bills tab, the email is marked as read, and finance is pinged about anything that is not a clean approval. Every Monday a payment run lists the approved bills due within 7 days. ### Setup steps - Create a Google Sheet with the tabs Vendors and Bills (columns in the section notes) and paste its ID into the Sheets nodes. - Connect Gmail, Google Sheets, OpenAI and Telegram; set the approver chat ID, the finance chat ID and the finance email. - Fill the Vendors tab: one row per supplier with an AutoApproveLimit. ### Customization Change the Gmail search, the 30-day default due date, the 70% confidence floor or the 7-day payment horizon.

The steps

  1. Watch Inbox for Supplier Emails
  2. Keep Emails with a PDF Attachment
  3. Set Email Fields
  4. Extract Text from PDF
  5. Read Invoice with GPT-4o-mini
  6. GPT-4o-mini Chat Model
  7. Enforce Invoice JSON Schema
  8. Set Invoice Fields
  9. Set Extraction Failed
  10. Alert Extraction Failure on Telegram
  11. Read Vendors
  12. Set Vendor Keys
  13. Match Vendor
  14. Read Bills

38 steps in total.

Similar automations