serverserv serverserv

AI lead scoring with Slack alerts: free n8n workflow template

By the serverserv team · 3 min read · Updated

Not every lead deserves a call today. This workflow asks an AI model to score each new lead from 1 to 10 against a description of your ideal customer, logs every lead with its score and reason, and pings your sales channel in Slack only for the hot ones.

Download the template

Free download
7 nodes · tested on n8n 2.35 · MIT licence · no credentials included
Download JSON
New leadWebhookScore leadAI AgentOpenAI Chat ModelOpenAI Chat ModelRead scoreCodeLog leadGoogle SheetsHot lead?IfAlert salesSlack
How the workflow is wired, from the trigger at the top. Dashed lines connect the AI model and memory to the agent.

How it works

  1. New lead receives the lead as JSON from your form, CRM or another workflow.
  2. Score lead asks the model for a score and a one-sentence reason, as JSON.
  3. Read score parses the answer safely: if the model returns something odd, the score is 0 rather than an error.
  4. Every lead is logged in Google Sheets, and leads scoring 7 or more go to Slack.

Nodes used: Webhook, AI Agent, OpenAI Chat Model, Code, Google Sheets, If, Slack.

What you need

  • An OpenAI API key, or another chat model
  • Google Sheets and Slack accounts

Set it up

  1. Import the workflow and describe your ideal customer in the system message of Score lead. Be specific: company size, need, budget, timing.
  2. Add your API key in OpenAI Chat Model, then connect Google Sheets and Slack.
  3. Create a sheet with the columns name, email, company, score, reason, received_at.
  4. Send your form or CRM's new leads to the webhook URL and activate the workflow.

New to importing? In n8n, open a new workflow, then either paste the copied JSON onto the canvas or use the menu (the three dots) and choose Import from file. Credentials are never included, so you connect your own accounts after importing.

Ways to customise it

  • Change the threshold in Hot lead? to fit your volume.
  • Look up the company's website with an HTTP Request node first and give the model more to work with.
  • Create the deal in your CRM for leads above 7 instead of only posting to Slack.

Security notes

The lead's message is written by a stranger, so the system message tells the model to ignore instructions inside it, and the score is clamped to 0 to 10 in code. Turn on Header Auth on the webhook so only your own systems can post leads.

Where to run it

Templates with webhooks or triggers need n8n running all the time and reachable over HTTPS. You can run n8n on your own computer to try it, but for real use it belongs on a server. serverserv n8n Hosting gives you n8n pre-installed on your own KVM server with HTTPS, from $14.99 a month with no execution limits, and we will set up your first workflow for you, this one included.

Questions

How accurate is AI lead scoring?

It is only as good as your description of a good customer. Review a few weeks of scores against real outcomes and adjust the prompt.

Can I use this with the website form template?

Yes. Point the website form template at this webhook, or merge the two into one workflow.

Is this n8n template free to use?

Yes. It is free under the MIT licence, for personal and business use. You need your own n8n instance and your own accounts for the connected apps.

Sources

Plans from $3.99/moSee plans