Reads each invoice that arrives in Gmail, checks it against its purchase order, and asks your finance manager only when it is off.
Uses
Claude
Gmail
Google Sheets
Check invoices against purchase orders
Checking every invoice against its purchase order by hand is slow, and most of them are fine. When an email with an invoice attached arrives, this reads the vendor, amount and PO number from the PDF and looks the order up in your Purchase Orders sheet.
An invoice within 5% of its order is approved automatically. One more than 5% over, or with no matching order, goes to your finance manager to approve or reject. Every invoice and its outcome is added to your Invoice log sheet.
invoice_email.When an email arrives. Save it as invoice_email.poSheet to blank.logSheet to blank.financeManagerEmail to blank.invoice_email. Save it as attachments.Gmailinvoice.poSheet. Save it as po.Google Sheetsresult to Approved automatically.Set result to Approved automatically.po.rows[0].Amount to invoice.output.amount and save it as percent_over_po.po.count is 0 or percent_over_po is greater than 5If po.count is 0 or percent_over_po is greater than 5Yes
invoice.output.vendor that is over its purchase order or has none Save it as decision.
Who to ask: financeManagerEmailInvoice from invoice.output.vendor for invoice.output.amount, PO number invoice.output.po_number. The purchase order on file is for po.rows[0].Amount (blank means no purchase order with that number was found). An invoice is checked when it is more than 5% over its order or h...result to decision.decision.Change result to decision.decision.No
No steps
logSheet. Save it as logged.Google Sheets