Email Automation
Log Gmail invoice attachments to Google Sheets with easybits and Telegram
When a new email arrives, it handles email using Easybits Extractor, Gmail, Google Sheets, Telegram.
What it does
## 🧾 Invoice Intake and Logging powered by easybits What it does Watches a Gmail inbox for unread emails with attachments, extracts the fields from any invoice it finds, logs new invoices to a Google Sheet, and sends a Telegram alert. Duplicate invoices are skipped automatically. How it works 1. The Gmail trigger polls every minute for unread mail and downloads attachments. 2. The Code node keeps only real attachments (drops inline images under 10 KB) and normalizes each one to the data binary key. 3. Loop Over Items processes one attachment per run, which the Extractor requires. 4. Supported file types (PDF, JPEG, PNG, WebP) go to the easybits Extractor, which returns the invoice fields plus a document_class. 5. Only documents classed as invoice continue. The sheet is checked by invoice number, and only unseen invoices are appended and announced on Telegram. Set up steps 1. Gmail trigger: connect your Gmail OAuth2 credential. Attachment download is already enabled. 2. Extractor: add your easybits Extractor credential and build a pipeline returning document_class, invoice_number, vendor_name, service_name, service_period, total_net, vat_amount, total_gross. 3. Google Sheets (both nodes): select your invoice spreadsheet and tab. Column headers must match the field names above. 4. Telegram: set your bot credential and replace the chat ID with your own. 5. Activate the workflow.
The steps
- Trigger: New Unread Email
- Code: Filter and Split Attachments
- Loop: Over Each Attachment
- Gmail: Mark as Read
- Check: Is Supported File Type
- Extract: Document Fields
- Check: Is Invoice
- Sheets: Find Existing Invoice
- Check: Is New Invoice
- Sheets: Append Invoice Row
- Telegram: Send Invoice Alert
Similar automations
Finance, Invoices & AccountingCreate and Email Invoice Ninja Invoices from Sheets4 stepsFinance, Invoices & AccountingReceive Updates for New Invoice Ninja Invoices1 stepsRAG & Knowledge BasesForward Email Attachments with OpenAI RAG and Pinecone11 stepsFiles & Cloud StorageSave Gmail Invoice Attachments into Monthly Google Drive Folders20 steps