CRM
Dedupe a Postgres contacts staging table before CRM import
On a new batch upload, it normalizes and clusters duplicate rows in a Postgres staging table, collapses each cluster into one survivor with a merge keymap.
How it runs
The automated pipeline, trigger to output.
- TriggerNew batch lands in staging tablePostgres
- LogicNormalize emails, phones, and names
- LogicCluster rows and pick survivor per group
- ActionWrite survivors and merge keymap to PostgresPostgres
- OutputPost collapse summary to SlackSlack
What it does
Cleans contact data in a Postgres staging table before it ever touches your CRM. It normalizes emails and phone numbers, groups duplicate rows, merges each group into a single survivor filling gaps from siblings, and records which source rows mapped to which survivor.
When to use it
Use this ahead of bulk imports or migrations when raw CSVs and integrations dump dirty rows into staging. It keeps duplicates out of the live CRM and preserves a keymap so you can trace any survivor back to its original rows.
How it works
- 1A new batch landing in the staging table triggers the run.
- 2Normalize email casing, strip phone formatting, and standardize names in place.
- 3Cluster rows by normalized email and name, then pick a survivor per cluster and coalesce non-null fields.
- 4Write survivors to a clean table plus a source-to-survivor keymap for lineage.
- 5Send a Slack summary of how many rows collapsed, the merge ratio, and any clusters needing manual review.
Set it up
What you configure once, before turning it on.
- 1Connect PostgresAny Postgres URL — query, write, migrate.
- 2Connect SlackChannels, DMs, threads, mentions.
- 3Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
- 4Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
- 5Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.
More CRM workflows
Dormant Account Check-In Call Scheduler
On the anniversary of an account's last touch, books a tentative check-in call on the owner's Google Calendar and emails the contact a scheduling invite.
Weekly Dormant-Anniversary Cohort Digest
Every week, groups dormant Attio accounts by which last-touch anniversary they hit that week, builds a prioritized digest.
AI-Personalized Dormant Account Win-Back
On a dormancy anniversary, an agent researches the account's history and recent public signals, drafts a genuinely personalized win-back email.
Backfill Intercom conversation topics onto stale HubSpot contacts
Finds HubSpot contacts with no recent Intercom topic, pulls their conversation history from Intercom, classifies the dominant topic with OpenAI.
Daily orphaned-opportunity sweep with manager Slack digest
Each morning this scans Salesforce for open opportunities owned by inactive users and posts a per-manager digest in Slack listing the orphaned deals that need a new owner.
Tag closed Intercom conversations onto Salesforce contacts in real time
On each Intercom conversation close, classifies the topic with OpenAI and appends it to the matching Salesforce contact's activity timeline so the topic never goes stale…
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.
