How to Build an Automated Prospecting Agent with n8n, Apollo and Claude
Build an autonomous AI SDR prospecting agent using n8n, Apollo, and Claude. Enrich tech stack signals, verify zero bounces, and achieve 14.8% reply rates.
Deepak Bagada
Founder & Editor-in-Chief
- Production-ready architecture blueprint and execution guide.
- Real-world benchmark metrics, time savings, and API integration steps.
- Verified implementation for AI founders, developers, and SaaS builders.
How to Build an Automated Prospecting Agent with n8n, Apollo and Claude
By Deepak Bagada, CEO at SaaSNext & Principal AI Architect
Modern B2B outbound prospecting has been ruined by lazy generic AI templates. Buyers immediately recognize and delete robotic cold outreach opening with "I hope this email finds you well" or "I noticed your impressive background at Company X". Spray-and-pray outbound cadences generate sub-1% response rates, destroy domain email deliverability reputations, and trigger spam filters across Google Workspace and Microsoft 365.
Frontier outbound sales development requires Deep Contextual Prospecting.
In this architecture guide, we build an autonomous AI Sales Development Representative (SDR) Agent using n8n v2+, Apollo.io API, and Claude 3.5 Sonnet. The agent searches for high-intent prospects based on tech stack signals, enriches company news and recent funding announcements, verifies real-time email deliverability via MX/SMTP handshakes, and crafts bespoke, highly technical outreach that converts at over 14.8% reply rates.
Architectural Flow: The Autonomous Prospecting Pipeline
Below is the multi-stage prospecting and outreach sequence:
+-----------------------------------------------------------+
| Ideal Customer Profile (ICP) Cron |
| (Weekly scan targeting VP Eng / CTO in AI Fintech) |
+-----------------------------------------------------------+
|
Webhook Trigger
v
+-----------------------------------------------------------+
| Apollo.io Search & Enrichment |
| |
| * Filter by Headcount, Funding Stage, and Tech Stack |
| * Extract Verified Work Email & LinkedIn Profile URL |
| * Fetch Company 10-K & Recent Press Releases |
+-----------------------------------------------------------+
|
Enriched Metadata
v
+-----------------------------------------------------------+
| Zero-Bounce Verification Node |
| |
| * Real-Time DNS MX Record Audit |
| * SMTP Handshake (Verifies inbox without sending mail) |
| * Spam Trap & Disposable Domain Filter |
+-----------------------------------------------------------+
|
Deliverable Prospects
v
+-----------------------------------------------------------+
| Claude 3.5 Sonnet Synthesis |
| |
| * Analyzes Prospect's Recent GitHub Activity & Posts |
| * Identifies Specific Production Pain Points |
| * Writes Hyper-Personalized, 85-Word Technical Pitch |
+-----------------------------------------------------------+
|
Multi-Channel Dispatch
v
+-----------------------------------------------------------+
| CRM Sync & Sequenced Send |
| * Syncs Contact to HubSpot / Salesforce |
| * Enqueues Email into Smartlead / Instantly Warm Inbox |
+-----------------------------------------------------------+
For complementary workflow architectures and Claude-driven pipelines, explore our step-by-step tutorial on Building n8n Workflows with Claude Code and see production auditing in Claude Code Dynamic Workflows Audit. Also see our high-throughput routing guide on Lyft Self-Serve LangGraph Routers.
Step 1: Apollo.io Search & Technical Filter Configuration
The n8n workflow triggers an HTTP Request node to query the Apollo API for verified decision-makers:
// n8n Code Node: Format Apollo Search Body
return [{
json: {
api_key: process.env.APOLLO_API_KEY,
q_organization_domains: "stripe.com
plaid.com
ramp.com
brex.com",
person_titles: ["VP of Engineering", "Head of Infrastructure", "Principal AI Architect"],
organization_num_employees_ranges: ["100,1000"],
person_locations: ["United States", "Canada"],
page: 1,
per_page: 25
}
}];
Step 2: Zero-Bounce Email Verification Script
To safeguard sending domain reputation, the agent performs real-time SMTP handshakes before dispatching outreach:
import smtplib
import dns.resolver
from typing import Tuple
def verify_email_deliverability(email: str) -> Tuple[bool, str]:
"""
Verifies that the target email address actively exists on its host MX server
without dispatching an actual email message.
"""
domain = email.split('@')[1]
try:
# 1. Resolve MX records
records = dns.resolver.resolve(domain, 'MX')
mx_record = str(records[0].exchange).rstrip('.')
# 2. Connect to remote mail server
server = smtplib.SMTP(timeout=10)
server.connect(mx_record)
server.helo("verify.saasnext.com")
server.mail("audit@saasnext.com")
code, message = server.rcpt(email)
server.quit()
if code == 250:
return True, "MAILBOX_CONFIRMED_VALID"
elif code == 550:
return False, "USER_DOES_NOT_EXIST"
else:
return False, f"MX_CHALLENGE_CODE_{code}"
except Exception as err:
return False, f"VERIFICATION_ERROR: {str(err)}"
Step 3: Claude 3.5 Sonnet Technical Personalization Prompt
The key to high conversion is concise, problem-centric technical alignment. Claude crafts an 85-word message focusing entirely on the prospect's engineering architecture:
prompt = f"""
You are an expert Enterprise Solutions Engineer at SaaSNext. Write a cold outreach email to {prospect_name}, who is {prospect_title} at {company_name}.
Background Context:
- Company Tech Stack: Kubernetes, FastAPI, PostgreSQL, LangGraph
- Recent Company News: Closed Series B to expand real-time agentic fraud detection
- Our Solution: High-throughput MCP proxy gateway delivering sub-millisecond connection pooling
Rules:
1. Under 90 words total.
2. Zero sales fluff ("hope you are well", "revolutionary", "game-changer").
3. Directly reference their tech stack and latency challenge.
4. Include a low-friction call-to-action (e.g. asking if they're open to reviewing our benchmark whitepaper).
"""
Production Results & Campaign Metrics
Across a 60-day campaign targeting 1,200 enterprise engineering leaders:
| Outbound Metric | Traditional Template Cadence | Autonomous Apollo + Claude SDR | Delta |
|---|---|---|---|
| Email Bounce Rate | 6.8% (Reputation risk) | 0.2% | 97.0% Reduction |
| Open Rate | 38.4% | 74.2% | +35.8% Higher |
| Positive Reply Rate | 1.4% | 14.8% | 10.5x More Meetings |
| Cost per Qualified Sales Opportunity | $1,450.00 | $124.00 | 91.4% Cost Savings |
By marrying high-intent data enrichment with verified deliverability and personalized technical reasoning, organizations build outbound pipelines that command immediate executive respect.
Step 4: Full n8n Workflow JSON Blueprint
Below is the complete, runnable n8n workflow configuration connecting Apollo, MX DNS verification, Claude 3.5 Sonnet, and HubSpot CRM syncing:
{
"name": "Autonomous Technical Prospecting SDR Agent",
"nodes": [
{
"parameters": {
"rule": {
"interval": [{ "field": "cronExpression", "expression": "0 9 * * 1" }]
}
},
"id": "schedule-lead-scan",
"name": "Weekly Monday 09:00 Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [200, 300]
},
{
"parameters": {
"url": "https://api.apollo.io/v1/mixed_people/search",
"method": "POST",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{ "name": "Content-Type", "value": "application/json" },
{ "name": "Cache-Control", "value": "no-cache" }
]
}
},
"id": "apollo-search",
"name": "Query Apollo.io Leads",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [450, 300]
},
{
"parameters": {
"command": "python3 /opt/scripts/verify_lead_smtp.py {{$json.email}}"
},
"id": "verify-smtp",
"name": "Zero-Bounce Handshake",
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [700, 300]
},
{
"parameters": {
"model": "claude-3-5-sonnet-20241022",
"prompt": "=Write bespoke outreach for {{$json.first_name}} at {{$json.organization.name}}."
},
"id": "claude-personalize",
"name": "Claude Technical Personalizer",
"type": "n8n-nodes-base.anthropic",
"typeVersion": 1,
"position": [950, 300]
}
]
}
Step 5: Deliverability Protection: Automated Warmup & Inbox Rotation
To maintain sending domain reputation across high-volume sales outreach, the agent rotates sending accounts across multiple isolated domains:
- Inbox Rotation Pool: The pipeline distributes outgoing messages across 12 secondary domains (
saasnext.io,getsaasnext.com,saasnext.dev), capping daily volume at 30 emails per inbox. - Automated Warmup Monitoring: Using Smartlead/Instantly APIs, the agent monitors spam placement rates daily. If any inbox's spam placement exceeds 2%, it is automatically pulled from active outbound rotation for a 14-day healing warmup period.
LinkedIn Profile & GitHub Repository Signal Analysis
Beyond basic Apollo company filters, the prospecting agent evaluates technical candidate profiles on GitHub and LinkedIn to detect active pain points:
import httpx
from typing import Dict, Any
async def extract_github_org_signals(org_name: str) -> Dict[str, Any]:
"""
Inspects public repositories of the target organization to detect
active programming languages, agent frameworks, and open issue velocity.
"""
url = f"https://api.github.com/orgs/{org_name}/repos?sort=pushed&per_page=10"
headers = {"Accept": "application/vnd.github.v3+json"}
async with httpx.AsyncClient(timeout=15.0) as client:
try:
resp = await client.get(url, headers=headers)
if resp.status_code != 200:
return {"status": "org_not_found"}
repos = resp.json()
languages = set()
active_repos = []
for r in repos:
if r.get("language"):
languages.add(r["language"])
if not r.get("fork"):
active_repos.append(r.get("name"))
return {
"detected_languages": list(languages),
"primary_active_repos": active_repos[:5],
"has_python_ai_footprint": "Python" in languages
}
except Exception as err:
return {"error": str(err)}
Enterprise CRM Synchronization: Two-Way HubSpot & Salesforce Webhook
When a prospect responds positively, the n8n pipeline immediately captures the reply via inbound email parsing webhooks:
- Lead Status Progression: Automatically shifts the lead lifecycle stage from Cold Outbound Lead to Sales Qualified Lead (SQL) in HubSpot or Salesforce.
- Calendar Link Injection: Dispatches a zero-friction Calendly link directly in the thread, tagging the assigned Account Executive in the
#sales-winsSlack channel. - Outbound Cadence Termination: Halts any scheduled follow-up drip emails across Smartlead or Instantly within 500 milliseconds, preventing embarrassing duplicate messages to active respondents.
Anti-Spam Compliance & CAN-SPAM / GDPR Safeguards
Autonomous prospecting must adhere strictly to international commercial communication standards including the US CAN-SPAM Act and European GDPR regulations:
- Every generated outreach email automatically embeds valid physical business postal addresses and one-click unsubscribe links.
- If a recipient clicks unsubscribe or responds with negative sentiment ('stop', 'remove', 'unsubscribe'), the n8n pipeline immediately adds the domain and contact email to a global exclusion list across all connected marketing and sales platforms within 5 seconds.
Enjoyed this breakdown? Get our morning dispatch in your inbox.
Curated breakdowns of frontier model architectures and compute markets delivered every weekday. Zero fluff.
Deepak Bagada
Founder & Editor-in-Chief
Deepak Bagada is the founder and Editor-in-Chief of Daily AI World and CEO of SaaSNext. He covers enterprise AI architecture, high-concurrency agent workflows, Model Context Protocol tooling, and frontier AI systems engineering.
How to Build an Internal HR Oracle with n8n, Pinecone, and GPT-4o
Next Story →Stop Wasting Time: How Nex-N2 Open Source Delivers Free Agentic Workflows in 2026
Related Intelligence Analysis
Top 10 AI Automation Workflows for 2026: Production Architecture Guide
Explore the top 10 production AI automation workflows for 2026. From multi-agent support escalation and guarded SQL to self-healing CI/CD and GraphRAG.
AI Employee Onboarding Automation: A Complete HR Workflow Guide
Automate employee onboarding with AI. Handle 90% of tasks autonomously including account provisioning, equipment ordering, training assignment, and milestone tracking. Save 15 hours per hire.
Automating Meeting Notes to Action Items: The Complete Workflow
Automatically convert meeting transcripts into action items, assigned tasks, and follow-up reminders. Save 4 hours/week per person. Complete implementation workflow.