AP Invoice Matching
Example prompt: "When a vendor invoice arrives in our AP inbox, extract the vendor name, amount, and PO number. Match it against our purchase orders sheet. If it matches, log it as approved. If there's a discrepancy, send the details to #accounts-payable on Slack."
How to automate accounts payable invoice matching with GloriaMundo
The Problem
Accounts payable teams spend a significant portion of their week on three-way matching: comparing vendor invoices against purchase orders and delivery receipts to confirm that what was ordered, delivered, and billed all agree. When invoices arrive by email in varying formats, someone has to open each one, find the PO number, look it up in a spreadsheet, compare the amounts, and either approve or flag the discrepancy. At 50+ invoices per month, this is hours of repetitive cross-referencing that delays payments and frustrates vendors.
How GloriaMundo Solves It
We build a workflow that triggers when a new email arrives in the AP inbox matching a vendor invoice pattern. An LLM step extracts the key fields from the email body or attachment — vendor name, invoice number, PO reference, line items, and total amount. An integration step reads the purchase orders sheet from Google Sheets and finds the matching PO. A code step compares the invoice total against the PO amount, checking for discrepancies beyond an acceptable tolerance (e.g. 2%). A conditional step routes the result: matched invoices are logged as approved in the AP tracker sheet, while mismatches generate a Slack message to the accounts payable channel with the invoice details, PO details, and the specific discrepancy. Glass Box preview shows you every extraction, match result, and proposed action before anything is written or sent.
Example Workflow Steps
- Trigger (webhook): Fires when a new email matching the vendor invoice pattern arrives in the AP inbox.
- Step 1 (llm): Extract vendor name, invoice number, PO reference, line items, and total amount from the email body and any attachments.
- Step 2 (integration): Look up the referenced PO number in the purchase orders Google Sheet — retrieve the expected amount, vendor, and line items.
- Step 3 (code): Compare the invoice total against the PO amount. Check for discrepancies beyond the tolerance threshold and identify mismatched line items.
- Step 4 (conditional): If the invoice matches the PO within tolerance, route to approval. If not, route to review.
- Step 5 (integration): For matched invoices, log the approval in the AP tracker sheet with invoice number, amount, PO reference, and date. For mismatches, post the details to #accounts-payable on Slack.
Integrations Used
- Gmail — monitors the AP inbox for incoming vendor invoices
- Google Sheets — purchase orders reference and AP tracker for approved invoices
- Slack — discrepancy alerts sent to the accounts payable channel for manual review
Who This Is For
AP clerks, controllers, and finance managers at companies processing 30+ vendor invoices per month who want to reduce manual matching time and catch discrepancies before payments go out.
Time & Cost Saved
Manual three-way matching takes roughly 10-15 minutes per invoice, including the time to open the email, locate the PO, compare fields, and log the result. A company processing 50 invoices per month can expect to save 8-12 hours of AP time monthly. Beyond the time saving, automated matching catches discrepancies that manual review might miss under time pressure — reducing overpayments and duplicate payments. The workflow uses LLM, integration, code, and conditional steps, costing a few credits per invoice processed.