Back to blog

How I Build Lead Automation with n8n and AI

Sebastian Relard

Sebastian Relard

Updated:
n8nAutomationAI

How I Build Lead Automation with n8n and AI

relard.dev

What Is Lead Automation?

Lead automation is the process of automatically qualifying, enriching, and responding to incoming contact requests without manual effort. A typical system combines web crawling, AI analysis, and automated email delivery. Companies save an average of 8-15 hours per week on manual lead processing.

The Problem

Every business knows it: A lead fills out a contact form, the request lands in someone's inbox, someone has to read it, categorize it, and write a suitable response. That takes time. Hours at best, often days.

According to a Harvard Business Review study, the chance of qualifying a lead drops by 10x if the first response takes longer than 5 minutes. The average response time for B2B companies? 42 hours.

What if the response came in 30 seconds and was still personalized?

The Solution: n8n + AI

I built a fully automated pipeline that does exactly that. The stack:

  • n8n as orchestrator (open-source, self-hosted, GDPR-compliant)
  • OpenAI GPT-4 for text generation and intent analysis
  • Firecrawl for website analysis and company research
  • Resend for transactional email delivery
  • Supabase for state management and logging
  • Airtable as demo CRM with lead tracking

How It Works: Step by Step

  1. Webhook receives the request: Name, email, website URL, project description come in
  2. Deterministic spam filtering: Disposable email check, risk scoring, duplicate detection
  3. Website gets crawled: Legal info, products, team info, industry are automatically extracted
  4. 3 separate AI calls: Intent extraction, company analysis, personalized email composition
  5. Email is rendered and sent: with professional HTML template, including scheduling proposals
  6. Lead is added to CRM: with score, category, and all collected data

The whole process takes 15-30 seconds. From form submission to email in the inbox.

Results in Numbers

MetricBefore (manual)After (automated)
Response time2-24 hours15-30 seconds
Personalization levelTemplate-basedCompany-specific
Processing effort per lead15-20 minutes0 minutes
Spam filteringManualAutomatic (95%+ detection rate)

What Makes the AI Different

The special part isn't that an AI writes the text. The special part is what it receives as input:

  • Company legal info (name, location, CEO)
  • Product portfolio and services
  • Industry and competitive context
  • The actual lead message with extracted intent

This doesn't produce a generic "Hello, we offer automation" email, but one that shows: "I know what you do, and here's how I can specifically help."

Technical Architecture

The pipeline consists of 5 connected n8n workflows with over 150 nodes:

  1. Main Pipeline: Input processing, AI analysis, email delivery
  2. Slot Management: Calendar integration with Outlook via MS Graph API
  3. TTL Cleanup: Automatic expiration and reminders for booked slots
  4. Reply Handler: Detection of appointment confirmations from incoming emails
  5. Hot Lead Alerting: Real-time notifications via Microsoft Teams

Tone as a Parameter

Another twist: The tone is configurable. The same lead can receive a professional email, one in startup style, or, for the demo, even one written as a pirate. This demonstrates the system's flexibility: The pipeline stays the same, only the tone changes.

Try It Live

The best part: You can test the system yourself. On my live demo you can enter any website and watch in real-time how the pipeline generates a personalized email.

No signup required. No cost. Just try it out.

Conclusion

Lead automation doesn't have to be expensive or complicated. With n8n as an open-source orchestrator and an AI that understands context, any business can respond to inquiries within seconds. Personalized and professional.

If you want to know what this could look like for your business: Let's talk.

Frequently Asked Questions

Share

Automation

Ready to automate?

I connect your systems and automate workflows with n8n. GDPR-compliant, self-hosted, ready to deploy.

Inquire About Automation