DEV Community

Cover image for AI Lead Generation Automation: From Website Research to Automated Outreach
Muhammad Arshad
Muhammad Arshad

Posted on

AI Lead Generation Automation: From Website Research to Automated Outreach

I recently built an AI lead generation automation workflow to solve a problem I was running into in my own prospecting process: too much repetitive work between finding a potential client and actually contacting them.

The goal wasn't to build a mass-email bot.

I wanted a system where I could research a business, identify a real website problem, prepare a relevant message, send it from my professional email, and record the outreach without manually moving the same data between multiple tools.

For this project, I connected ChatGPT, Make, n8n, SMTP, and Google Sheets.

This post explains how the pieces fit together and some of the implementation problems I had to solve.

The problem

My manual process looked roughly like this:

The individual tasks aren't difficult.

The problem is doing all of them repeatedly.

For every prospect, I was collecting the same information and entering it into the same places. That's where I saw an opportunity for AI lead generation automation.

I wanted AI to help with the parts that require research and writing, while an automation platform handled the repetitive data movement.

The architecture

The final system is split into two parts.

  1. The first part is the research and personalization layer.
  2. The second is the operational workflow.

This separation made the project easier to build and troubleshoot.

ChatGPT doesn't need to know how my email server works.

n8n doesn't need to perform the prospect research.

Make doesn't need to become my database.

Each component has a specific responsibility.

Using ChatGPT for website research

The useful part of my AI lead generation automation is not simply generating an email.

The research happens first.

I look for businesses where there is a legitimate opportunity for services such as:

  • WordPress development
  • Shopify/ecommerce development
  • Website modernization
  • Performance optimization
  • UX improvements
  • Technical cleanup

The important part is that the issue should be based on something actually visible or verifiable.

For example, during one prospecting run I found a business where public-facing service pages still contained unfinished “Slide title” text and an empty button area.

That is much more useful than telling an owner:

Your website could use some improvements.

  1. The first statement refers to something concrete.
  2. The second could have been sent to almost anyone.

That's the approach I wanted my AI lead generation automation to follow.

Turning research into structured data

Once a prospect has been researched, I keep the information structured rather than passing around a large paragraph.

A typical payload looks like this:

{
"business_name": "Example Business",
"state": "Texas",
"website": "https://example.com",
"contact_name": "Business Owner",
"email": "owner@example.com",
"technical_issue": "Specific website issue identified during research",
"service": "WordPress Development",
"lead_score": 9,
"pitch": "<p>Personalized outreach message...</p>",
"source": "Company Website",
"email_subject": "A website issue I noticed"
}

This structure became important later because every downstream step could work with the same fields.

For me, this was one of the biggest lessons from building the AI lead generation automation: good automation starts with clean data.

Why I used Make

I used Make as the connection layer between my prospecting process and my self-hosted n8n workflow.

The Make module sends a POST request to my n8n webhook with the prospect JSON.

The advantage of doing this through a structured webhook is that I don't need to manually transfer every field.

The data arrives at n8n ready for processing.

Make is therefore acting more like an integration bridge in this project than the main automation engine.

The n8n workflow

The backend is intentionally simple:

When the webhook receives the prospect data, n8n first records the lead.

The spreadsheet contains fields for the prospect, technical issue, service, lead score, email subject, email body, outreach status, and dates.

Then the workflow sends the email.

Finally, the lead record can be updated with the outreach state.

This gives me a central place to see which prospects were contacted.

Why I switched to SMTP

One of the practical improvements I made was replacing Gmail-based sending with SMTP.

I wanted the message to come from my professional business mailbox:

hello@arshadthaheem.com

The SMTP connection is handled by n8n.

That means my AI lead generation automation can receive the recipient, subject, and personalized content through the webhook and pass those values directly into the email step.

For a real business workflow, having the automation send through the correct business mailbox is an important part of the setup.

Keeping the outreach human

A major design decision was keeping a human in the loop.

I don't want AI to decide that a business should be contacted simply because it found an email address.

The workflow is designed more like this:

This is where I think AI lead generation automation is more useful than simply asking an AI model to generate hundreds of cold emails.

The automation removes repetitive work.

The human still makes the final decision.

One real outreach example

Here's the general transformation I used for one prospect.

Website observation

The service pages contained unfinished template content and an empty button area.

Potential problem

Those elements made the page look unfinished and could distract visitors from taking the next step.

Service angle

WordPress/custom development and conversion-focused cleanup.

Outreach

The final email was short, mentioned the exact issue, explained how I could help, included my portfolio, and ended with a direct CTA.

That's the core principle behind my AI lead generation automation:

Research first. Personalize second. Automate the repetitive steps after that.

Problems I ran into

The workflow wasn't perfect on the first attempt.

One issue was dynamic email-subject mapping.

The subject needed to come from the prospect payload correctly instead of relying on data being available from a later step.

Another issue was HTML formatting.

The personalized pitch already contained

elements, while the main email template was also wrapping that field in a paragraph tag. That produced nested HTML like:

<p>
<p>Personalized message...</p>
</p>

The fix was to treat the personalized pitch as already-formatted HTML and insert it directly into the email body.

These are small problems, but they demonstrate something important about AI lead generation automation:

The workflow can be conceptually correct while still failing because of a tiny mapping or formatting issue.

Testing before sending real outreach

Before relying on the system, I tested each layer separately. I verified:

I also used my own mailbox for controlled testing.

That made debugging much easier because I could determine whether a problem came from the payload, Make, n8n, SMTP, or Google Sheets instead of troubleshooting the entire system at once.

What this automation actually saves me

I'm not presenting this as a magic system that automatically generates customers.

The practical benefit is that it reduces repetitive operational work. The AI lead generation automation helps me:

  • Research prospects faster
  • Record structured lead information
  • Create personalized outreach
  • Send from my professional mailbox
  • Keep outreach records organized
  • Reduce repetitive data entry
  • Maintain a repeatable workflow

The biggest improvement is the consistency of the process.

Instead of rebuilding the same workflow manually for every prospect, I now have a system I can continue improving.

What's next?

This version is a foundation rather than the final system.

The next stage could include automatic website checks, more advanced lead scoring, CRM integration, reply classification, and automated follow-up sequences. For example:

Initial outreach

No reply

Follow-up

No reply

Mark for later

A more advanced website-analysis layer could also identify technical signals before a prospect enters the outreach stage.

That would allow the AI lead generation automation to do more of the repetitive qualification work while keeping final outreach decisions under human control.

Want the full case study?

This post focuses on the architecture and development approach.

I documented the complete workflow, implementation details, testing process, troubleshooting, and real-world examples in the full case study on my website:

Read the Full AI Lead Generation Automation Case Study →

You can also see my other web development and automation projects here:

Visit My Portfolio →

Interested in This Type of Automation?

If you're spending too much time on lead generation, data entry, email outreach, follow-ups, lead capture, or other repetitive processes, an automation may be able to take a large part of that workload off your hands.

I build practical automation systems using ChatGPT, n8n, Make, APIs, webhooks, SMTP, Google Sheets, and other business tools.

Interested in this type of automation? Fill out the contact form or Book a quick FREE Consultation to discuss what you could automate in your business.

Top comments (0)