<aside>
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
</aside>

π Download & Explore the Workflow:
View GitHub Repository : https://github.com/AlvLeoAI/Auto-Prospect-B2B-Leads-Bank-Insurance-Hedge-Funds-/blob/main/JSON