build it in 30 minutesby updated 6 min read

Build a Lead-Qualification Webhook in 30 Minutes

A form submission reaches an n8n webhook, an AI model scores the lead against your own criteria, hot leads go to Slack, every lead is logged, and out-of-scope inquiries get a polite, fixed decline.

Point the form's webhook at an n8n Webhook node set to respond immediately, score each lead with an Information Extractor node and an AI chat model, log it in a Google Sheet, and route it with a Switch node: hot leads to a Slack channel and out-of-scope inquiries to a fixed decline email sent through Gmail.

A contact form that drops every inquiry into one inbox makes someone read and sort each one before the good ones get an answer. This build does the sorting as each form comes in. An AI model scores the lead against criteria you write, a strong lead goes straight to a Slack channel with a short summary, every lead is logged in a Google Sheet, and an inquiry that's clearly outside what you do gets a polite decline that a person wrote in advance.

What the 30 minutes assumes

  • The form already exists and can send each submission to a webhook URL. The steps below use Typeform, which can.
  • You use n8n Cloud. There, Slack connects with the Connect my account button, and Gmail and Google Sheets connect through Sign in with Google, so no app setup is needed. On self-hosted n8n, a Slack bot token needs a Slack app installed by a workspace admin, and Google needs its own OAuth app, which adds time.
  • You've written down, in a few lines, who's a good fit for your firm and who isn't. The scoring is only as good as that description.

If you're weighing n8n against Zapier or Make for this, the n8n workflow automation guide compares them.

Step 1: Catch the form with a Webhook node

Create a workflow and add a Webhook node with the POST method. It shows two URLs. n8n registers the Test URL while you listen for a test event, and registers the Production URL when you publish the workflow. Use the Test URL while you build and switch the form to the Production URL before you go live.

Set Respond to Immediately, so n8n answers the form tool as soon as the data arrives and does the scoring afterwards. Typeform marks a delivery as failed if your webhook doesn't respond within 30 seconds, and then retries it, which can make the same lead arrive twice.

In Typeform, add the Webhook node's URL as a webhook on the form and send a test submission. Each Typeform delivery has a form_response object with an answers array, and each answer names its question with a field ref. Forms built in Typeform's editor get system-generated refs, and Typeform notes they can change between payloads, so check a real test payload to see which ref belongs to which question.

Step 2: Score the lead

Add an Information Extractor node and attach a chat model node, such as Anthropic Chat Model, as its model. In Text, map the answers you want scored: name, company, role, budget range and the message. Set Schema Type to Generate From JSON Example and paste:

{
  "fit": 4,
  "authority": 3,
  "specificity": 5,
  "urgency": 2,
  "priority": "hot",
  "summary": "Owner of a small accounting firm wants help setting up AI for client intake before tax season.",
  "next_question": "Which intake steps take the most staff time today?"
}

Then write the scoring rules in System Prompt Template:

You score inbound leads for {YOUR_FIRM}, which offers {YOUR_SERVICES}.
Good fit: {WHO_YOU_SERVE}. Not a fit: {WHO_YOU_DO_NOT_SERVE}.

fit, authority, specificity, urgency: each 1 to 5.
priority: "hot" if fit is 4 or 5 and specificity is 4 or 5,
"decline" only if the request is clearly outside the services above,
"warm" otherwise.
summary: at most 40 words, using only what the lead wrote.
next_question: one question that would move the conversation forward.
If the form is spam or empty, set priority to "warm" and say so in the summary.

n8n builds the schema from the example's property names and types, treats every field as required and appends its own format instructions, so the output comes back as named fields you can map in later nodes. Keep "decline" narrow. A lead the model isn't sure about should reach a person.

Step 3: Log every lead

Add a Google Sheets node with the Append Row operation and point it at a sheet with columns for the date, name, email, company, the four scores, priority and summary. Connect it straight after the Information Extractor, so every lead is logged, whatever branch it takes next. The sheet is also where you check the model's judgment after the first week.

Step 4: Route by priority

Add a Switch node on the priority field with three outputs: hot, warm and decline. Warm leads need nothing more, since they're already in the sheet for the normal follow-up.

Step 5: Alert Slack about hot leads

On the hot output, add a Slack node with the Send operation, pointed at a channel such as #sales-inbox. Map each placeholder below to a field from the form or the Information Extractor. A message like this gives the person who picks it up enough to act:

Hot lead: {{name}} at {{company}} ({{role}})
Scores: fit {{fit}}, authority {{authority}}, specificity {{specificity}}, urgency {{urgency}}
{{summary}}
Ask first: {{next_question}}
Reply to: {{email}}

A person still writes the reply. The point of the alert is that someone sees a strong lead soon after it comes in.

Step 6: Send a fixed decline

On the decline output, add a Gmail node with the Send a message operation. Write the decline yourself, once, and only fill in the name and topic from the form:

Hi {{name}},

Thanks for getting in touch about {{topic}}. It's outside the work our
firm takes on, so we're not the right people for it.

{{optional: one or two names of firms that do this work}}

Best of luck with the project,
{{your name}}

In the node's options, set Send Replies To an address someone reads, and turn off Append n8n attribution, which by default adds "This email was sent automatically with n8n" to the message. For the first week, consider routing declines to a Slack channel instead, and send them by hand until you trust the model's calls.

If a decline also promotes your services, read the FTC's CAN-SPAM compliance guide before you send it. The FTC decides whether the law covers a message by its primary purpose, and notes the law isn't limited to bulk email. For commercial messages, its requirements include honest header information and subject lines, identifying the message as an ad, your physical address, a way to opt out of future marketing email, and honoring opt-outs within 10 business days.

Step 7: Test, then publish

Submit four test forms: a strong fit, a vague one, a clear mismatch and a spam-like entry. Check the sheet, the Slack channel and the Gmail sent folder for each. Then switch Typeform to the Production URL and publish the workflow.

Before you rely on it

  • Protect the webhook. Keep the Production URL private. If your form tool can send a username and password or a custom header, the Webhook node can require basic auth or header auth. Typeform can sign each delivery with a secret you choose, sending the signature in a Typeform-Signature header as an HMAC SHA-256 of the payload. Checking that signature in n8n takes a few extra nodes, so add it once the main flow works.
  • Watch for failed deliveries. Typeform retries a failed delivery several times, and it disables a webhook that fails every time within 24 hours across more than 300 attempts, with a notification when it does.
  • Re-read the sheet weekly for the first month. If good leads land in warm, loosen the hot rule in the prompt. If the wrong people get declines, narrow the decline rule.

What to add next

  • A booking link in the Slack alert, so the first reply can offer a time.
  • Different criteria for each service line, chosen by a form field.
  • A weekly summary of leads by priority, built from the sheet.

Ship the basic version first, then adjust the scoring rules once real leads have gone through it.

Sources

  1. n8n docs, Webhook node (Test and Production URLs, Respond options, authentication, 16MB payload limit) (checked 2026-12-02)
  2. Typeform developer docs, Webhooks (30-second response window, retries, automatic deactivation) (checked 2026-12-02)
  3. Typeform developer docs, Example webhook payload (form_response, answers, field ref, hidden fields) (checked 2026-12-02)
  4. Typeform developer docs, Secure your webhooks (Typeform-Signature header, HMAC SHA-256) (checked 2026-12-02)
  5. n8n docs, Information Extractor node (Schema Type, Generate From JSON Example, System Prompt Template) (checked 2026-12-02)
  6. n8n docs, Slack credentials (Connect my account on n8n Cloud, bot token setup elsewhere) (checked 2026-12-02)
  7. n8n docs, Google OAuth2 single service (managed Sign in with Google on n8n Cloud for Gmail and Google Sheets) (checked 2026-12-02)
  8. n8n docs, Google Sheets node (Append Row) (checked 2026-12-02)
  9. n8n docs, Gmail node message operations (Send a message, Append n8n attribution, Send Replies To) (checked 2026-12-02)
  10. FTC, CAN-SPAM Act: A Compliance Guide for Business (checked 2026-12-02)
lead scoringwebhookn8nsales30 min build
go deeper

Worked steps, FAQs and resources on this topic.

read the guide
the list

Get the next one.

Field notes from real deployments, written the way this one was. No schedule promised and nothing sold to you. Unsubscribe whenever.

ready to ship?

Let's build yours.

Reading is the easy part. We do the work. Tell us what's broken and we'll tell you straight up whether we can help.

let's talk