n8n Gmail Invoice Automation: Groq to Drive & Sheets
n8n Gmail Invoice Automation: Groq to Drive & Sheets
Regular price
£49.99
Regular price
£49.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Gmail Invoice Automation: Groq to Drive & Sheets
Regular price
£49.99
Regular price
£49.99
Sale price
Unit price
/
per
Automatically save Gmail invoices to Google Drive and keep your Billing Ledger updated with Groq
This n8n workflow watches your inbox for financial emails, uses Groq LLMs to classify and extract invoice/receipt details from attachments, uploads the documents into a structured `YYYY/MM` Google Drive folder, and upserts the results into a Billing_Ledger in Google Sheets. When everything is done, it sends a Telegram notification.
What this workflow does
- Gmail monitoring every minute: Triggers from a Gmail Trigger, skips emails in the Promotions category, and applies an inProgress label to track processing.
- Fetch + normalize email content: Retrieves the full Gmail message (including attachments), cleans the email body, and extracts attachment text via the any-file2json-converter sub-workflow when available.
- Groq-based email classification: Uses a Groq chat model to classify the email (e.g., financial/actionable/informational/Other), generate a cleaned “body core,” and then runs record-search and smart-CRM-fill sub-workflows for contact/CRM enrichment.
- Attachment-by-attachment invoice extraction: Routes only “financial” emails (optionally filtered by a sender whitelist), then uses Groq to classify each document as Invoice or Receipt and extract structured invoice fields.
- Google Drive organization + labeling: Derives the target year/month/category path, locates or creates it via gdrive-recursion, uploads the attachment, and applies a Gmail label indicating the document was saved.
- Ledger upsert to Google Sheets: Consolidates extracted data into one ledger row per invoice, using a stable synthetic key when no invoice number exists, and updates the Billing_Ledger (upsert behavior).
- Telegram completion alert: Notifies you when processing finishes.
Use cases
- SaaS operators who receive recurring invoices in Gmail and want them archived automatically.
- Teams that need a reliable Billing_Ledger in Google Sheets without manual data entry.
- Finance workflows that require consistent Drive folder structure and searchable document labeling.
Technical details
- n8n integrations/nodes: gmail, if, set, code, merge, switch
- LLM: Groq chat model for classification + extraction
- Sub-workflows: any-file2json-converter, record-search, smart-CRM-fill, gdrive-recursion
- Outputs: Google Drive upload + folder path logic, Google Sheets Billing_Ledger upsert, Telegram notification
