Gmail Invoice Auto-Classification with OpenAI & Google Sheets (n8n)
Gmail Invoice Auto-Classification with OpenAI & Google Sheets (n8n)
Regular price
£58.99
Regular price
£58.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
Gmail Invoice Auto-Classification with OpenAI & Google Sheets (n8n)
Regular price
£58.99
Regular price
£58.99
Sale price
Unit price
/
per
Auto-classify your Gmail invoices and book entries into Google Sheets—powered by OpenAI (n8n)
This Gmail Invoice Auto-Classification with OpenAI & Google Sheets (n8n) workflow scans your inbox every hour, uses OpenAI to classify unread emails (sales, expense, settlement, transaction, notification, other), extracts key invoice/payout fields, stores PDFs in Google Drive, and logs everything into Google Sheets—then labels and marks messages as read.
What this workflow does
- Runs hourly: fetches all unread Gmail messages on a schedule.
- Classifies each email with OpenAI based on the email subject and body into: sales, expense, settlement, transaction, notification, or other.
- Expense emails: extracts invoice fields (e.g., vendor, invoice number, GST split, amounts, and payment details). It also fetches any PDF attachment from Gmail, uploads it to Google Drive, and appends a linked row to the Expense tab in Google Sheets.
- Sales emails: extracts order details, generates an HTML sales confirmation, renders it to PDF with PDFBolt, uploads the PDF to Google Drive, and appends a linked row to the Sales tab in Google Sheets.
- Settlement emails: extracts payout details, uploads any PDF attachment to Google Drive, and appends a linked row to the Settlement tab in Google Sheets.
- Transaction/notification/other: applies the corresponding Gmail label and marks the message as read.
- Error handling: on failures, an error trigger uses OpenAI to translate the technical error, and alerts via Discord and Gmail.
Use cases
- Automatically turn vendor invoice emails into structured rows for accounting visibility in Google Sheets.
- Track sales confirmations by generating and storing PDFs while keeping order data synchronized in Sheets.
- Centralize settlement documentation (with PDFs) for easier monthly reconciliation.
Technical details (n8n)
- Integrations/nodes: Gmail, OpenAI, Google Sheets, Google Drive, Discord, PDFBolt
- Flow building blocks: if, code, switch, split out
