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.
How it runs
The automated pipeline, trigger to output.
- TriggerInvoice email arrives in AP intake mailboxGmail
- ActionExtract and normalize invoice fields from attachment
- ActionFetch recent vendor payments from PostgresPostgres
- 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
- 1A new message in the AP intake mailbox triggers the run.
- 2Attached invoice fields are extracted and the vendor/amount/date are normalized.
- 3Postgres returns candidate payments from the last 90 days for the same vendor cluster.
- 4A fuzzy similarity score is computed across vendor, amount, and date.
- 5A logic branch routes high-confidence matches to review and low-confidence ones onward.
- 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.
- 1Connect GmailRead, draft, send, label.
- 2Connect PostgresAny Postgres URL — query, write, migrate.
- 3Connect SlackChannels, DMs, threads, mentions.
- 4Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
- 5Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
- 6Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.
More Invoice Processing workflows
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.
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.
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.
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.
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.
Detect duplicate Front invoices and archive originals to S3
Parses each Front vendor invoice, checks it against a history table for duplicates, archives the source PDF to S3 with a normalized key, and alerts AP when a duplicate is caught.
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.
