Client processing 320 invoices monthly. Manual process. Someone opens email, downloads PDF, types into spreadsheet, checks PO, enters into accounting system.
One year running this workflow caught $47,000 in overpayments. Small discrepancies nobody noticed. $200 here. $500 there.
THE MANUAL DISASTER:
AP team rushing through 300+ invoices monthly. No time to verify every line item. Copy-paste errors. Decimal mistakes. PO mismatches missed.
When auditors found $47K in overpayments across the year, everyone blamed "human error." But humans can't verify 320 invoices perfectly every month.
THE DISCOVERY:
Built community template for invoice routing. Added document extraction at the front.
Now invoices get read automatically. Vendor, amounts, line items, PO references - all structured before any human touches it.
THE WORKFLOW:
Gmail trigger catches invoices → Get message downloads PDF attachment → Code renames binary for extraction → Document extraction pulls structured data → Code validates calculations and required fields → Sheets lookup matches PO number → Code checks 2% tolerance → IF routes approved or flagged → Sheets logs with status → Gmail confirms approved or alerts on flagged.
12 nodes. Runs automatically.
THE EXTRACTION + VALIDATION PATTERN:
Single extraction: Pulls everything. Invoice number, dates, vendor info, line items with quantities and prices, subtotal, tax, total, PO reference, payment terms, bank details.
Code validation: Checks calculations match. Line items total equals subtotal? Subtotal plus tax equals total? Required fields present? Flags discrepancies automatically.
One extraction. Code validates. Clean separation of concerns.
THE TRANSFORMATION:
Before: 2-3 hours daily processing invoices. Inconsistent validation. Errors discovered during audits weeks later.
After: 20 minutes daily reviewing flagged items only. Consistent validation every invoice. Anomalies caught immediately. Confirmations sent automatically.
THE NUMBERS:
320 invoices monthly processed
$47,000 overpayments identified year one
Mostly quantity mismatches and duplicate charges
One vendor billing for items never ordered
Human review: Exceptions only
UNEXPECTED BENEFIT:
Invoice with math that didn't add up got flagged instantly. Line items totaled $3,200 but invoice said $3,800. Previous process would have paid the wrong amount. Now validation catches calculation errors automatically.
What validation rules would you add to catch overpayments?