GenAiHub

Last checked 24 November 2026 — responded normally.

Extract and validate invoice data from Gmail to Google Sheets with EmpirioLabs

Quick Overview

Live
Open / InstallLast updated November 24, 2026

Description

Quick Overview This workflow watches Gmail for emails with invoice attachments, uses EmpirioLabs AI to OCR each PDF or image and extract key invoice fields, then logs validated results to Google Sheets and emails a reviewer when an invoice is missing required data or totals do not match. How it works Triggers every 5 minutes by polling Gmail for messages matching a search query (default: emails with attachments and “invoice” in the subject) and downloads attachments. Splits each email into individual items per PDF or supported image attachment, skipping small images (like logos) and oversized files. Uses EmpirioLabs AI Document Read (OCR) to convert each attachment into text, and skips extraction when no text is found. Uses an EmpirioLabs AI chat model to extract invoice fields (vendor, invoice number, dates, currency, subtotal, tax, total) as JSON, then validates required fields and checks that subtotal plus tax matches total. Reads the existing invoice log from Google Sheets and compares by a generated invoice key to skip duplicates or flag invoices whose totals changed. Appends or updates the invoice row in Google Sheets, and emails a reviewer via Gmail when the invoice status is marked “Needs review.” Setup Install the EmpirioLabs AI community node (n8n-nodes-empiriolabs v0.3.0+) and add an EmpirioLabs AI API key credential. Add Gmail and Google Sheets credentials with access to the mailbox and the target spreadsheet. Create a Google Sheet with the expected columns (including “Invoice key” as the matching column) and set the spreadsheet URL, sheet name, and reviewer email in the workflow settings. Update the Gmail search query and select the EmpirioLabs AI document model (OCR) and chat model used for extraction. An n8n automation workflow template by EmpirioLabs AI.

Community Metrics

Views
0
Avg Rating
N/A
Ratings
0
Likes
0
Comments
—

Author

EmpirioLabs AI

Platform

web

Pricing model

free

Categories

  • Automation

Tags

  • n8n
  • workflow
  • google-sheets
  • gmail
  • code

Capabilities

  • 3 nodes

Information

TypeWorkflow
Sourcen8n
AddedNovember 17, 2026

Comments

?

Others in the same category, ranked by how often they are opened.