CRM

Inbound Lead Dedupe Gate with Postgres Match and Slack Escalation

Intercepts every inbound lead webhook, checks it against a Postgres contacts store for an existing match, and either enriches the existing record, creates a new one.

CategoryCRM
Enginesim
Difficultyintermediate
Triggerwebhook
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerInbound lead webhook receivedHTTP webhook
  • ActionQuery Postgres for exact match on email or phonePostgreSQLPostgres
  • LogicBranch: exact match, no match, or fuzzy near-match
  • ActionEscalate near-match comparison to Slack for survivorship callSlack
  • ActionWrite resolved contact state to PostgresPostgreSQLPostgres
  • OutputReturn resolved contact id to webhook caller

What it does

It sits in front of lead capture and prevents duplicates from ever entering the database. Each new lead is matched against your Postgres contacts table; exact matches update in place, clean misses become new records, and ambiguous near-matches are paused for human judgment.

When to use it

Use it when leads arrive from forms, ads, or partners and you want to stop duplicates at the door rather than cleaning them up later. Ideal when your system of record is a Postgres database you control directly.

How it works

  1. 1An inbound lead webhook triggers the flow.
  2. 2The flow queries Postgres for an exact match on email or phone.
  3. 3A logic branch routes the lead: exact match, no match, or fuzzy near-match.
  4. 4Exact matches enrich the existing row with any new non-empty fields; clean misses insert a new contact.
  5. 5Fuzzy near-matches post a side-by-side comparison to Slack with Merge or Keep Separate actions.
  6. 6The reviewer's choice writes the final state back to Postgres and the webhook caller gets the resolved contact id.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect PostgresAny Postgres URL — query, write, migrate.
  2. 2
    Connect HTTP webhookTrigger any URL on agent actions.
  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.