Back to work

AI Lead Qualification & Outreach

An n8n agent that scores every inbound lead, drafts a tailored cold email, and ships it, before your SDR refreshes their inbox.

n8n workflow graph for AI Lead Qualification & Outreach, webhook intake, website fetch, GPT-5-mini scoring agent, conditional email + Slack delivery
Webhook → normalize → fetch site → GPT-5-mini agent → qualified branch: email + Slack + log01 / 01
Overview

I built an n8n workflow that takes a raw inbound lead, reads the company website, scores ICP fit with a GPT-5-mini agent, and either sends a personalized cold email + Slack ping, or logs the lead as skipped, all in a single POST.

The workflow exposes a single webhook endpoint. POST a lead firstName, lastName, email, company, website, notes, and the pipeline normalizes the payload, fetches and cleans the company's homepage, and hands a clean context block to a GPT-5-mini agent that scores ICP fit on a 0–10 scale and drafts a fully personalized cold email in one structured-JSON pass.

A strict output parser enforces the response schema (score, reasoning, subject, body) so downstream nodes never have to guess. An If node branches on the score: at 7 or above the lead is routed to Gmail for delivery, pinged into Slack for the team, and logged to a Leads data table as sent; below 7 it's logged as skipped so nothing is silently dropped.

The webhook responds to the caller immediately with the analysis, so the submitter gets instant feedback while the send + notify + log steps finish asynchronously on the qualified branch. OpenAI, Gmail OAuth2, Slack OAuth2, and the n8n Data Table node are wired in once through the credentials layer, no secrets in the workflow itself.

Stack
  • n8n
  • OpenAI (GPT-5-mini)
  • Gmail OAuth2
  • Slack OAuth2
  • n8n Data Tables
  • Webhook

Explore the code, or take it for a spin.