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.

CategoryInvoice Processing
Enginesim
Difficultyintermediate
Triggerevent
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerNew invoice email arrives in AP Gmail inboxGmailGmail
  • ActionExtract line items from attachment with OpenAIOpenAI
  • ActionLook up PO and receiving lines in PostgresPostgreSQLPostgres
  • LogicVerify qty within received and price within tolerance
  • ActionCreate approval task in Asana for matchesAsanaAsana
  • OutputReply on email thread flagging failed linesGmailGmail

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

  1. 1A new email with an attachment in the AP Gmail inbox triggers the run.
  2. 2OpenAI extracts vendor, PO reference, and line items from the attachment.
  3. 3Postgres is queried for the matching PO lines and their receiving quantities.
  4. 4A logic step verifies invoiced quantity does not exceed received quantity and price matches the PO within tolerance.
  5. 5Fully matched invoices create an approval task in Asana with line detail attached.
  6. 6Unmatched invoices reply to the originating email thread noting which lines failed.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GmailRead, draft, send, label.
  2. 2
    Connect OpenAIModels, embeddings, files.
  3. 3
    Connect PostgresAny Postgres URL — query, write, migrate.
  4. 4
    Connect AsanaTasks, projects, milestones — everywhere.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.