Track supplier bills and missing invoices with Gmail, OpenAI, Sheets and Telegram
Ready for 3.0What this workflow does
This AI workflow has 27 nodes and runs on a schedule (every hour) (plus 1 other trigger). Along the way it connects Gmail, Google Sheets, OpenAI Chat Model and Telegram.
How it runs
Trigger: On a schedule (every hour) (plus 1 other trigger).
- Configuration (Edit Fields (Set)): sets 16 fields: gmailSearch, telegramChatId, timezone…
- Morning run? (If): checks a condition and branches into true / false
- Read all bills (Google Sheets): uses Google Sheets
- Find bill emails (Gmail): get many
- Read suppliers (Google Sheets): uses Google Sheets
- Read bills ledger (Google Sheets): uses Google Sheets
- Build supplier profiles (Code): runs custom JavaScript code
- List new PDF attachments (Code): runs custom JavaScript code
- Route daily results (Switch): routes items into 2 branches
- Extract PDF text (Extract from File): extracts data from a file (pdf)
…plus 13 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)
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 (13)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - Extract from File
n8n-nodes-base.extractFromFile - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Merge
n8n-nodes-base.merge - Telegram
n8n-nodes-base.telegram - Switch
n8n-nodes-base.switch
From the author
Quick overview This workflow runs hourly to capture supplier bill PDFs from Gmail, extract key fields with OpenAI, and log them to Google Sheets with Telegram alerts for duplicates or anomalies, then runs every morning to learn supplier billing rhythms from…