Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / CRM & Sales Pipeline

CRM & Sales Pipeline

Create and deduplicate HubSpot contacts from website form webhooks

Runs on each website form submission, validates and normalizes the lead, then updates the matching HubSpot contact by email or creates a new one.

What it does

## Form leads to HubSpot contacts (clean and deduplicated) Send any website form to this webhook and every lead lands in HubSpot as a clean contact. Existing contacts are updated by email instead of duplicated. ### How it works 1. Webhook receives the form post (JSON or form-encoded). 2. Validate and Normalize checks the email, splits the name, fixes capitalization, formats the phone and maps the country to a 2-letter code. Bad leads get a 400 with the reason. 3. Find Contact by Email searches HubSpot. The contact is updated if it exists, otherwise created as a new lead. 4. Respond OK returns the contact ID and action to your form. ### Setup (about 10 minutes) 1. In HubSpot create a service key or private app token with crm.objects.contacts.read and crm.objects.contacts.write. 2. In n8n create a Header Auth credential: name Authorization, value Bearer YOUR_TOKEN. Select it on the three HubSpot nodes. 3. Optional: set sharedSecret in Settings and send it from your form in the x-form-secret header. 4. Activate the workflow and point your form at the Production URL of the webhook. ### Test it POST a JSON body such as name, email, company and country to the webhook URL. The response shows whether the contact was created or updated. ### Want more? Lead scoring, owner routing by region or round robin, and Slack alerts for hot leads are in the full HubSpot Lead Router: https://tidewellsystems.com/templates/

The steps

  1. Lead Form Webhook
  2. Settings
  3. Validate and Normalize
  4. Valid Lead?
  5. Reject Invalid Lead
  6. Find Contact by Email
  7. Contact Exists?
  8. Update Contact
  9. Create Contact
  10. Respond OK
  11. Build Contact Payload
  12. Summarize Result

Similar automations