FINANCE

Detect Duplicate and Suspicious Expense Claims

On each new expense, scans Postgres for matching amount, merchant, and date from the same employee to catch duplicates and split-charge patterns.

CategoryFinance
Enginesim
Difficultyadvanced
Triggerevent
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerNew expense record createdPostgreSQLPostgres
  • ActionQuery employee's recent expensesPostgreSQLPostgres
  • LogicScore for duplicates and split patterns
  • LogicBranch: clean vs. suspicious
  • ActionOpen Linear investigation taskLinearLinear
  • OutputAlert finance review channel in SlackSlack

What it does

Every new expense is checked against recent claims from the same employee for duplicates (same merchant, amount, and date) and for split-charge patterns that dodge approval caps. Suspicious claims are held, a structured investigation task is opened in Linear, and finance is pinged in Slack with the matching records side by side.

When to use it

Use it when accidental double-submissions or deliberate split charges are slipping through. It adds a fraud-and-duplicate gate before reimbursement without slowing down clean claims.

How it works

  1. 1A new expense record triggers the flow from Postgres.
  2. 2A query pulls the employee's recent expenses within a configurable lookback window.
  3. 3A logic step scores the new claim for exact duplicates and near-cap split patterns.
  4. 4A branch lets clean claims pass straight through with no action.
  5. 5For a suspected duplicate or split, the flow marks the claim On-Hold in Postgres.
  6. 6It opens a Linear task with the matched records and the detection reason.
  7. 7It alerts the finance review channel in Slack linking the task.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect PostgresAny Postgres URL — query, write, migrate.
  2. 2
    Connect LinearIssues, projects, cycles, triage.
  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.