Quick Overview
This workflow receives lead data via a webhook, normalizes the fields, upserts the contact in HubSpot CRM, and posts a new-lead notification to a Slack channel before returning a JSON success response to the sender.
How it works
- Receives a POST request on a webhook endpoint with lead details.
- Normalizes incoming fields (first/last name, email, phone, company, source) and stamps a submission timestamp.
- Upserts the lead as a contact in HubSpot using the email as the unique identifier.
- Posts a formatted “New Lead” message with the lead details to a specified Slack channel.
- Returns a 200 JSON response confirming the lead was received.
Setup
- Add a HubSpot connection (Private App token) and select it in the HubSpot contact upsert step.
- Add a Slack OAuth connection and set the target channel (for example, #leads) for the notification message.
- Copy the webhook URL for the “lead-capture” endpoint and configure your form/app to send a POST payload that includes at least an email (optionally firstname/lastname/phone/company/source).