Services Work Pricing About Blog Get in touch
Back to blog

How to build an AI-powered lead scoring system with GPT-4 and Make

Every B2B SaaS company faces the same problem at some point: too many inbound leads, not enough context to prioritise them. Sales reps end up spending 40–60% of their time on prospects who will never convert — not because they're lazy, but because the triage is genuinely hard without data.

We built a solution to this for Vantage CRM last quarter. The results were a 34% improvement in close rate and a lead response time that dropped from 4 hours to 90 seconds. In this post, I'll walk you through the exact architecture.

How the pipeline works

The system does four things automatically when a new lead comes in:

  1. Enriches the contact data using Clearbit
  2. Sends that data to GPT-4 with a custom scoring prompt
  3. Routes the lead to the correct sales rep in Salesforce based on the score
  4. Drafts a personalized outreach email for the rep to review and send

All of this happens in under 90 seconds from form submission. Here's how to build it.

💡
What you'll need: A Make.com account (Starter plan is fine), Clearbit API access, OpenAI API key, and Salesforce. The same logic works with n8n or Zapier if you prefer those.

Step 1: Capture the inbound lead

Start with a Make webhook that fires on every form submission. Your lead capture form should collect at minimum: first name, last name, email, company name, and optionally a brief description of what they're looking for.

In Make, create a new scenario and add a Webhooks → Custom webhook trigger. Copy the webhook URL and paste it as the form action (or configure your form provider to POST to it).

01

Test your webhook

Submit a test form entry and verify Make is receiving the correct field names. Pay attention to how email fields come through — you'll need the raw email address for Clearbit enrichment.

Step 2: Enrich with Clearbit

Add a HTTP → Make a request module with the Clearbit Enrichment API. Pass the email address from the webhook and you'll get back: company size, industry, funding stage, tech stack, revenue estimate, and more.

GET https://person-stream.clearbit.com/v2/combined/find?email={{email}}
Authorization: Bearer {{clearbit_api_key}}

Map the fields you care about for ICP scoring. For most B2B SaaS companies this is: company size, industry, funding round, and tech stack (particularly whether they're using tools that indicate budget and process maturity).

⚠️
Handle Clearbit misses: Clearbit won't return data for every email, especially personal addresses. Add an error handler that either skips enrichment and routes to a human review queue, or falls back to company domain lookup.

Step 3: Score with GPT-4

This is the key step. Add an OpenAI → Create a completion module. The model is gpt-4o. Write your system prompt like this:

You are a lead scoring assistant for a B2B SaaS company.
Score the following lead from 0 to 100 based on fit with our ICP.

Our ICP:
- Company size: 50-500 employees
- Industry: SaaS, Fintech, E-commerce
- Tech signals: Uses Salesforce or HubSpot
- Funding: Seed through Series B
- Budget signals: Has dedicated ops/RevOps team

Return a JSON object with:
{
  "score": number,
  "tier": "hot" | "warm" | "cold",
  "reasoning": "2-3 sentence explanation",
  "suggested_angle": "1 sentence on how to approach outreach"
}

Lead data:
{{enriched_lead_data}}

Pass the enriched Clearbit data as the user message. Set temperature to 0.2 — you want consistent, deterministic scoring, not creative variation.

03

Parse the JSON response

Use Make's built-in JSON parser to extract score, tier, reasoning, and suggested_angle from the GPT response. Always wrap this in error handling — occasionally the model will output slightly malformed JSON.

Step 4: Route to Salesforce

Use a Router module with three branches based on the tier field:

  • Hot (score 75+): Create a high-priority Lead in Salesforce, assign to your best closer, add to "Hot Inbound" sequence, trigger an immediate Slack notification to the rep
  • Warm (score 40–74): Create a standard Lead, assign by round-robin, add to nurture sequence
  • Cold (score 0–39): Create a Lead with low priority, add to long-term nurture, no immediate rep assignment

Step 5: Draft the outreach email

For hot and warm leads, fire a second OpenAI call to draft a personalised first-touch email. Pass the GPT scoring output (especially suggested_angle) along with the lead data.

Draft a short, personalized cold outreach email from a sales rep.

- First name: {{first_name}}
- Company: {{company}}
- Suggested angle: {{suggested_angle}}
- Keep it under 100 words
- No fluffy intros — get to the point
- End with a soft CTA to book a 20-minute call

Create a Salesforce Task attached to the lead with the draft email as the description. The rep reviews it, edits if needed, and sends. In practice, they use it verbatim about 70% of the time.


What to expect

After running this in production for 60 days at Vantage CRM:

  • Lead response time dropped from ~4 hours to 90 seconds
  • Close rate on "hot" tier leads improved by 34%
  • Reps reported spending ~60% less time on research before first outreach
  • The scoring matched rep intuition in about 80% of cases (the other 20% were edge cases they used to improve the ICP prompt)

"We'd tried to build this ourselves twice and given up. The Autegra version was in production in two weeks and it's been running without issues for four months."

The GPT scoring isn't perfect — no automated system is. But it doesn't need to be. It just needs to be fast, consistent, and better than "whoever looks at the inbox first."

If you want to build this for your team, book a discovery call and we'll scope it out together.

Autegra
Autegra
Automation & Integration Engineers