BLOG ARTICLE

Automated Lead Scoring with n8n and HubSpot: a practical guide for B2B agencies

Reading time: 9 minutes

79% of B2B leads never convert into customers. Not because the product is wrong or the price too high, but because the sales rep calls the wrong person at the wrong time. The problem isn’t generating leads — everyone does that in 2026. The problem is knowing quali lead meritano attenzione immediata e quali vanno coltivati.

Il lead scoring automatico solves exactly this bottleneck. And when you implement it with n8n and HubSpot, you have a system that works 24/7, qualifies every contact in real time, and hands your sales team only concrete opportunities. In this guide I'll show you how to build it step by step, using the approach I apply at the B2B agencies I advise as a consultant.

What is lead scoring and why it’s crucial for B2B agencies

Lead scoring is a scoring system that assigns a numerical value to every contact based on how close they are to the ideal customer profile and how active they are in the buying journey. The higher the score, the more the lead is ready to be contacted by sales.

For a B2B agency, lead scoring isn’t a nice-to-have: it’s the difference between a sales team that burns hours on cold contacts and one that closes deals. The numbers speak clearly:

  • Companies with scoring lead B2B in place report a 77% increase in lead generation ROI (source: MarketingSherpa)
  • Average qualification time drops from 48 hours to under 5 minutes with automation
  • The lead-to-opportunity conversion rate grows by 30-50% when sales reps receive only qualified leads

The problem? Most Italian SMBs do scoring manually — if they do it at all. A spreadsheet updated by hand, a few gut-feel rules from the senior sales rep, no systematic process. The result is predictable: hot leads going cold, lost opportunities, revenue left on the table.

Il modello di scoring: criteri demografici e comportamentali

A model of lead scoring automatico n8n effective is based on two complementary dimensions: who the lead is (fit) and what the lead does (engagement).

Scoring demografico (fit score)

Measure how well the contact matches your Ideal Customer Profile. Each criterion adds or subtracts points:

CriterioCondizionePunti
Ruolo aziendaleCEO / Founder / Direttore Marketing+25
Ruolo aziendaleManager / Responsabile+15
Ruolo aziendaleStagista / Studente-10
Dimensione azienda10-250 dipendenti (sweet spot PMI)+20
SettoreThe agency’s vertical target+15
LocalizzazioneArea geografica servita+10
EmailDominio aziendale (no Gmail/Yahoo)+10
EmailDominio generico personale-5

Scoring comportamentale (engagement score)

Measures the intensity and quality of the lead’s interactions with your content and assets:

AzionePuntiDecadenza
Visita pagina pricing+2014 days
Download caso studio / whitepaper+1521 days
Compilazione form contatto+2530 days
Email open rate (single)+37 days
Click su link email+814 days
Visita blog post (3+ pagine)+1014 days
Richiesta demo / call+3030 days
No activity for 30+ days-15โ€”

La decadenza temporale is an element many overlook: a lead who visited the pricing page 3 months ago doesn’t have the same value as one who visited it yesterday. The score must reflect the current reality, not the complete history.

The total score (fit + engagement) determines the classification:

  • Hot (70+ punti): passaggio immediato al commerciale
  • Warm (40-69 punti): nurturing accelerato, follow-up entro 48h
  • Cold (sotto 40 punti): standard nurturing, educational content

Setting up n8n + HubSpot for automatic lead scoring

Why n8n and not Zapier or Make? For three reasons that matter in production: no execution limits (self-hosted), complex conditional logic without workarounds, and full control over data — essential for the GDPR compliance that B2B agencies must guarantee their clients. If you want an in-depth comparison, I wrote a complete analysis on n8n vs Make vs Zapier for Italian SMBs.

Prerequisiti

  • n8n installato (self-hosted su Railway/VPS o n8n Cloud)
  • HubSpot account with API key or OAuth configured (free plan sufficient to get started)
  • Custom property lead_score (tipo Number) creata in HubSpot Contacts
  • Custom property lead_tier (tipo Dropdown: Hot / Warm / Cold) in HubSpot Contacts

Connessione n8n โ†’ HubSpot

In n8n, create a HubSpot OAuth2 credential. Go to Settings → Credentials → Add Credential → HubSpot OAuth2 API. Enter the Client ID and Client Secret from your HubSpot app (Developer Portal → Apps). Authorize the following scopes: crm.objects.contacts.read, crm.objects.contacts.write, crm.schemas.contacts.read.

Test the connection with a HubSpot → Get Contact node. If it returns data, you’re up and running.

Workflow completo: dal form al commerciale qualificato

Here’s the workflow architecture of lead scoring HubSpot automated with n8n, broken down into 5 phases:

Fase 1: Trigger โ€” nuovo contatto o aggiornamento

The workflow is triggered by a HubSpot Trigger (evento contact.creation or contact.propertyChange) or with a Webhook that receives the data from the site’s form. I recommend the webhook: more flexible, it also works with non-HubSpot forms (Gravity Forms, Typeform, custom).

Phase 2: Enrichment — data enrichment

Before calculating the score, enrich the profile. A HTTP Request to the Clearbit, Apollo, or Hunter.io API returns job role, company size, and industry starting from the email alone. This fills in the fields the lead didn’t complete in the form — and that are essential for the fit score.

Fase 3: Calcolo dello score

A Code node (JavaScript) applies the scoring matrix. The code takes the enriched data, assigns points for each demographic and behavioral criterion, sums the total, and determines the tier (Hot/Warm/Cold). The advantage of n8n over native HubSpot: you can apply arbitrarily complex logic, weight the criteria differently per client, and add rules without the plan's limits.

Fase 4: Aggiornamento HubSpot

A HubSpot โ†’ Update Contact scrive lead_score and lead_tier on the contact. From this moment on, any sales rep who opens the CRM immediately sees the score and the classification.

Fase 5: Routing e notifica

A Switch smista il lead in base al tier:

  • Hot: immediate Slack/Telegram notification to the assigned sales rep + creation of a HubSpot task with a 2-hour deadline
  • Warm: placement in an accelerated nurturing email sequence (3 emails in 7 days)
  • Cold: placement in the standard sequence (weekly newsletter + educational content)

The result: zero forgotten leads, zero time wasted on unqualified contacts, and your sales reps receive only concrete opportunities with all the context they need for the first call.

AI scoring: using Claude to evaluate lead quality

This is where it gets to the next level. Rule-based scoring works well for 90% of cases, but theAI scoring captures the nuances the rules don't see.

Aggiungi a nodo HTTP Request in the workflow that calls the Claude (Anthropic) API with a structured prompt. You pass the model the lead’s data — email, company, role, form message, pages visited — and ask for an evaluation on three axes:

  1. Intent signal (0-10): how clear is the purchase intent in the message?
  2. Budget fit (0-10): does the company have a size and industry compatible with your pricing?
  3. Urgency (0-10): are there signals of time-based urgency (deadlines, launches, active problems)?

Claude returns a structured JSON with the three scores and a brief rationale. This AI score is added to the rule-based score with a weight of 30%, creating a hybrid system that combines the predictability of rules with the contextual intelligence of AI.

Real case: a lead with a low fit score (small company, generic role) but who wrote in the message “we need to launch by the end of the month, budget approved, looking for an agency that can start right away” was classified as Cold by the rules. The AI scoring detected intent 9/10 and urgency 10/10, bringing it to Hot. The contract was closed in 3 days.

If you want to explore more deeply how an AI agent can manage the entire lead generation funnel, read my guide on AI agent for lead generation with n8n and Claude AI.

Metrics to monitor and continuous optimization

A system of scoring lead B2B isn’t “set it and forget it”. It needs to be calibrated over time. These are the metrics I monitor monthly for each agency:

Metriche of accuratezza

  • Conversion rate by tier: do Hot leads actually convert more than Warm ones? If not, the model needs to be recalibrated
  • Average score of closed deals: reveals whether the Hot threshold is too high or too low
  • False positive rate: how many Hot leads don't convert? If it exceeds 40%, the rules are too lenient
  • False negative rate: how many closed deals had a score below 40? If this happens, you're losing opportunities

Metriche operative

  • Average time to first contact (for Hot leads): target under 1 hour
  • Tier distribution: if 60% of leads are Hot, the model isn’t filtering — raise the thresholds
  • Score decay effectiveness: do inactive leads actually lose points? Verify that the decay job is working

Every quarter, run a retrospettiva of the modello: take all the closed and lost deals from the last 90 days, analyze the scores at the moment of first contact, and adjust weights and thresholds. Two iterations are generally enough to reach an accuracy above 80%.

To also automate the nurturing emails that feed the scoring funnel, you can integrate the workflow with a system of email marketing automatico basato su n8n.

Approfondimenti consigliati

If you're building a marketing automation ecosystem for your B2B agency, these articles complete the picture:

Start today: the next lead could be the right one

Every day without automated lead scoring is a day your sales team wastes time on contacts who will never buy, while leads ready to sign go cold waiting for a call that comes too late.

The basic setup — n8n, HubSpot, scoring rules — comes together in an afternoon. AI scoring with Claude takes half a day more. The return? Visible from the first week, measurable from the first month.

If you want to implement an automated lead scoring system for your agency or your B2B clients and you’d rather have a partner who has already done it, contact me for a free consultation. Together we'll analyze your funnel and build the scoring model tailored to your business.


Mattia Calastri — AI and marketing automation consultant in Verona. I help agencies and B2B SMBs turn manual processes into automated systems that generate predictable revenue. Specialized in n8n, HubSpot, and AI integrations.

EXPLORE MY SERVICES

Digital solutions tailored to you.

I customize every digital solution to perfectly meet your needs. With my Full-Stack Marketing service, I position your brand online making it functional and operational in one week!

DIGITAL MARKETING Blog

SEO and AI Strategies for Business.

Discover the ultime tendenze and strategies of digital marketing, SEO and artificial intelligence. Practical tips to grow your business online.