The problem
A business receiving vendor invoices by email had no consistent way to catch incomplete invoices, duplicates, or fraud attempts before they got paid. Every invoice went through the same manual review regardless of amount or risk, which meant small routine payments took as long to approve as large, unusual ones.
Why manual review wasn't enough
Invoices arrive in inconsistent formats from dozens of vendors, and a purely manual process can't reliably catch a duplicate submission or a vendor detail that's been altered. It also can't scale approval effort to match actual risk, a $50 recurring invoice and a $50,000 one-off both got the same treatment.
What I built
An AI-driven accounts payable intake system with a classification gate that checks each invoice as it comes in, routes incomplete invoices down a separate path for follow-up, flags duplicates, and checks vendor details against known fraud patterns. Approval routing runs on a three-tier system so review effort scales with risk instead of treating every invoice the same. A separate scheduled workflow sends a daily payables digest, and a payment confirmation reply loop closes the loop once an invoice is paid.
Architecture
Invoice received by email → AI classification gate checks completeness → duplicate detection against existing records → vendor fraud match check → routed into one of three approval tiers based on risk → approved or flagged → daily digest workflow summarizes pending payables → payment confirmation triggers a reply back to the vendor.
Tools used
n8n, AI classification, Supabase, structured document processing
Proof of concept
Built and tested against a 50-vendor dataset with 18 test invoices spanning all three approval tiers, each with distinct formatting and layout to simulate how differently real vendors actually format their invoices. A companion approval dashboard was also scoped, built on Supabase, Lovable, and n8n webhooks, so approvers can act on flagged invoices without digging through email.
Challenges
Getting the fraud match check to flag genuinely suspicious vendor detail changes without generating false positives on routine vendor updates took real tuning. The three-tier routing also had to be calibrated so low-risk invoices actually moved faster instead of getting stuck behind the same checks as high-risk ones.
What I'd improve next
Build out the approval dashboard fully so tier-two and tier-three approvals happen in one place instead of across email and Slack.