All projects
PROJECTBuilt

AI-Powered Lead Engagement

An end-to-end n8n lead automation system that sources targeted businesses through Apify, removes duplicate leads, enriches missing emails through Apollo, generates personalized outreach with Gemini, stores campaign data in Google Sheets and sends cold emails automatically.

I built an n8n workflow that coordinates the entire process automatically. Campaign requirements are collected through a form, Apify provides targeted business leads, existing emails are loaded to prevent duplicate processing, Apollo is used when a lead does not already contain an email address, and qualified leads are processed one by one. Gemini generates personalized email content from each lead's business information, the final email is formatted and stored in Google Sheets, Gmail sends the outreach message, and the workflow continues until the campaign has processed the required leads.

PROJECT MEDIA

Demo & screenshots

Complete n8n AI lead generation and cold email automation workflow
End-to-End n8n Lead Automation Workflow
Business leads automatically collected and stored in Google Sheets
Automatically Collected Business Leads
THE SYSTEM, STEP BY STEP

System flow

01Campaign Form
→
02Campaign Initializer
→
03Apify Lead Source
→
04Apify Result Retrieval
→
05Existing Leads Check
→
06Unique Lead Filter
→
07Email Check
→
08Apollo Enrichment
→
09Lead Processor
→
10Rate Limiter
→
11Gemini Personalization
→
12Email Formatter
→
13Google Sheets
→
14Gmail Sender
→
15Campaign Loop

Click Play a Run to follow the system from start to finish.

What it is

AI-Powered Lead Engagement is an automated n8n workflow I built to handle the complete lead-generation and cold-outreach process. A campaign begins with a form where the user defines the target location, niche, country and required number of leads. The system retrieves business data through Apify, checks previously collected leads, enriches missing email addresses through Apollo, processes qualified leads individually, uses Gemini to create personalized outreach emails, stores the results in Google Sheets and sends each email through Gmail.

The problem it solves

Manual prospecting requires repeatedly searching for businesses, copying contact information, checking whether a lead has already been contacted, finding missing emails, writing personalized messages and maintaining outreach records. Doing this manually for every lead is repetitive, slow and difficult to scale.

How it works

  1. Campaign configuration through an n8n form

  2. Target niche selection

  3. Target country and location selection

  4. Required lead-count configuration

  5. Automated Apify lead collection

  6. Wait handling while Apify completes lead extraction

  7. Automatic retrieval of Apify results

  8. Existing lead email lookup

  9. Duplicate lead filtering

  10. Automatic re-fetching when additional unique leads are required

  11. Final lead preparation

  12. Automatic email-presence detection

  13. Apollo email enrichment for leads without an email

  14. Email extraction from Apollo results

  15. One-by-one lead processing

  16. Rate limiting between processing stages

  17. Lead-specific Gemini prompt preparation

  18. AI-generated personalized cold-email content

  19. Merging lead information with Gemini output

  20. Automatic email formatting

  21. Google Sheets lead storage

  22. Separate cold-email tracking in Google Sheets

  23. Automatic Gmail email sending

  24. Delay between outgoing emails

  25. Looped processing until all campaign leads are handled

The engineering focus

I built an n8n workflow that coordinates the entire process automatically. Campaign requirements are collected through a form, Apify provides targeted business leads, existing emails are loaded to prevent duplicate processing, Apollo is used when a lead does not already contain an email address, and qualified leads are processed one by one. Gemini generates personalized email content from each lead's business information, the final email is formatted and stored in Google Sheets, Gmail sends the outreach message, and the workflow continues until the campaign has processed the required leads.

Built with

See the other projects