Business

Lead Cleanup Before CRM: Normalize, Dedupe, Then HubSpot

Sales teams waste time fixing what marketing and forms already collected: mixed-case emails, “Acme Inc” vs “Acme”, and the same lead posted twice from two campaigns. Template #264 Lead Cleanup → CRM accepts leads on a webhook, normalizes and dedupes them in SQLite, then creates a HubSpot contact only for clean new leads.

Load it from Studio Templates or the empty-canvas recipe Before leads hit the CRM… — no custom middleware service required.

Who this is for

  • RevOps and sales ops who own HubSpot hygiene
  • Marketing teams funneling forms, ads, and CSV imports into one intake URL
  • Anyone tired of duplicate contacts and messy company names

What template #264 automates

  1. Webhook intake — POST JSON: email, firstName, lastName, company, source
  2. Normalize — trim and lowercase email; trim names
  3. Dedupe — skip if the email already exists in cleaned_leads
  4. Company aliases — value mapper for common naming variants
  5. HubSpot create — then persist the cleaned row for the next check

One-time setup

  1. Create the SQLite table:
    CREATE TABLE cleaned_leads(
      email TEXT PRIMARY KEY,
      first_name TEXT,
      last_name TEXT,
      company TEXT,
      lead_source TEXT,
      updated_at TEXT
    );
  2. Load template #264 in Studio.
  3. Point forms/importers at the webhook; paste the HubSpot access token; extend company aliases.
  4. Dry-Run with a sample payload, then Activate.

Sample payload

{
  "email": " [email protected] ",
  "firstName": "Ada",
  "lastName": "Lovelace",
  "company": "Acme Inc",
  "source": "Landing"
}

The first POST creates a contact; a second with the same email is treated as a duplicate and does not create another HubSpot record.

Salesforce instead of HubSpot?

Swap the HubSpot node for Salesforce Create Lead (see Salesforce CRM automation) — keep the same normalize/dedupe front half.

Next steps

Nodlyn Assistant
Ask me anything about Nodlyn
Hi! 👋 I'm the Nodlyn assistant. Ask me about the product, workflow components, connectors, agent runtime, agent capabilities, deployment, and more. If I don't know an answer, I'll point you to our contact form.
Nodlyn Assistant
Ask me anything about Nodlyn
Hi! 👋 I'm the Nodlyn assistant. Ask me about the product, workflow components, connectors, agent runtime, agent capabilities, deployment, and more. If I don't know an answer, I'll point you to our contact form.