File supplier invoices from Gmail to Google Sheets with Gemini and Telegram alerts
Ready for 3.0What this workflow does
This AI workflow has 17 nodes and runs on Gmail events. Along the way it connects Gmail, Google Drive, Google Gemini Chat Model and Telegram and 1 more.
How it runs
Trigger: On Gmail events.
- Your settings (Edit Fields (Set)): sets 3 fields: telegram_chat_id, sheet_url, drive_folder_url
- Read the PDF (Extract from File): extracts data from a file (pdf)
- Archive a copy in Drive (Google Drive): uses Google Drive
- Gemini pulls the numbers out (Information Extractor): extracts structured fields from text with AI, with model: Gemini 2.5 Flash
- Tidy up what Gemini found (Code): runs custom JavaScript code
- Did it read cleanly? (If): checks a condition and branches into true / false
- What's already filed (Google Sheets): uses Google Sheets
- Park it for a human (Telegram): uses Telegram
- Duplicate check & decide (Code): runs custom JavaScript code
- Safe to write? (If): checks a condition and branches into true / false
…plus 5 more steps. See the full node list below.
Services it uses
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) (Invoice lands in the inbox).
Nodes used (11)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Edit Fields (Set)
n8n-nodes-base.set - Extract from File
n8n-nodes-base.extractFromFile - Google Drive
n8n-nodes-base.googleDrive - Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Telegram
n8n-nodes-base.telegram - Google Sheets
n8n-nodes-base.googleSheets - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow monitors Gmail for unread emails with PDF invoice attachments, extracts key invoice fields from the PDF text, checks Google Sheets for duplicates, and either appends a clean row to an Invoices sheet or sends a Telegram message to…