INVOICE PROCESSING

Catch near-duplicate emailed invoices with fuzzy vendor and amount matching

Triggers on invoices arriving by email, then fuzzy-matches vendor name and amount against recent Postgres payments to flag soft duplicates (re-sends, slight typos.

CategoryInvoice Processing
Enginesim
Difficultyintermediate
Triggerevent
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerInvoice email arrives in AP intake mailboxGmailGmail
  • ActionExtract and normalize invoice fields from attachment
  • ActionFetch recent vendor payments from PostgresPostgreSQLPostgres
  • ActionCompute fuzzy similarity score
  • LogicBranch on similarity confidence threshold
  • OutputPost side-by-side duplicate review to SlackSlack

What it does

Exact fingerprinting misses the messy real-world duplicate: the same invoice with a typo in the number, a vendor name spelled two ways, or an amount off by a rounding cent. This workflow ingests invoices from a shared AP inbox and runs a fuzzy similarity check against recently paid invoices, surfacing probable duplicates for human review rather than auto-blocking.

When to use it

Reach for this when your duplicates aren't byte-identical: vendors who resend with new reference numbers, OCR variance across scans, or amounts that drift by small adjustments. It's a review-first guard, so AP keeps control over borderline cases.

How it works

  1. 1A new message in the AP intake mailbox triggers the run.
  2. 2Attached invoice fields are extracted and the vendor/amount/date are normalized.
  3. 3Postgres returns candidate payments from the last 90 days for the same vendor cluster.
  4. 4A fuzzy similarity score is computed across vendor, amount, and date.
  5. 5A logic branch routes high-confidence matches to review and low-confidence ones onward.
  6. 6Probable duplicates post to a Slack review thread tagging the AP owner with both invoices side by side.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GmailRead, draft, send, label.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect SlackChannels, DMs, threads, mentions.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    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.