INVOICE PROCESSING
Email-Intake Invoice Match Against Postgres ERP
Catches invoices arriving in a shared Gmail inbox, extracts the line items, reconciles them to PO and receiving tables in your Postgres ERP.
How it runs
The automated pipeline, trigger to output.
- TriggerNew invoice email arrives in AP Gmail inboxGmail
- ActionExtract line items from attachment with OpenAIOpenAI
- ActionLook up PO and receiving lines in PostgresPostgres
- LogicVerify qty within received and price within tolerance
- ActionCreate approval task in Asana for matchesAsana
- OutputReply on email thread flagging failed linesGmail
What it does
Turns an AP email inbox into a self-clearing queue. Each inbound invoice is parsed, matched three ways against open POs and posted receipts in Postgres, and only fully reconciled invoices generate an approval task. Anything with a quantity, price, or missing-receipt discrepancy is held back and reported.
When to use it
Ideal when vendors email invoices to a central address and your purchase orders and receiving records live in a Postgres-backed ERP. Use it to stop unmatched invoices from ever reaching an approver.
How it works
- 1A new email with an attachment in the AP Gmail inbox triggers the run.
- 2OpenAI extracts vendor, PO reference, and line items from the attachment.
- 3Postgres is queried for the matching PO lines and their receiving quantities.
- 4A logic step verifies invoiced quantity does not exceed received quantity and price matches the PO within tolerance.
- 5Fully matched invoices create an approval task in Asana with line detail attached.
- 6Unmatched invoices reply to the originating email thread noting which lines failed.
Set it up
What you configure once, before turning it on.
- 1Connect GmailRead, draft, send, label.
- 2Connect OpenAIModels, embeddings, files.
- 3Connect PostgresAny Postgres URL — query, write, migrate.
- 4Connect AsanaTasks, projects, milestones — everywhere.
- 5Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
- 6Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
- 7Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.
More Invoice Processing workflows
Nightly audit that flags duplicate payments already made
Runs every night to scan the last 90 days of Stripe payments against your Postgres invoice ledger.
Agent that codes Front invoices to GL accounts and drafts a bill
An agent reads each Front vendor invoice, assigns GL account codes per line item using your chart of accounts and past coding history.
AI agent that investigates suspected duplicate invoices
When a new invoice can't be cleared by exact-match rules, an AI agent reviews paid history for near-duplicates (split bills, renamed vendors, rounding) and recommends pay, hold…
Gate invoice approvals on a duplicate cross-check
When an approver clicks Approve in your AP system, a webhook re-validates the invoice against paid history in Postgres and Stripe charges.
Catch duplicate invoices as they hit your AP inbox
Watches your accounts-payable Gmail inbox for incoming invoice emails, fingerprints each one, and routes likely duplicates to a review label instead of into the approval queue.
Block duplicate Stripe payouts before they send
When a new vendor invoice is queued for payment in Stripe, cross-check it against your paid-invoice history in Postgres and halt any payout that matches an already-paid invoice.
Run it inside a business
This workflow drops into a full company template. Import the org, and this is one of the playbooks its agents run.

Run this workflow in your colony.
14-day trial. No DevOps. No Sales call. Provisioned in under a minute.
