Building an AI SDR on Claude (Recipe)
The AI SDR category has exploded with venture-backed point solutions — 11x, Artisan, Ava by Artisan, Piper by Qualified — each promising to replace your SDR team for a fraction of the cost. Most are black boxes running on GPT-4o or Claude with a CRM integration slapped on top and a $2,000/month price tag. This post is for teams that want to understand what they are actually buying, and for GTM engineers who would rather build it themselves and own the economics.
The architecture below is production-grade. It is not a toy demo. Teams running this stack at 500–2,000 outbound contacts per day have validated the core pattern. The total cost at that scale is $180–$420/month in infrastructure — versus $24,000+/year for a junior SDR or $8,000–24,000/year for a commercial AI SDR platform.
Architecture Overview
The stack has four layers:
- Data layer: Apollo.io (contact sourcing and initial enrichment)
- Orchestration layer: n8n (workflow automation, trigger handling, state management)
- Intelligence layer: Claude API (Sonnet 3.7 for personalization, Haiku 3.5 for classification tasks)
- Delivery layer: Smartlead (email sending, warmup, inbox rotation, reply detection)
The flow: Apollo export triggers n8n → n8n calls Claude to generate personalized email → n8n pushes to Smartlead campaign → Smartlead sends and monitors replies → reply webhook fires back to n8n → n8n calls Claude to classify reply intent → qualified replies route to human SDR in CRM.
Step 1: Apollo Export and Enrichment
Build your Apollo search with ICP filters (industry, headcount, seniority, technology used). Export to CSV or use Apollo’s API. The API approach enables real-time prospecting triggers; the CSV approach is easier to start with.
Apollo’s Basic plan ($49/month) gives you 1,000 export credits per month. Professional ($99/month) gives 2,000. For higher volumes, Apollo’s API pricing is $0.01–$0.04 per enriched contact depending on data type. Budget $100–$200/month for Apollo enrichment at 2,000–5,000 contacts/month.
Enrich each contact with at minimum: verified email, LinkedIn URL, job title, company name, company headcount, industry, and technology stack (Apollo’s “Technologies Used” filter). The technology stack field is the highest-signal input for Claude personalization — knowing a prospect runs Salesforce + Marketo vs. HubSpot alone changes the relevant messaging significantly.
Step 2: n8n Orchestration Workflow
n8n is the connective tissue. Self-host it on a $20/month DigitalOcean droplet or use n8n Cloud ($20/month for 5,000 executions). The core workflow has three nodes:
// n8n HTTP Request node — Apollo enrichment call
// Method: GET
// URL: https://api.apollo.io/v1/people/match
// Headers: { "Content-Type": "application/json", "Cache-Control": "no-cache" }
// Body:
{
"api_key": "{{ $env.APOLLO_API_KEY }}",
"first_name": "{{ $json.first_name }}",
"last_name": "{{ $json.last_name }}",
"organization_name": "{{ $json.company }}",
"reveal_personal_emails": false,
"reveal_phone_number": false
}
The enrichment node passes contact data to the Claude personalization node. Structure the Claude call to request a JSON response — this makes downstream parsing deterministic and avoids parsing errors that will plague you at scale.
Step 3: Claude Personalization — The Prompt Architecture
This is the highest-leverage part of the build. Use Claude Sonnet 3.7 for personalization. Haiku 3.5 costs 5x less but produces noticeably lower-quality personalization on nuanced ICPs — the savings are not worth the quality degradation in the email opening line, which is where personalization matters most.
The system prompt structure that works:
// Claude API call — n8n HTTP Request node
// Method: POST
// URL: https://api.anthropic.com/v1/messages
// Headers: { "x-api-key": "{{ $env.ANTHROPIC_API_KEY }}", "anthropic-version": "2023-06-01", "content-type": "application/json" }
// Body:
{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"system": "You are an expert B2B copywriter for [COMPANY]. Your job is to write a cold email opening line and email body that feels genuinely researched, not templated. Respond only with valid JSON matching the schema provided. Never use phrases like 'I noticed', 'I came across', or 'I wanted to reach out'. Be direct. Reference the specific company context provided.",
"messages": [
{
"role": "user",
"content": "Write a cold outbound email for the following prospect. Return JSON only, no other text.\n\nProspect data:\n- Name: {{ $json.first_name }} {{ $json.last_name }}\n- Title: {{ $json.title }}\n- Company: {{ $json.organization.name }}\n- Industry: {{ $json.organization.industry }}\n- Headcount: {{ $json.organization.employee_count }}\n- Tech stack: {{ $json.organization.technologies.join(', ') }}\n- LinkedIn headline: {{ $json.headline }}\n\nRequired JSON schema:\n{\n \"subject\": \"string (under 50 chars, no spam words)\",\n \"opening_line\": \"string (1-2 sentences, specific to this person)\",\n \"body\": \"string (2-3 short paragraphs, value prop + CTA)\",\n \"personalization_confidence\": \"high|medium|low\"\n}"
}
]
}
The personalization_confidence field is critical. Route low-confidence outputs (sparse contact data, generic LinkedIn headlines, industries where your ICP is thin) to a human review queue before sending. Sending a “personalized” email that is obviously generic is worse than sending no personalization at all — it signals that your system is on autopilot.
Step 4: Smartlead Delivery
Push generated emails to Smartlead via its API. Smartlead’s $39/month Basic plan supports unlimited sending accounts (the key differentiator from Apollo’s sequencer) and provides native email warmup. For AI SDR deployments, you want at minimum 3–5 sending accounts rotating per campaign to protect deliverability.
// Smartlead API — Add lead to campaign
// Method: POST
// URL: https://server.smartlead.ai/api/v1/campaigns/{{ $env.SMARTLEAD_CAMPAIGN_ID }}/leads
// Headers: { "Content-Type": "application/json" }
// Body:
{
"api_key": "{{ $env.SMARTLEAD_API_KEY }}",
"lead_list": [
{
"email": "{{ $json.email }}",
"first_name": "{{ $json.first_name }}",
"last_name": "{{ $json.last_name }}",
"company_name": "{{ $json.organization.name }}",
"custom_fields": {
"subject": "{{ $json.claude_output.subject }}",
"opening_line": "{{ $json.claude_output.opening_line }}",
"body": "{{ $json.claude_output.body }}"
}
}
]
}
In Smartlead, configure your campaign template to pull from custom fields: {{subject}}, {{opening_line}}, {{body}}. This lets Smartlead handle send-time optimization, inbox rotation, and warmup while your Claude-generated content fills in dynamically per lead.
Step 5: Reply Classification
Configure Smartlead’s reply webhook to fire to your n8n instance. The webhook payload includes the reply text. Pass it to Claude Haiku 3.5 (fast, cheap, sufficient for classification) with a simple intent classification prompt:
// Reply classification — Claude Haiku call
{
"model": "claude-haiku-4-5",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Classify this email reply intent. Return JSON only.\n\nReply text: {{ $json.reply_text }}\n\nSchema: { \"intent\": \"interested|not_interested|out_of_office|referral|unsubscribe|unclear\", \"urgency\": \"high|medium|low\", \"follow_up_recommended\": boolean, \"notes\": \"string\" }"
}
]
}
Route interested and referral replies to your CRM (HubSpot or Salesforce via n8n’s native nodes). Route unsubscribe to Smartlead’s suppression list via API. Archive everything else. Do not auto-reply to any intent — human SDR handles all positive replies. This is where commercial AI SDR platforms struggle: auto-reply quality on inbound replies is significantly lower than outbound generation quality, and a bad auto-reply to a warm lead is brand damage.
Cost Math
At 1,000 contacts/month:
- Apollo API enrichment: ~$40 (1,000 contacts at $0.04 average)
- Claude Sonnet 3.7 personalization: ~$15 (estimated 1,500 input tokens + 500 output tokens per contact; $3/M input, $15/M output at Sonnet pricing)
- Claude Haiku 3.5 reply classification: ~$2 (assuming 30% reply rate, 300 replies at minimal tokens)
- Smartlead: $39/month (Basic)
- n8n self-hosted: $20/month (DigitalOcean droplet)
- Total: ~$116/month
Commercial AI SDR platforms (11x, Artisan) list at $2,000–$5,000/month for comparable contact volumes. The self-built stack runs at roughly 5–10% of list price. Even factoring in the GTM engineer’s time to build and maintain (estimate 20 hours initial build, 3–5 hours/month maintenance), the economics are favorable for teams sending more than 500 contacts/month.
What Breaks (Honest Assessment)
Deliverability. This is the most common failure mode and the least visible until your domain is flagged. Three sending accounts with proper warmup is a minimum, not a comfort level. Monitor spam rates weekly using Google Postmaster Tools and Microsoft SNDS. If you are hitting >0.3% spam complaint rates, pause and investigate before continuing. The Claude-generated content itself is not the problem — the sending infrastructure and list quality are.
Reply handling edge cases. Classification errors on ambiguous replies (someone who says “not now but try me in Q3” is not the same as “not interested”) will mis-route leads. Plan for a weekly human review of all classified replies, not just the “interested” bucket. The classification step has roughly 85–90% accuracy on clear-intent replies and drops to 60–70% on ambiguous ones.
CRM hygiene. The pipeline will generate contacts and activities faster than most CRM hygiene processes can handle. Build deduplication logic into the n8n workflow before pushing to CRM — checking for existing contact by email before creating a new record is basic hygiene that saves hours of cleanup.
Legal compliance. CAN-SPAM and GDPR do not care that your SDR is an AI. Suppression list management, opt-out processing, and data retention policies apply equally to automated outbound. If you are selling into the EU, evaluate whether B2B cold email to personal work addresses is compliant under your legal counsel’s interpretation of GDPR legitimate interest.
Related: See the Anthropic/Claude vendor profile for model pricing and capability details. The full Clay vendor profile compares Claygent to this custom stack approach. For Smartlead specifics, see the Clay vs. Apollo comparison for context on where each tool fits in the enrichment workflow.