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
- Webhook intake —
POSTJSON:email,firstName,lastName,company,source - Normalize — trim and lowercase email; trim names
- Dedupe — skip if the email already exists in
cleaned_leads - Company aliases — value mapper for common naming variants
- HubSpot create — then persist the cleaned row for the next check
One-time setup
- 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 ); - Load template #264 in Studio.
- Point forms/importers at the webhook; paste the HubSpot access token; extend company aliases.
- 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.