Table of contents
Get insights delivered straight into your inbox every week!

How I Use Claude Code to Automate My Entire Cold Email Operation

How I Use Claude Code to Run My Entire Cold Outreach Operation

Most people running cold email outreach are doing everything manually. Checking mailboxes one by one. Copy-pasting templates. Eyeballing open rates in a dashboard without really understanding what's working or why.

That works fine when you have 5 mailboxes and one campaign. But when you're managing 50 to 100 mailboxes per client, running multiple campaigns with different messaging, and trying to figure out which messages actually get replies, doing it manually becomes a full-time job.

That's exactly the situation I was in before I started using Claude Code. Going into each tool, checking which mailboxes had problems, manually identifying which ones had less than 1% reply rates, figuring out which ones weren't getting any replies in a given week. Then creating and testing different messages for each client, for each pain point, for each CTA variation. And the weekly reporting? Going into the platforms manually, checking where replies came from, copy-pasting messages to analyze them by hand.

When I saw what Claude Code could do, that it was just a matter of giving it the API and API docs of the tools I was using, I realized this entire process could be automated.

Here's how it works.

Email Infrastructure: The Weekly Health Check

The first thing anyone managing email campaigns should do every week is check the general health of all their mailboxes. This is the foundation. If your mailboxes aren't healthy, nothing else matters.

Here's what to look at:

• Overall reply rates. If a campaign is below 1%, there's a deliverability problem.

• Individual mailbox performance. Any mailbox under 1% reply rate gets flagged.

• Zero-reply mailboxes. If a mailbox didn't receive a single reply in the week, not even an out-of-office, something is wrong.

Claude Code connects to the outreach platform's API, pulls all the mailbox data, and gives me a clear picture in seconds. No clicking through dashboards, no spreadsheets. Just a clean report showing exactly which mailboxes need attention. I run my outreach through Salesforge, and its API covers everything I need: mailbox status, performance metrics, reply rates, all accessible programmatically.

When a mailbox gets flagged, the process is straightforward: pause it and let it recover, or replace it with one from the backup pool. A good practice is to keep around 50% of your installed capacity as backup mailboxes, because you need to be ready to swap. And once you use a backup, you need to buy a new one to refill the pool.

Claude Code can also connect directly to the mailbox provider APIs to handle replacements. If I need new mailboxes with dedicated IPs, I provision them through the Infraforge API. If I need Google Workspace or Microsoft 365 mailboxes, the Primeforge API lets me purchase domains and mailboxes programmatically, specifying whether I want Google or Microsoft at the time of purchase. DNS gets configured automatically, and the new mailboxes connect to Salesforge without touching the UI.

Once the new mailboxes are live, I monitor warm-up through the Warmforge API. It exposes endpoints for mailbox warmup stats and inbox placement tests, so Claude Code can check heat scores and flag when a mailbox is ready to send. I keep them warming for at least two weeks before they enter any live campaign.

What used to take hours every Monday morning now takes minutes.

Campaign Creation: From Research to Live Sequence

Creating good campaigns starts with deep research. Not generic research. Real context about the company, the ICP, and what messaging has already worked.

Here's what I feed Claude Code before it writes a single word:

• Past emails that actually got positive replies

• Past email threads, including negotiations, objections, and conversations with customers

• Services documentation, pricing, and value propositions

• A detailed overview of the ICP and their specific pain points

• How I solve those pain points

• A list of CTAs and lead magnets that can be used in the messaging

The more context you give it, the better the output. This is the difference between Claude Code and just asking any AI tool to "write me a cold email." Claude Code has your entire second brain. It knows what works, what doesn't, and why.

But context alone isn't enough. You also need rules. For every campaign, Claude Code should follow specific guidelines:

For email:

• Keep messages short and structured

• Avoid spam trigger words that hurt deliverability

• No links in the email body

• No email signatures with images or links

For LinkedIn:

• Keep messages even shorter and more conversational

• Ask questions instead of pitching

• Never try to sell in the first message

These rules matter because what works on email doesn't work on LinkedIn. The channels are fundamentally different, and your messaging needs to reflect that.

A good practice is to keep sequences short, usually two messages. Bombarding people with follow-ups is not only annoying, it increases the risk of landing in spam, and that kills deliverability. Two well-crafted messages with the right context beat five generic follow-ups every time.

What really stands out about Claude Code is how well it takes the entire company context, combines it with the best-performing examples, and generates different campaign ideas with strong messages. I can push these directly into Salesforge through the API, set the schedule, assign mailboxes, and activate the sequence. From research to live campaign without touching the UI.

Campaign Performance: The Weekly Analyst

This is the part that changes everything.

Every week, Claude Code pulls the stats across all campaigns: how many contacts were added, which campaigns are running, reply rates, open rates. But the real value isn't in the numbers. It's in analyzing the actual messages that are working.

Here's what the weekly analysis looks like:

• Identify top-performing campaigns. Which ones are getting the most replies.

• Pull the actual messages. Not just the metrics, but the email copy and LinkedIn messages that people are responding to.

• Break down the patterns: which CTAs convert, which opening lines work, which lead magnets get engagement, which pain points resonate, whether shorter or longer messages perform better.

• Map performance to ICP segments. Know exactly which audience responds to which messaging.

This is where it gets interesting. Once I know what's working, I can start testing systematically.

For example, if a message is performing well with one ICP, I test the same message with a different ICP. Did it still work? Then the messaging is strong. Did it drop? Then it was the ICP that made the difference, not the message.

I can also do it the other way: take an ICP that's responding well and test completely different messaging. If they still respond, that segment is just ready to buy, and I can optimize the message further.

Some real insights that came out of this process:

• On LinkedIn, being purely conversational outperforms any sales pitch. Just start with one question. Be short. Don't try to sell anything in the first message. If the conversation develops naturally, then you can talk about how you can help.

• Lead magnet placement matters. Sometimes saving the lead magnet for the second email works. But leading with the lead magnet right away ("Hey, I built this and I think it's a great fit for you, given your situation") can outperform the slow reveal. You wouldn't know this without testing both approaches systematically.

• Shorter emails consistently win. Not always, but often enough that it should be your default.

The ideal weekly report is simple: here are the messages that are working, here's what they have in common, here's what to test next week. That's it. Clear hypotheses based on real data, not gut feeling.

LinkedIn Outreach: A Different Game

LinkedIn is its own channel with its own rules. Here's the approach that works:

Connection requests should be blank. No note. The first real message is a DM after they accept.

From there, it's a two-step sequence:

• First DM. Short, conversational, one question. If you have good research or triggers on the person, include them. If not, keep it general. The goal is to start a conversation, not to pitch.

• Follow-up. Still short. Still a question. Add a bit more context or value, but don't switch to sales mode.

The key insight: LinkedIn messages and email messages are not the same thing. What works in email will not work on LinkedIn. The platform is more personal, more conversational. People can see your profile, your posts, your activity. The message needs to match that context. Salesforge handles both email and LinkedIn outreach from one platform, so I can manage the full multi-channel workflow through a single API.

Claude Code understands this distinction when I give it clear rules for each channel, along with examples of what actually works on each one. It doesn't just swap the channel name and keep the same copy. It genuinely adapts the tone and structure.

What Do I Need From My Outreach Platform's API?

This whole approach is only possible because modern outreach platforms have solid APIs. Without programmatic access to mailbox data, sequence management, contact lists, and analytics, you're stuck doing everything through the UI.

Here's what I need from the API to make this work:

API CapabilityWhat It Enables
Mailbox managementList all mailboxes, check status, view performance metrics
Sequence managementCreate sequences, define steps, assign mailboxes, set schedules, activate and pause
Contact managementCreate contacts, bulk import, assign to sequences, manage do-not-contact lists
AnalyticsPull campaign metrics, reply rates, open rates over custom date ranges
Thread accessRead conversation threads and individual messages to analyze what's working
WebhooksGet real-time notifications for replies, bounces, and other events

The Forge stack covers this well. Here's what has API access:

ProductAPI?What You Can Do Programmatically
SalesforgeYesMailbox management, sequences, contacts, analytics, threads, webhooks
InfraforgeYesDomain and mailbox provisioning with dedicated IPs, DNS configuration
PrimeforgeYesDomain purchase, Google/Microsoft mailbox provisioning via platform parameter
WarmforgeYesMailbox warmup stats, inbox placement tests, mailbox health monitoring
LeadsforgeYesLead search, email/LinkedIn/phone enrichment, credit balance


I run the core workflow through the Salesforge API because it's the central hub. For infrastructure, I use the Infraforge and Primeforge APIs to provision mailboxes programmatically. Warmforge's API handles warmup monitoring. And for lead data, the Leadsforge API gives me programmatic access to 500M+ contacts with waterfall enrichment.

How Do I Actually Connect Claude Code to These APIs?

Claude Code  have is a Bash tool. I give it the API docs and my API keys as environment variables. It writes a Python or curl script that calls the endpoints, asks for my permission to run it, executes it, and returns the results. Anthropic's own Bash tool documentation shows this exact pattern: Claude Code writing a Python script that calls an external API and running it.

The short version of the setup:

• Get your API keys from each Forge product dashboard

• Export them as environment variables in your shell before launching Claude Code

• Save the Swagger docs locally or add key endpoints to your CLAUDE.md file so Claude Code has the context

• Describe what you want in plain English. Claude Code writes the script, you approve it, it runs.

• Save working scripts as reusable slash commands in .claude/commands/

If you're new to Claude Code, Anthropic has an official course that covers the Bash tool, CLAUDE.md, slash commands, and permissions in depth: Claude Code: A Highly Agentic Coding Assistant. The Bash tool documentation is at docs.anthropic.com.

When the Forge stack builds MCP servers, this workflow gets cleaner. Claude Code would have native tool-level access to each endpoint without writing scripts. But for now, the Bash approach works and it's the documented way to interact with external APIs.

The Bottom Line

The biggest change isn't just saving time, although that matters. It's surfacing insights that you miss when you do things manually.

When Claude Code pulls all the data, analyzes the messages, and shows you the patterns, you see things you would have missed. Which ICP responds to which pain point. Which CTA converts in which context. Which message structure gets replies consistently.

If you're still doing this manually, checking mailboxes one by one, writing every message from scratch, eyeballing your campaign dashboards, you're not just slower. You're missing data that would make your campaigns measurably better.

Give Claude Code your outreach platform's API docs and your best-performing messages as context. Let it write the scripts that pull your data and analyze your campaigns weekly. Test what's working across different ICPs and messages. You'll create campaigns faster, remove underperforming mailboxes before they hurt you, and actually understand what's driving your replies.

If you want to try this workflow yourself, Salesforge gives you the API access you need to connect Claude Code and automate your cold email operation. Start a free trial, no credit card required.

FAQs

What is Claude Code and how does it connect to outreach tools?

Claude Code is Anthropic's command-line AI tool that runs in your terminal. It connects to external platforms through APIs and MCP (Model Context Protocol). You give it the API documentation for your outreach platform, and it can programmatically pull data, create campaigns, and analyze performance without you touching the UI.

Do I need coding skills to set this up?

Basic familiarity with the terminal helps, but you don't need to be a developer. Claude Code understands natural language instructions. The main setup involves connecting it to your outreach platform's API, which typically means providing an API key and the platform's API documentation.

How many mailboxes should I keep as backups?

About 50% of your installed capacity. If you're running 60 active mailboxes, keep 30 warmed-up backups ready to swap in. When a mailbox gets flagged for low performance, you pause it and replace it immediately so your campaigns don't lose momentum.

Can Claude Code handle both email and LinkedIn outreach?

Yes, as long as your outreach platform's API supports both channels. Salesforge handles email and LinkedIn from one platform, so Claude Code can manage the full multi-channel workflow through a single API connection.

How often should I run the mailbox health check?

Weekly at minimum. Every Monday morning is a good rhythm. You're checking reply rates per mailbox, identifying any mailbox that got zero replies in the past week, and flagging anything below 1% reply rate. The earlier you catch a problem, the less damage it does to your infrastructure.