AI-Powered B2B Lead Generation Automation

Alvaro Leopoldo

Alvaro Leopoldo Vazquez

Auto-Prospect B2B Leads: Bank | Insurance | Hedge Funds - n8n

Goal:
To build a fully automated AI-powered B2B lead generation workflow that scrapes Banks, Insurance firms, and Hedge Funds from Google Maps, enriches their contact data, summarizes company context using Perplexity, generates personalized cold emails with GPT-4o, and sends outreach via Gmail — all orchestrated with n8n and logged into Google Sheets.

Problem:

Manual B2B outreach is time-consuming, repetitive, and inefficient. Identifying the right companies, finding decision-maker emails, researching company context, and writing personalized cold emails takes hours — especially when targeting multiple industries. Existing tools are either too expensive, siloed, or not tailored for flexible outreach across niche markets.

Solution:

Intro:
Webhook Trigger (POST)
Triggers with a JSON payload
Input Split Logic (JS)
Based on destinations selected, splits flow and controls how many results per type to scrape.
Lead Discovery:
Apify Maps Scraping
Custom Actors scrape businesses (Bank, Insurance, Hedge Funds) using Google Maps queries by location.
Data Cleaning (JS)
Extracts company names, websites, and ensures valid format for next steps.
Contact Discovery:
Email Enrichment via Anymailfinder
Fetches verified emails from each company domain.
Fallback logic can be added if no email is found.
Domain Verification
Extracts and validates domains from scraped websites to avoid dead leads.
AI Context & Email Crafting:
Company Summary via Perplexity
Perplexity AI is queried using company name/domain to extract recent updates or positioning.
Prompting GPT-4o: Generate Email Context
Uses Perplexity response to generate a personalized summary with impressive facts.
Prompting GPT-4o: Cold Email Copy
Uses that context to generate:
Subject Line
Cold Email (intro, relevance, CTA)
Split Subject + Email (JS)
Extracts and cleans subject and message from GPT response.
Format HTML Email (Optional)
Converts email into clean HTML to enhance deliverability and presentation.
Outreach:
Send Email via Gmail API
Sends 1:1 cold outreach using your authenticated Gmail account.
Tracking & Logging
Google Sheets Logging
Logs:
Company Name
Email
Website
Message Sent
Status (Success/Error)
Parallel Branches
Multi-Sector Execution
Each lead type (Bank / Insurance / Hedge Fund) runs in a separate parallel branch with its own AI + email + sheet logic.
Modular System Design
Scalable & Customizable
Fully modular:
Add more sectors
Swap GPT model
Add reply tracking or CRM integration

Tools Used:

n8n – Workflow automation orchestrator
Apify Maps Scraper – To extract business data (Banks, Insurances, Hedge Funds) from Google Maps
Anymailfinder API – To find verified business emails
Perplexity AI – To summarize company websites for contextual personalization
OpenAI GPT-4o – To generate concise, tailored cold outreach emails
Gmail Node – To send emails automatically
Google Sheets – For centralized logging of lead data
JavaScript – For logic control, splitting flows, and formatting output

Impact:

Reduced manual prospecting workload by 95%
Automatically generated and contacted dozens of qualified leads in each vertical within minutes
Achieved scalable, multi-industry cold outreach with zero repetitive work
Created a modular automation template that can be replicated for other sectors or client niches

🧠Learnings:

Mastered dynamic workflow branching using JS for multi-path logic
Learned how to structure large automation chains with clear modularity in n8n
Integrated multiple third-party APIs and handled async data enrichment
Gained deeper insight into how personalization at scale boosts response rates
Understood the limitations of enrichment APIs and built fallback logic for cleaner execution
Like this project

Posted Jun 25, 2025

Automated AI-powered B2B lead generation workflow for banks, insurance, and hedge funds.