Quick overview
Captures real estate leads from web forms, WhatsApp and Facebook Lead Ads, then deduplicates and qualifies them with DeepSeek AI.Assigns each lead to the next available agent through fair round robin rotation, logs everything in HubSpot, and automatically emails the agent lead details plus a booking link to the lead.
How it works
- Receives a new lead via one of three webhook endpoints (web form, WhatsApp, or Facebook Lead Ads).
- Normalizes the incoming payload into a consistent lead record (name, phone, email, message, and source) and standardizes the phone number.
- Searches HubSpot for the normalized phone number and stops the workflow when it detects a duplicate enquiry.
- Uses a DeepSeek chat model to classify the lead (type, priority, budget signal) and generate a one-sentence intent summary.
- Reads an Agents tab in Google Sheets, selects the agent with the oldest LastAssignedAt value, and updates their timestamp to claim the slot.
- Creates or updates the contact in HubSpot with the AI qualification fields and the assigned agent details.
- Sends an email to the assigned agent with the lead details and sends the lead an email with the agent’s booking link (or a fallback message if no agent is available).
Setup
- Add HubSpot credentials (app token/service key) and create the required contact properties: lead_type, priority, budget_signal, intent_summary, assigned_agent_name, assigned_agent_email, lead_status.
- Add a Google Sheets OAuth2 credential and create an Agents sheet with columns Name, Email, Status, LastAssignedAt, and CalComLink, then update the workflow’s spreadsheet and sheet references if needed.
- Add a DeepSeek API credential for the LangChain agent’s chat model.
- Add a Gmail OAuth2 credential and set the recipient fields in the two email steps (agent notification and lead reply) to use your desired addresses.
- Copy each webhook URL and configure your web form, WhatsApp provider, and Facebook Lead Ads integration to POST lead data to the matching endpoint paths.