End-to-end lead generation system. Scraping, enrichment, scoring, cold outreach, and pipeline management with real templates and benchmarks. Use when: user asks about "lead generation," "cold email," "lead scraping," "outbound sales," "prospecting," "lead qualification," "Apollo.io," "LinkedIn scraping," "email outreach," "sales pipeline," or "B2B leads."
This isn't generic advice about "finding prospects." This is a systematic, repeatable machine that fills your pipeline with qualified opportunities while you sleep.
Cybrflux uses this exact system to generate leads for ourselves and clients. It combines scraping, enrichment, scoring, and multi-channel outreach into a predictable engine.
Trigger phrases: "lead generation," "cold email," "lead scraping," "outbound sales," "prospecting," "lead qualification," "Apollo.io," "LinkedIn scraping," "email outreach," "sales pipeline," "B2B leads," "get more clients," "find prospects"
┌─────────────────────────────────────────────────────────────────────────┐
│ LEAD MACHINE │
│ (Input → Process → Output → Optimize) │
└─────────────────────────────────────────────────────────────────────────┘
PHASE 1: ACQUISITION PHASE 2: ENRICHMENT
┌─────────────────────┐ ┌─────────────────────┐
│ DATA SOURCES │ │ ENRICHMENT LAYER │
│ │ │ │
│ • Apollo.io │───────────────▶│ • Email finder │
│ • LinkedIn Sales │ │ • Phone lookup │
│ Navigator │ │ • Title verification│
│ • Crunchbase │ │ • Company data │
│ • BuiltWith │ │ • Tech stack │
│ • G2/Capterra │ │ • Intent signals │
│ • Firecrawl │ │ │
└─────────────────────┘ └─────────────────────┘
│
▼
┌─────────────────────┐
│ VALIDATION │
│ • Email verify │
│ • Bounce check │
│ • Deduplication │
└─────────────────────┘
│
PHASE 3: SCORING ▼
┌─────────────────────┐ ┌─────────────────────┐
│ SCORING ENGINE │◄───────────────│ CLEAN LEADS │
│ │ │ (Ready for outreach)
│ • Firmographic │ └─────────────────────┘
│ • Behavioral │
│ • Intent-based │
│ • Engagement │
└──────────┬──────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ SEGMENTATION │
├─────────────────────┬─────────────────────┬─────────────────────────────┤
│ HOT (Score 80+) │ WARM (Score 50-79)│ COLD (Score <50) │
│ │ │ │
│ • Instant outreach │ • Nurture sequence │ • Long-term nurture │
│ • Personalized video│ • Value-first email │ • Content marketing │
│ • Phone + email │ • LinkedIn touch │ • Re-score quarterly │
│ • Priority follow-up│ • Case studies │ │
└─────────────────────┴─────────────────────┴─────────────────────────────┘
│ │ │
▼ ▼ ▼
PHASE 4: OUTREACH
┌─────────────────────────────────────────────────────────────────────────┐
│ MULTI-CHANNEL SEQUENCES │
│ │
│ Day 1: Personalized Email Day 3: LinkedIn Connection │
│ Day 5: Follow-up Email #1 Day 7: Voice Note (if connected) │
│ Day 10: Value-add email Day 14: Break-up email │
│ │
│ Response detected? → Exit sequence, start conversation │
└─────────────────────────────────────────────────────────────────────────┘
// tools/apollo-scraper.js
class ApolloScraper {
constructor(apiKey) {
this.apiKey = apiKey;
this.baseUrl = 'https://api.apollo.io/v1';
}
async searchProspects(filters) {
const searchParams = {
// Firmographic filters
organization_num_employees_range: filters.employeeCount,
organization_industry_tag_ids: filters.industries,
organization_locations: filters.locations,
// Technographic filters
organization_technology_uids: filters.technologies,
// Contact filters
contact_titles: filters.titles,
contact_seniorities: filters.seniorities,
// Funding/signals
organization_funding_stage: filters.fundingStage,
organization_revenue_range: filters.revenue,
// Output control
page: filters.page || 1,
per_page: 100
};
const response = await fetch(`${this.baseUrl}/mixed_people/search`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Api-Key': this.apiKey
},
body: JSON.stringify(searchParams)
});
return await response.json();
}
// High-value search combinations
static SEARCH_TEMPLATES = {
funded_tech_startups: {
employeeCount: [10, 200],
fundingStage: ['series_a', 'series_b', 'series_c'],
industries: ['software', 'saas', 'technology'],
titles: ['CEO', 'CTO', 'VP Engineering', 'Head of Product']
},
agencies_needing_automation: {
employeeCount: [5, 50],
industries: ['marketing', 'advertising', 'digital_agency'],
titles: ['Founder', 'CEO', 'Operations Director'],
technologies: ['hubspot', 'mailchimp'] // Already using marketing tools
},
healthcare_practices: {
industries: ['healthcare', 'medical_practice'],
employeeCount: [10, 100],
titles: ['Practice Manager', 'Office Manager', 'Administrator']
}
};
}
// tools/linkedin-scraper.js
class LinkedInScraper {
async scrapeSearchResults(searchUrl) {
// Use Firecrawl or similar to extract LinkedIn search results
const result = await firecrawl.scrape(searchUrl, {
extract: {
people: {
selector: '.search-result__info',
fields: {
name: '.actor-name',
title: '.subline-level-1',
company: '.subline-level-2',
location: '.search-result__location',
profileUrl: {
selector: 'a',
attribute: 'href'
}
}
}
}
});
return result.people;
}
async enrichProfile(profileUrl) {
// Extract detailed profile information
const result = await firecrawl.scrape(profileUrl, {
extract: {
name: '.top-card-layout__title',
headline: '.top-card-layout__headline',
summary: '.core-section-container__content',
experience: {
selector: '.experience-item',
multiple: true,
fields: {
title: '.experience-item__title',
company: '.experience-item__subtitle',
duration: '.experience-item__duration'
}
},
education: {
selector: '.education-item',
multiple: true,
fields: {
school: '.education-item__title',
degree: '.education-item__subtitle'
}
}
}
});
return result;
}
}
// tools/builtwith-scraper.js
class BuiltWithScraper {
// Find companies using specific technologies
async findByTechnology(techId, filters = {}) {
// BuiltWith provides lists of websites using specific tech
const technologies = {
shopify: 'Shopify',
wordpress: 'WordPress',
hubspot: 'HubSpot',
salesforce: 'Salesforce',
stripe: 'Stripe',
intercom: 'Intercom',
zendesk: 'Zendesk'
};
// Returns list of domains using the technology
// Combine with enrichment to get contact data
}
// Use case: Find Shopify stores not using email marketing
async findShopifyWithoutEmailMarketing() {
const shopifySites = await this.findByTechnology('shopify');
const klaviyoSites = await this.findByTechnology('klaviyo');
// Sites using Shopify but NOT Klaviyo
return shopifySites.filter(site =>
!klaviyoSites.includes(site)
);
}
}
| Tool | Best For | Cost | Accuracy |
|---|---|---|---|
| Apollo.io | General B2B | Included | 85% |
| Hunter.io | Domain-based | $49/mo | 90% |
| Dropcontact | EU contacts | $29/mo | 88% |
| Voila Norbert | Hard-to-find | $49/mo | 87% |
| Snov.io | Bulk enrichment | $39/mo | 82% |
// enrichment/verify-email.js
async function verifyEmail(email) {
// Multi-layer verification
const checks = await Promise.all([
// Layer 1: Syntax check
validateSyntax(email),
// Layer 2: MX record check
checkMXRecord(email.split('@')[1]),
// Layer 3: SMTP validation (careful with rate limits)
smtpVerify(email),
// Layer 4: Bounce prediction
predictBounceRisk(email)
]);
const [syntax, mx, smtp, bounce] = checks;
// Scoring
let score = 0;
if (syntax.valid) score += 25;
if (mx.exists) score += 25;
if (smtp.deliverable) score += 30;
if (bounce.risk < 0.3) score += 20;
return {
email,
score,
status: score >= 80 ? 'valid' : score >= 50 ? 'risky' : 'invalid',
reasons: checks.filter(c => !c.valid).map(c => c.reason)
};
}
// enrichment/pipeline.js
class EnrichmentPipeline {
async process(leads) {
return await Promise.all(
leads.map(async lead => {
// Parallel enrichment
const [emailData, phoneData, companyData, intentData] = await Promise.all([
this.findEmail(lead),
this.findPhone(lead),
this.enrichCompany(lead.company),
this.checkIntent(lead)
]);
return {
...lead,
email: emailData.email,
emailConfidence: emailData.confidence,
phone: phoneData.phone,
company: {
...lead.company,
...companyData
},
intent: intentData,
enrichedAt: Date.now()
};
})
);
}
async checkIntent(lead) {
// Check for buying signals
const signals = [];
// Recent funding
if (lead.company.lastFundingRound?.date > Date.now() - 90 * 24 * 60 * 60 * 1000) {
signals.push({ type: 'recent_funding', score: 25 });
}
// Job postings related to your solution
if (lead.company.jobPostings?.some(j =>
j.title.match(/automation|efficiency|operations/i)
)) {
signals.push({ type: 'hiring_signal', score: 20 });
}
// Technology changes (added/removed tools)
if (lead.company.recentTechChanges?.length > 0) {
signals.push({ type: 'tech_change', score: 15 });
}
return {
score: signals.reduce((sum, s) => sum + s.score, 0),
signals
};
}
}
// scoring/lead-scorer.js
class LeadScorer {
score(lead) {
let score = 0;
const breakdown = [];
// Firmographic scoring (40 points max)
const firmographic = this.scoreFirmographic(lead);
score += firmographic.score;
breakdown.push({ category: 'firmographic', ...firmographic });
// Behavioral scoring (30 points max)
const behavioral = this.scoreBehavioral(lead);
score += behavioral.score;
breakdown.push({ category: 'behavioral', ...behavioral });
// Engagement scoring (20 points max)
const engagement = this.scoreEngagement(lead);
score += engagement.score;
breakdown.push({ category: 'engagement', ...engagement });
// Intent scoring (10 points max)
const intent = this.scoreIntent(lead);
score += intent.score;
breakdown.push({ category: 'intent', ...intent });
return {
total: Math.min(score, 100),
breakdown,
tier: this.getTier(score),
priority: this.getPriority(score)
};
}
scoreFirmographic(lead) {
let score = 0;
const reasons = [];
// Company size in sweet spot
const size = lead.company.employeeCount;
if (size >= 10 && size <= 200) {
score += 15;
reasons.push('ideal_company_size');
}
// Target industry
if (this.targetIndustries.includes(lead.company.industry)) {
score += 10;
reasons.push('target_industry');
}
// Funding stage
if (['series_a', 'series_b', 'series_c'].includes(lead.company.fundingStage)) {
score += 10;
reasons.push('growth_stage');
}
// Revenue range
if (lead.company.revenue && lead.company.revenue >= 1000000) {
score += 5;
reasons.push('sufficient_budget');
}
return { score, reasons };
}
scoreBehavioral(lead) {
let score = 0;
const reasons = [];
// Source quality
const sourceScores = {
'demo_request': 30,
'pricing_page': 25,
'contact_sales': 25,
'case_study_download': 20,
'webinar_attendee': 20,
'linkedin_outbound': 15,
'cold_email': 10,
'list_purchase': 5
};
score += sourceScores[lead.source] || 10;
reasons.push(`source_${lead.source}`);
// Technology fit
if (lead.company.techStack?.some(t => this.complementaryTech.includes(t))) {
score += 10;
reasons.push('tech_complementarity');
}
return { score, reasons };
}
getTier(score) {
if (score >= 80) return 'hot';
if (score >= 50) return 'warm';
return 'cold';
}
}
Every email in your sequence follows REPLY:
const COLD_EMAIL_SEQUENCE = {
// Email 1: The Hook
email1: {
subject: "{{company}} + {{yourCompany}}",
body: `
Hi {{firstName}},
{{personalization_hook}}
{{value_prop_one_liner}}
Worth a brief conversation?
{{signature}}
`,
timing: 'Day 0',
delayIfNoReply: 3
},
// Email 2: The Bump
email2: {
subject: "Re: {{company}} + {{yourCompany}}",
body: `
{{firstName}} — quick bump in case this got buried.
{{one_sentence_case_study}}
Open to a 10-min chat this week?
`,
timing: 'Day 3',
delayIfNoReply: 4
},
// Email 3: Value Add
email3: {
subject: "{{relevant_insight}}",
body: `
{{firstName}},
Saw {{company}} {{recent_news}}. {{genuine_reaction}}
{{relevant_resource}} — thought you might find it useful:
{{link}}
No pitch, just thought you'd appreciate it.
`,
timing: 'Day 7',
delayIfNoReply: 7
},
// Email 4: The Break-up
email4: {
subject: "Permission to close your file?",
body: `
{{firstName}},
I've reached out a few times about {{topic}} but haven't heard back.
Totally understand if now isn't the right time or if this isn't a priority.
Permission to close your file? Or should I check back in {{timeframe}}?
`,
timing: 'Day 14',
final: true
}
};
Subject: {{company}}'s {{department}} team
Hi {{firstName}},
Noticed {{company}} is hiring {{3+ roles in their department}}. Usually means
{{common pain point during growth}}.
We helped {{similar_company}} cut {{metric}} by {{X}}% during their expansion.
Worth a 10-min chat to see if it's relevant for {{company}}?
{{yourName}}
When to use: Targeting growth-stage companies Expected reply rate: 8-12%
Subject: Quick question about {{company}}
Hi {{firstName}},
Been following {{company}} since {{milestone}}. {{genuine_compliment_about_recent_achievement}}.
Quick question: Are you {{decision_maker}} for {{relevant_process}}? Working with
{{similar_company_type}} and seeing {{specific_result}}.
If you're the right person to chat with, any interest in a brief call?
{{yourName}}
When to use: Reaching out to senior execs Expected reply rate: 6-10%
Subject: {{result}} for {{industry}} companies
Hi {{firstName}},
{{recent_result_specific}}: {{client_name}} just {{specific_outcome}} in {{timeframe}}.
They were struggling with {{common_problem}} before we {{solution_summary}}.
Any interest in seeing if similar results are possible for {{company}}?
{{yourName}}
When to use: You have impressive recent results Expected reply rate: 10-15%
// personalization-engine.js
class PersonalizationEngine {
async generateHook(lead) {
const sources = [
this.checkRecentNews(lead.company),
this.checkLinkedInActivity(lead),
this.checkJobPostings(lead.company),
this.checkTechStack(lead.company),
this.checkMutualConnections(lead),
this.checkCompanyMilestones(lead.company)
];
const results = await Promise.all(sources);
const validHooks = results.filter(r => r && r.confidence > 0.7);
// Sort by relevance and recency
validHooks.sort((a, b) => b.relevance - a.relevance);
return validHooks[0] || this.generateGenericHook(lead);
}
async checkRecentNews(company) {
// Use news API or Firecrawl to find recent company news
const news = await this.newsApi.search(company.name);
if (news.length === 0) return null;
const latest = news[0];
const daysAgo = (Date.now() - new Date(latest.publishedAt)) / (1000 * 60 * 60 * 24);
if (daysAgo > 30) return null;
return {
type: 'recent_news',
hook: `Saw the news about ${latest.title}. ${this.generateReaction(latest)}`,
confidence: daysAgo < 7 ? 0.9 : 0.7,
relevance: 0.9
};
}
}
"Hi {{firstName}}, this is {{yourName}} from {{company}}.
{{pattern_interrupt}}
The reason I'm calling is we {{value_prop_short}}. {{social_proof_one_liner}}.
I don't suppose you're dealing with {{pain_point}} by any chance?"
| Objection | Response |
|---|---|
| "Not interested" | "Totally understand. Most people aren't until they see {{specific_result}}. Can I ask what's your biggest challenge with {{relevant_process}} right now?" |
| "Send me an email" | "Happy to. So I send something relevant—what's your top priority for {{relevant_area}} this quarter?" |
| "No budget" | "Makes sense. If budget wasn't an issue, would this solve a problem for you?" |
| "Too busy" | "I'll be quick. 30 seconds: {{one_sentence_value_prop}}. Worth a brief conversation when things slow down?" |
| "We're good" | "Glad to hear it. What are you using currently? {{if they mention competitor}} — what do you wish it did better?" |
const PIPELINE_STAGES = {
NEW: {
name: 'New Lead',
actions: ['enrich', 'score', 'segment'],
exitCriteria: 'enriched && scored'
},
CONTACTED: {
name: 'Contacted',
actions: ['start_sequence', 'track_opens'],
exitCriteria: 'replied || bounced || 14_days_no_reply'
},
ENGAGED: {
name: 'Engaged',
actions: ['pause_sequence', 'assign_to_ae', 'schedule_followup'],
exitCriteria: 'meeting_booked || opportunity_created'
},
MEETING_SCHEDULED: {
name: 'Meeting Scheduled',
actions: ['send_prep_materials', 'calendar_hold', 'reminder_24h'],
exitCriteria: 'meeting_completed'
},
OPPORTUNITY: {
name: 'Opportunity',
actions: ['create_deal', 'proposal_sent', 'negotiation'],
exitCriteria: 'closed_won || closed_lost'
},
NURTURE: {
name: 'Long-term Nurture',
actions: ['monthly_newsletter', 're_score_quarterly'],
exitCriteria: 'score_increases || trigger_event'
},
DISQUALIFIED: {
name: 'Disqualified',
actions: ['tag_reason', 'archive'],
exitCriteria: 'permanent'
}
};
// crm/automation-rules.js
const AUTOMATION_RULES = [
{
trigger: 'lead.score >= 80',
action: 'notify_slack',
payload: {
channel: '#hot-leads',
message: '🔥 Hot lead: {{lead.name}} at {{lead.company}} (Score: {{lead.score}})'
}
},
{
trigger: 'email.replied',
action: 'pause_sequence',
then: 'assign_to_owner'
},
{
trigger: 'meeting.scheduled',
action: 'create_deal',
payload: {
stage: 'Meeting Scheduled',
value: '{{lead.estimated_value}}'
}
},
{
trigger: '14_days_no_reply && sequence_completed',
action: 'move_to_nurture'
}
];
| Metric | Cold Email | Cold Call | Referral | |
|---|---|---|---|---|
| Delivery Rate | 95%+ | N/A | N/A | 100% |
| Open Rate | 40-60% | N/A | N/A | 70%+ |
| Reply Rate | 5-15% | 15-25% | 10-20% | 30%+ |
| Meeting Rate | 1-5% | 3-8% | 2-5% | 15%+ |
| Cost per Lead | $5-20 | $10-30 | $15-40 | $0-10 |
| Cost per Meeting | $100-500 | $150-400 | $200-600 | $50-150 |
Target: 10 new meetings/month
Cold Email Approach:
- 1,000 emails sent
- 500 opened (50%)
- 75 replied (15% reply rate)
- 10 meetings booked (13% of replies)
- Cost: ~$300 (tooling + verification)
LinkedIn Approach:
- 200 connection requests
- 80 accepted (40%)
- 40 replied to message (50% of connections)
- 8 meetings booked (20% of replies)
- Cost: ~$400 (Sales Navigator + time)
Combined: 18 meetings for $700 = $39/meeting
| Metric | Target | World-Class |
|---|---|---|
| Email bounce rate | <5% | <2% |
| Unsubscribe rate | <0.5% | <0.2% |
| Spam complaint rate | <0.1% | <0.05% |
| Lead-to-opportunity | 10% | 20%+ |
| Opportunity-to-close | 20% | 30%+ |
// Generate tracking URLs
function generateTrackedUrl(baseUrl, campaign, lead) {
const params = new URLSearchParams({
utm_source: 'outbound',
utm_medium: 'email',
utm_campaign: campaign,
utm_content: lead.sequenceStep,
// Custom parameters
lead_id: lead.id,
rep: lead.assignedRep
});
return `${baseUrl}?${params.toString()}`;
}
// attribution/last-touch.js
class AttributionTracker {
trackTouch(lead, touchpoint) {
const touch = {
leadId: lead.id,
timestamp: Date.now(),
channel: touchpoint.channel,
campaign: touchpoint.campaign,
content: touchpoint.content,
metadata: touchpoint.metadata
};
// Store in lead's touch history
lead.touchHistory.push(touch);
// Update attribution
if (touchpoint.converted) {
lead.attributedTo = this.calculateAttribution(lead.touchHistory);
}
}
calculateAttribution(touches) {
// Multi-touch attribution
const weighted = touches.map((t, i) => ({
...t,
weight: this.getTouchWeight(t, i, touches.length)
}));
// Group by channel
const byChannel = weighted.reduce((acc, t) => {
acc[t.channel] = (acc[t.channel] || 0) + t.weight;
return acc;
}, {});
return byChannel;
}
getTouchWeight(touch, index, total) {
// First touch: 40%, Last touch: 40%, Middle: 20% distributed
if (index === 0) return 0.4;
if (index === total - 1) return 0.4;
return 0.2 / (total - 2);
}
}
Target: 20+ qualified meetings by day 30