AI-Powered B2B Lead Generation & Personalization Engine n8n template
An automated n8n workflow that turns a simple chat query (e.g., "SaaS Marketing Directors in London") into a Google Sheet full of enriched B2B leads, complete with AI-written personalized openers for outreach.
Stop wasting countless hours on manual prospecting. This free n8n template is a complete, end-to-end B2B lead generation assistant. It connects the power of Google Search, advanced web scraping, and generative AI (Google Gemini) to build high-quality prospect lists for you on demand.
All you have to do is send a single chat message. The workflow takes over from there.
📈 How It Works: From Chat to Qualified Lead
This workflow is an assembly line for perfect prospects:
-
Chat Trigger: It all starts when you send a message in the n8n chat (e.g., “Find me ‘Head of Sales’ at retail companies”).
-
Google Search (via Apify): The workflow intelligently searches Google for LinkedIn profiles matching your query.
-
Profile Scraping (via LinkFinderAI): It processes each search result, one by one, and uses an external API to scrape the LinkedIn profile. It extracts crucial data like name, job title, company, location, and most importantly, email address.
-
Email Qualification: The workflow includes an IF node that automatically filters out any prospects where an email address wasn’t found, ensuring you only process high-quality, actionable leads.
-
Company Enrichment: For every valid lead, the workflow finds their company’s LinkedIn profile and scrapes it for key firmographic data like company description, industry, and company size.
-
AI Personalization (via Google Gemini): This is the magic. All the prospect and company data is fed to a Google Gemini AI agent. Using a sophisticated prompt, the AI writes a unique, professional, and compelling opening sentence (15-25 words) for your cold outreach.
-
Save to Google Sheets: Finally, all this enriched data—the prospect’s info, the company’s details, and the custom AI-written icebreaker—is neatly appended as a new row in your Google Sheet, ready for your sales team.
⭐ Key Benefits
-
Massive Time Savings: Automate 90% of the top-of-funnel prospecting process. What used to take days of manual searching and data entry now takes minutes.
-
On-Demand Leads: Use the simple chat interface to generate new lead lists whenever you need them.
-
Superior Lead Quality: Move beyond simple name/title lists. This workflow provides deep enrichment (company size, industry) and filters for valid emails.
-
Skyrocket Reply Rates: The AI-generated personalized openers are based on the prospect’s real data (their role, company, industry). This is how you break through the noise and get replies.
-
Centralized & Organized: All your leads land in one Google Sheet, creating a single source of truth for your outreach campaigns.
💸 Costs & Service Consumption
This n8n template is 100% free to download and use.
However, it relies on powerful third-party APIs to function. You will be responsible for the costs associated with these services. This workflow is built for scalability, so you only pay for what you use.
You will need active accounts and API keys for:
-
Apify: Used for the Google Search Scraper.
-
LinkFinderAI: Used for scraping LinkedIn profiles and company pages. (This template uses their API; you can substitute any other scraping service by adjusting the HTTP Request nodes).
-
Google Gemini (AI Platform): Used for the AI Agent to generate personalized text.
-
Google Sheets: You will need Google OAuth credentials to allow n8n to write to your sheet.
🛠️ How to Install & Configure
This template is designed to be “set it and forget it.” You only need to set up your credentials, and you’re ready to go.
-
Download the Workflow: Get the free template JSON file from this page.
-
Import to n8n: Open your n8n instance, go to “Workflows,” and click “Import from File.” Upload the JSON file.
-
Configure Your Credentials: This is the only setup step!
-
Google Sheets Node: Select your Google Sheets OAuth credential from the dropdown (or create one). Then, paste in the ID of your Google Sheet and specify the sheet name (e.g., “Sheet1”).
-
Google Gemini Chat Model Node: Select your Google Gemini (PaLM) API credential.
-
Apify (HTTP Request) Node: Paste your Apify API token into the URL.
-
LinkFinderAI (HTTP Request) Nodes: Go to the “Profile Linkedin scraper,” “Company Linkedin url,” and “Company Linkedin scraper” nodes. In each one, go to the “Headers” tab and add your
Authorizationtoken (e.g., “Bearer YOUR_API_KEY”).
-
-
Activate the Workflow: Set the workflow to “Active.”
-
Start Chatting: Open the Chat in the n8n UI, send your query, and watch the leads roll into your Google Sheet!