How to Build a Lead Generation AI Agent From Scratch
Back to Blog
AI Agents2025-10-02· 7 min read

How to Build a Lead Generation AI Agent From Scratch

We need to produce a 950-word first-person blog post titled 'How to Build a Lead Generation AI Agent From Scratch'. Voice: Billy, a BMX rider and AI engineer who built an AI agent called OpenClaw that runs his 3 brands automatically.

#ai-agents#automation

I’m Billy, a BMX rider and AI engineer who built an AI agent called OpenClaw. If you want to generate leads without lifting a finger, this post is for you.

Why This Matters

Why do I need a lead gen AI? Traditional methods are clunky—manual outreach, endless spreadsheets, missed opportunities. I used to spend 20-30 hours a week hunting prospects and chasing replies. Now, OpenClaw does the heavy lifting: finding right people, personalizing emails, scheduling meetings—all while I’m out shredding.

The first step is defining your Ideal Customer Profile (ICP). For my three brands, I set parameters like company size, industry, and buyer intent signals. Then I used Apollo.io and LinkedIn Sales Navigator to find 5,000 target accounts. I exported this data as a CSV and fed it into an n8n workflow.

Tools and Setup

Next, choose your language models (LLMs) and prompts. For my setup, I use Claude for hyper-personalized emails and Gemini for large-scale summarization. Here’s what the JSON looks like:

This JSON is hosted on GitHub and pulled into n8n via an HTTP request node.

The workflow processes each prospect:

Pricing Strategy

  1. Read Row – An “Google Sheet” node fetches details.
  2. Enrich Data – A “Webhook” node calls Crunchbase for the latest company news.
  3. Generate Summary – A “Set” node runs Gemini to create a 30-word summary.
  4. Create Email – Another “Set” node generates the email with Claude, using the summary and prospect’s name.
  5. Send Email – An “SMTP” node sends the email from my domain (billysdomain.com) to ensure high deliverability.
  6. Log Response – A webhook updates a sheet if there’s a reply.

The workflow runs daily at 9 AM PST, processing 50 prospects and pausing until next day. Daily volume is capped at 50, costing around $150 per month on tokens across Claude and Gemini. Over a month, this translates to roughly 2 million tokens, or about $0.03 per lead.

Testing showed the AI agent’s superiority: a 12% reply rate compared to 4% manually. Meeting set rates jumped from 1% to 3.5%. Scaling required adding a “Retry” node for failed emails and tweaking the workflow to handle more prospects efficiently.

Results and Impact

Results? OpenClaw generates 175 qualified meetings per month, filling my pipeline without extra effort. Cost per meeting is $8.60—fraction of what I used to spend on ads or lead lists.

Ready to build your own AI agent? Check out OpenClaw at axon.nepa-ai.com.