BLOG ARTICLE

AI Agent for Lead Generation with n8n & Claude AI: Guida 2026

Reading time: 9 minutes

Un AI agent per la lead generation non è fantascienza, è uno strumento che puoi costruire oggi con n8n, Claude AI e un VPS da €6/mese. Ho costruito il mio primo AI agent nel 2025 per Astra Digital. In 60 giorni ha generato 47 lead qualificati senza intervento umano.

Non sto parlando di un chatbot che risponde “Grazie per averci contattato”. Sto parlando di un sistema autonomo che identifica prospect, li qualifica, scrive messaggi personalizzati e li inserisce nel tuo CRM, mentre dormi. In questa guida ti mostro esattamente come replicare questo sistema nel 2026, con strumenti open-source e costi sotto i €50/mese.

What an AI Agent is, and why it’s different from a chatbot

A chatbot answers questions. An AI agent makes decisions. The difference is structural, not cosmetic.

A traditional chatbot works with reactive: it receives an input, looks up an answer in a decision tree, and returns it. If the user steps outside the expected script, the chatbot freezes. The interaction ends there.

Un AI agent for lead generation operates with logic proactive. Ha obiettivi definiti, trovare prospect, qualificarli, avviare una conversazione, e sceglie autonomamente quali azioni eseguire per raggiungerli. Se un passaggio fallisce, cambia strategia. Se mancano dati, li cerca. Se un lead non risponde alla prima email, pianifica un follow-up con un angolo diverso.

In technical terms, an AI agent combines three capabilities a chatbot doesn’t have:

  • Reasoning: analizza il contesto e decide il prossimo step senza istruzioni esplicite
  • Tool use: interagisce con API esterne (CRM, email, database, scraping)
  • Memory: ricorda le interazioni precedenti e adatta il comportamento nel tempo

Secondo un report McKinsey del 2025, le aziende che adottano agenti AI per il sales development registrano una riduzione del 40-60% nel costo per lead qualificato rispetto ai processi manuali. Non è un vantaggio marginale, è un cambio di paradigma per le PMI italiane che competono con budget limitati.

The architecture of an AI Agent for lead generation

Before touching a single line of code, you need to understand the architecture. An AI agent for customer acquisition effective has four components:

1. The brain: Claude AI as the decision-making engine

Claude AI di Anthropic è il modello che uso come motore di ragionamento. Perché non GPT-4? Due motivi pratici: la finestra di contesto da 200K token permette di passare all’agente interi database di prospect senza chunking, e il costo per token è competitivo per volumi medio-alti. Nel mio setup, ogni ciclo di qualificazione lead costa circa €0,003, meno di mezzo centesimo.

2. The nervous system: n8n as the orchestrator

n8n is the open-source automation platform that orchestrates the entire flow. Unlike Zapier or Make, n8n lets you self-host on a VPS, eliminating execution limits and recurring costs. Each n8n workflow becomes a “reflex” of the agent: time-based triggers, webhooks, listeners on email or forms.

3. The memory: Supabase as the database

The agent must remember who it contacted, what it said, how the prospect responded. I use Supabase (managed PostgreSQL) for three tables: leads, interactions, scores. The free plan is enough for up to 500 active leads.

4. The hands: integrations with the outside world

The agent needs tools to act: email APIs (Brevo or SMTP), Google Sheets for shared reports, webhooks to receive data from your site’s forms, and optionally LinkedIn Sales Navigator for scraping profiles. Each integration is an n8n node.

How to build your AI Agent with n8n and Claude AI: step-by-step

Here’s the exact process I followed. Each step includes the logic, not just the “what to do.”

Step 1: Setup infrastruttura (30 minuti)

Get a VPS with at least 2 GB of RAM. The Hetzner CX22 at €5.83/month is the one I use. Install n8n with Docker:

docker run -d --restart unless-stopped -p 5678:5678 -v n8n_data:/home/node/.n8n n8nio/n8n

Set up a reverse proxy with Caddy for automatic HTTPS. Get a Claude API key from console.anthropic.com: servono circa €5 di credito per il primo mese di test.

Step 2: Workflow di raccolta lead (1 ora)

Create your first n8n workflow with a Webhook node as a trigger. This receives data from your site's forms (name, email, company, message). Connect it to a Supabase node that inserts the lead into the leads with stato new.

Aggiungi a nodo HTTP Request to the Claude API with this system prompt: “You are a sales analyst. Analyze this lead and assign a score from 1 to 100 based on: estimated company size, industry, urgency perceived from the message, implicit budget. Respond in JSON with the fields score, reasoning, next_action.”

The result is saved in the scores. Leads with a score above 60 move on to the next step. The others receive an informational email and stay in nurturing.

Step 3: Outreach personalizzato con Claude (2 ore)

This is the heart of theAI agent for customer acquisition. A second n8n workflow runs every morning at 9:00 AM and retrieves from Supabase all leads with a score above 60 and a status of qualified.

For each one, send Claude the lead’s profile along with 3-4 outreach emails that worked in the past (few-shot prompting). Claude generates a personalized email that:

  • Reference a specific element from the lead's original message
  • Offer a concrete benefit tied to the prospect's industry
  • Include a CTA with a Calendly booking link
  • Rispetta un tono professionale ma diretto, mai corporate-speak

The email is sent via Brevo API (free plan: 300 emails/day). The lead status changes to contacted.

Step 4: Follow-up intelligente (1 ora)

A third workflow checks every 48 hours whether leads in the status contacted hanno risposto. Se no, Claude genera un follow-up con un angolo diverso, non un reminder fastidioso, ma un contenuto di valore (caso studio, dato di settore, risorsa gratuita).

After three follow-ups with no reply, the lead moves to cold e entra in una sequenza di nurturing mensile a basso costo. Nessun lead viene mai cancellato, solo deprioritizzato.

Step 5: Dashboard e alerting (30 minuti)

Connect Supabase to Google Sheets with an n8n workflow scheduled every evening. You get an up-to-date dashboard with: total leads, average score, response rate, conversions. A Telegram alert notifies you when a lead with a score above 80 enters the system.

The results: what to expect in the first 90 days

Here is the real data from my agent, launched in October 2025 for Astra Digital:

  • Days 1-30: 12 lead raccolti, 8 qualificati (score >60), 3 risposte, 1 call prenotata. L’agente sta “imparando”, i prompt vengono raffinati in base ai risultati.
  • Days 31-60: 23 leads collected, 16 qualified, 9 replies, 4 calls. The response rate rises from 25% to 39% after tuning the outreach prompts.
  • Days 61-90: 35 leads collected, 23 qualified, 14 replies, 6 calls, 3 contracts closed for a total value of €4,800.

The average monthly operating cost was €38: VPS €6, Claude API €22, Brevo €0 (free plan), Supabase €0 (free plan), domain and DNS €10/year amortized. The ROI by the third month was 42x.

Attenzione: questi risultati riflettono un contesto B2B con ticket medio sopra i €1.000. Se vendi prodotti a €20, il modello va adattato, l’AI agent conviene quando il valore del singolo lead giustifica i costi di qualificazione.

Errori from evitare

In 14 months of working with AI agents, I’ve made every mistake possible. Here are the five that cost the most:

  1. Prompt troppo generici: “Scrivi un’email commerciale” produce spam. Il prompt deve includere contesto sul lead, esempi di email che hanno funzionato e vincoli precisi (lunghezza, tono, CTA). Investi il 60% del tempo di setup nel prompt engineering.
  2. Nessun human-in-the-loop: Nei primi 30 giorni, rivedi manualmente ogni email prima dell’invio. Usa un nodo n8n “Wait for approval” che manda la bozza su Telegram e aspetta il tuo OK. Dopo 30 giorni di dati, puoi attivare l’invio automatico per i lead con score sotto 70 e tenere la revisione solo per quelli ad alto valore.
  3. Ignorare the GDPR: Ogni email di outreach deve includere base giuridica (legittimo interesse per B2B, consenso per B2C), link di opt-out funzionante e riferimento alla privacy policy. Ho visto agenzie ricevere sanzioni da €5.000 per email automatiche senza opt-out. Non vale il rischio.
  4. Troppi follow-up: Tre follow-up è il massimo. Oltre, danneggi la reputazione del dominio e del brand. Configura un hard stop nel workflow n8n dopo il terzo tentativo.
  5. Not measuring cost per lead: Se il tuo agente genera lead ma il costo per acquisizione supera il 30% del ticket medio, stai perdendo soldi. Monitora il CPL settimanalmente e ottimizza i prompt di qualificazione per filtrare prima.

How much an AI Agent for lead generation costs

Here is the realistic breakdown for an Italian SMB in 2026:

  • VPS (Hetzner CX22): €5,83/mese, n8n + Caddy + monitoring
  • Claude API (Anthropic): €15-40/mese, dipende dal volume di lead. Con 100 lead/mese e 3 interazioni ciascuno, circa €25
  • Supabase: €0 fino a 500 MB di database, sufficiente per i primi 6 mesi
  • Brevo (email): €0 fino a 300 email/giorno, ampiamente sufficiente
  • Dominio + DNS: €10-15/anno

Totale: €25-50/mese per un sistema completamente operativo. Confrontalo con il costo di un SDR junior (€1.800-2.200/mese lordi) o con una campagna Google Ads (€500-2.000/mese per keyword competitive nel B2B italiano). L’AI agent non sostituisce queste attività, le amplifica, gestendo il lavoro ripetitivo di qualificazione e primo contatto.

If you’d rather not manage the infrastructure, n8n Cloud starts at €24/month with 2,500 executions included. You lose full control but gain ease of maintenance. For a detailed comparison of the platforms, read my n8n vs Make vs Zapier guide for Italian SMBs.

Approfondimenti consigliati

This article covers the architecture and setup of an AI agent for lead generation. To go deeper into individual components, I’ve written dedicated guides:

Next step: build your agent

Un AI agent per lead generation non è un progetto da “un giorno lo faccio”. È un asset che genera valore dal giorno in cui lo attivi, e migliora ogni settimana grazie ai dati che raccoglie.

If you want to build your agent with n8n e Claude AI but you’d rather have someone guide you through the setup, the prompt optimization, and GDPR compliance, book a free 30-minute consultation. Together we'll analyze your case, your industry, and the lead volume you can realistically expect.

No slide deck, no aggressive selling. Just numbers and a concrete action plan.

Mattia Calastri is an AI and marketing automation consultant in Verona. He helps Italian SMEs and professionals build customer acquisition systems powered by artificial intelligence, automation, and data. Founder of Astra Digital.

Sei una PMI di Verona o del Veneto?
Oltre alle guide, costruisco il cervello AI della tua azienda e ti porto clienti con Google e Meta Ads. Preferisci delegare tutto? agenzia AI a Verona →

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.