Quick overview
An AI agent reads each new lead, researches the company's website, checks HubSpot for history, and scores fit, intent and authority. Existing customers skip the AI and go straight to their owner. Every outside call retries and any failure reaches Slack.
How it works
- Capture: three ways in: the built-in n8n form, your own site's form via webhook, or the sample lead for testing.
- Clean up and check: Normalize lead maps your fields, spots personal and throwaway email addresses and sales-pitch spam. Skip repeats ignores the same person twice within dedupe_hours. HubSpot is checked first: existing customers go straight to Slack for their owner.
- AI agent with tools: the agent researches the company's site, looks the company up in HubSpot, thinks it through, and returns a structured score, reasons, red flags, a next step and a reply draft. Tell it what you sell and who your ideal customer is in Config.
- Your rules decide: Apply scoring rules sets the tier from the score and your thresholds, caps personal email addresses at warm unless the score is 90+, assigns an owner by company size from owners_json, and flags after-hours leads. The contact is upserted and the AI's reasoning is logged as a HubSpot note.
- Hot leads: reads your calendar's free/busy, picks one free time on each of the next three working days, opens a deal, holds the first time as a tentative event, emails the lead the three times plus your booking link, and alerts Slack with the score, reasons and owner.
- Warm and nurture: warm leads get the tailored reply and your booking link, and Slack is told. Nurture leads get a polite reply and stay in HubSpot with the nurture lead status.
- Failure alert: every HubSpot, calendar, email and AI step retries 3 times. Anything that still fails posts the step, the lead and the reason to Slack.
Setup
- Add credentials: OpenAI on OpenAI chat model; HubSpot App Token on the HubSpot steps and Look up company in HubSpot; Google Calendar OAuth2 on the two calendar steps; SMTP on the three reply steps.
- Fill in Config: what you sell, your ideal customer, thresholds, owners, calendar, booking link, signature, Slack URL.
- Click Test workflow to run the sample lead end to end.
- Share the Lead form URL, or point your site's form at Website form (webhook) and set the field_* names to match. Activate.
Requirements
- n8n 1.110+, OpenAI API key, HubSpot private app token (scopes: crm.objects.contacts, companies and deals read/write), Google Calendar, SMTP, Slack incoming webhook
Customization
- Your rules decide the tier: hot leads get a deal, three real free times from your calendar (the first one held), a tailored reply and a Slack alert to the right owner; warm leads get a reply with your booking link; nurture leads get a polite reply; spam is dropped.
Additional info
No credentials are included. More templates: n8n.io/creators/pushbuild