Tech4Biz Wiki

Automating Lead Scoring & Follow-Up with HookPilot and ChatGPT

Here’s how we did it: Step 1: Capture Leads from CRM via Webhook We set up a webhook trigger in HookPilot to receive lead data directly from our CRM whenever a new lead is created. This data typically includes: Name Emai

Showcase record
Showcase category AI automation and workflows
Industry AI Automation & Workflows
Published 2 May 2025
Automating Lead Scoring & Follow-Up with HookPilot and ChatGPT

Here’s how we did it:

Step 1: Capture Leads from CRM via Webhook

We set up a webhook trigger in HookPilot to receive lead data directly from our CRM whenever a new lead is created. This data typically includes:

This webhook acts as the starting point for our automation.

Step 2: Score the Lead Using ChatGPT

After receiving the lead data, we send it to ChatGPT via HookPilot’s HTTP request action. A prompt like this is used:

“You are an intelligent assistant. Based on the following lead message, score the lead from 1 to 10 and provide a short justification.”

ChatGPT responds with something like:

{

“score”: 8,

“justification”: “The user has clearly expressed interest in our DevOps automation services and is looking for an immediate solution.”

}

This provides us a consistent, intelligent method of automated lead qualification.

Step 3: Parse the GPT Response

Since ChatGPT returns the score and justification in JSON format, we added a parse step in HookPilot using a small JavaScript snippet to cleanly extract the fields:

export const code = async (params) => {

return { …JSON.parse(params.content), num: Math.floor(Math.random() * 100000) };

};

This lets us reuse the score and justification in emails and logging.

Step 4: Email Lead Report to Admin

We use HookPilot’s email action to send the parsed score and justification to my inbox at jassim.mohammed@tech4biz.io. This email contains:

This gives us immediate insight into every lead’s quality.

Step 5: Generate Follow-Up Email Using ChatGPT

We again call ChatGPT, this time with a new prompt:

“Based on this lead and its score, write a friendly and professional follow-up email encouraging them to book a call.”

GPT replies with:

json

{

“emailBody”: “Hi [Lead Name], thanks for reaching out to Tech4Biz…”,

“emailRecipient”: “lead@example.com”,

“emailSubject”: “Thanks for contacting Tech4Biz!”,

“emailSignature”: “Jassim Mohammed\nDevOps Engineer, Tech4Biz Solution”

}

Step 6: Send Follow-Up Email to the Lead

HookPilot parses this content and automatically sends a personalized follow-up email to the lead with the GPT-generated content. This keeps the conversation going while we sleep.

Final Workflow Overview

  1. CRM sends new lead via webhook.
  2. ChatGPT scores and explains the lead.
  3. Parsed JSON is used to:
    • Email score report to admin
    • Ask ChatGPT to write a follow-up

Parsed follow-up email is sent to the lead.

Benefits

This system saves us hours every week and ensures no lead gets ignored.

If you’re using HookPilot, this is a lightweight yet powerful way to bring AI into your sales funnel with no middleware or bloated platforms.

Source