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

Library / AI Agents & Assistants

AI Agents & Assistants

Qualify and route inbound leads with GPT-4.1, HubSpot, Google Calendar and Slack

When a form is submitted, it runs an AI agent with OpenAI / ChatGPT using SMTP Email, HubSpot, Slack, Google APIs.

What it does

## Qualify inbound leads with an AI agent that researches, scores and routes them to HubSpot, Google Calendar and Slack ### How it works 1. A new lead arrives by form or webhook, is cleaned up, and repeats are ignored. 2. Existing HubSpot customers skip the AI and go straight to their owner in Slack. 3. An AI agent researches the company and returns a structured score, reasons and a reply draft. 4. Your rules set the tier, assign an owner, drop spam and log the result in HubSpot. 5. Hot leads get a deal, a held time and three free slots; warm leads get your booking link; nurture leads get a polite reply. 6. Any step that still fails after retries posts the reason to Slack. ### Setup steps - [ ] Use n8n 1.110 or later. - [ ] Add OpenAI credentials to OpenAI chat model. - [ ] Add a HubSpot private app token (contacts, companies and deals read/write) to the HubSpot steps. - [ ] Add Google Calendar OAuth2 to the two calendar steps and SMTP to the three reply steps. - [ ] Fill in Config: what you sell, ideal customer, thresholds, owners, calendar, booking link, signature, Slack webhook 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 match the field_* names, then activate. ### Customization Change the score thresholds and owners_json in Config, or edit the agent's instructions to fit your market.

The steps

  1. Lead form
  2. Website form (webhook)
  3. Test with sample data
  4. Sample lead
  5. Config
  6. Normalize lead
  7. Skip repeats
  8. Valid lead?
  9. Not a lead: ignore
  10. Find contact (HubSpot)
  11. Merge CRM record
  12. Existing customer?
  13. Customer message (Slack)
  14. Qualify lead (AI agent)

38 steps in total.

Similar automations