Skip to main content

How to Automate LinkedIn Outreach with Claude Code [2026 Guide]

· 10 min read

LinkedIn is where B2B deals start.

Your best prospects are there. Decision-makers scroll it daily. A well-crafted message can open doors that cold email never could.

But here's the problem: personalization doesn't scale.

You can either send 100 generic messages (and get ignored) or send 10 deeply personalized ones (and miss 90% of your prospects).

Claude Code changes that equation.

This guide shows you how to build an AI-powered LinkedIn outreach system that researches prospects deeply, crafts genuinely personalized messages, and sequences follow-ups—all while staying within LinkedIn's terms of service.

LinkedIn outreach automation workflow with AI personalization

Why Most LinkedIn Outreach Fails

Before we build the solution, let's understand the problem:

The Generic Message Problem

Hi [Name],

I noticed we're both in the [Industry] space. I'd love to connect
and learn more about what you're working on at [Company].

Best,
[SDR Name]

Every decision-maker sees this 50 times a day. The acceptance rate? Under 5%.

The "I Checked Your Profile for 2 Seconds" Problem

Hi Sarah,

I see you're the VP of Sales at Acme Corp—impressive background!
I'd love to share how we help sales leaders like you...

The prospect knows you didn't really research them. You just read their headline. This performs marginally better than full generic, but still gets ignored.

The Actually Personalized Message

Hi Sarah,

Caught your comment on Mark Roberge's post about PLG motions last week.
The point about enterprise sales teams struggling to adapt to product-led
signals resonated—we see the same pattern with our customers in IoT.

Curious how you're handling that transition at Acme, especially
after the Globex acquisition. Happy to share what's working for
companies in similar situations if helpful.

No pitch, just genuinely interested in your take.

This gets responses. But it took 15 minutes to research and write.

The goal: Get the third message's quality at the first message's scale.

The Claude Code Approach

Claude's 200K context window and nuanced writing make it perfect for this:

  1. Research deeply — Pull prospect's recent posts, comments, company news
  2. Identify angles — Find genuine connection points (not fake ones)
  3. Write naturally — Match the prospect's communication style
  4. Avoid AI tells — No corporate speak, no obvious templates

What You'll Build

By the end of this guide, you'll have a system that:

  • Researches prospects using public LinkedIn data
  • Identifies personalization hooks from their activity
  • Generates connection request messages (300 char limit)
  • Creates follow-up sequences based on profile type
  • Tracks sent messages and responses

Step 1: Prospect Research with Claude

First, gather intelligence. You need:

  • Recent posts and comments
  • Company news
  • Shared connections
  • Background/experience

Building the Research Prompt

// prospect-research.js
const researchPrompt = `You are a sales research assistant.
Given information about a LinkedIn prospect, identify:

1. **Recent Activity Hooks**
- Posts they've written (topics, opinions expressed)
- Comments on others' posts (what caught their attention)
- Articles shared (what they find valuable)

2. **Company Context**
- Recent news (funding, acquisitions, product launches)
- Likely challenges given their industry/stage
- Competitor activity they'd care about

3. **Personal Connection Points**
- Shared experiences (schools, past companies, interests)
- Mutual connections worth mentioning
- Career transitions that show priorities

4. **Communication Style**
- Formal vs casual tone
- Direct vs relationship-first
- Technical vs business-focused

Return a JSON object with these categories and specific examples.
Only include REAL information—never fabricate details.
If you can't find something, say "Not found" rather than guessing.`;

Gathering Public Data

Use Claude Code to build a research aggregator:

codex "Create a prospect research function that:

1. Takes a LinkedIn profile URL or name + company
2. Searches for their recent public posts using web search
3. Finds recent company news
4. Identifies mutual connections from a provided list
5. Returns structured research data

Use Brave Search API for web searches.
Parse LinkedIn public profiles (no scraping private data).
Respect rate limits and don't hammer any single source."

LinkedIn profile analysis and personalized message generation

Step 2: Message Generation

Now the magic—turning research into messages:

Connection Request Messages

LinkedIn limits connection requests to 300 characters. Every word counts.

const connectionRequestPrompt = `Write a LinkedIn connection request 
based on this prospect research:

{{research}}

CONSTRAINTS:
- Maximum 300 characters (including spaces)
- No salesy language
- Reference ONE specific thing from their activity
- End with a reason to connect, not a pitch
- Match their communication style (see research)

EXAMPLES OF GOOD MESSAGES:

"Your comment on the PLG debate resonated—we're seeing similar
tension between product-led and sales-led at IoT companies.
Would love to compare notes."

"Saw Acme's Series C announcement—congrats! Curious how you're
thinking about scaling the sales team. Happy to share patterns
from similar stage companies."

"Your post about SDR burnout hit home. Building tools to help
with exactly that. Would value your perspective."

Write 3 options ranked by quality. Explain why each works.`;

First Follow-Up Messages

After they accept, the first message sets the tone:

const firstFollowUpPrompt = `Write a follow-up message for a 
prospect who just accepted my connection request.

Original connection request:
{{original_message}}

Prospect research:
{{research}}

GUIDELINES:
- Thank them for connecting (briefly, not effusively)
- Expand on the topic from the connection request
- Offer specific value (insight, introduction, resource)
- End with a soft question, not a meeting request
- Keep under 500 characters

The goal is to start a conversation, not close a meeting.`;

Step 3: Sequence Building

Different prospects need different sequences:

Decision Maker Sequence

const dmSequence = {
day0: 'connection_request',
day3: 'first_followup',
day7: 'value_message', // Share relevant content
day14: 'soft_ask', // Suggest a call if engaged
day21: 'breakup' // Graceful close
};

const valueMessagePrompt = `Create a value-add message for this prospect.

Research: {{research}}
Previous messages: {{thread}}

Find ONE piece of content (post, article, report) that would
genuinely help them. Explain briefly why it's relevant to
their specific situation.

NOT: "Here's our latest whitepaper"
YES: "This analysis of PLG sales models reminded me of your
comment about enterprise motion challenges. Section 3 on
hybrid approaches might be relevant for Acme's situation."

Keep under 400 characters.`;

IC (Individual Contributor) Sequence

const icSequence = {
day0: 'connection_request',
day2: 'peer_followup', // More casual, peer-to-peer
day5: 'resource_share', // Tool, template, or tip
day10: 'dm_intro_ask' // Ask for intro if there's a DM target
};

Step 4: Automating the Pipeline

Bring it together with OpenClaw for scheduling:

Daily Research Job

# openclaw config
cron:
- name: "LinkedIn Research"
schedule: "0 6 * * 1-5" # 6am weekdays
task: |
For each prospect in my outreach queue:
1. Run research function
2. Generate appropriate message
3. Queue for sending
4. Log to tracking sheet

Message Queue and Tracking

codex "Create a LinkedIn outreach tracker that:

1. Maintains a queue of prospects to contact
2. Tracks sent messages and dates
3. Logs responses and engagement
4. Calculates acceptance and reply rates
5. Alerts when a prospect engages

Store in Supabase with these fields:
- prospect_id, name, company, title
- research_json
- messages_sent (array with dates)
- status (queued/sent/accepted/replied/converted)
- notes

Generate weekly report showing:
- Messages sent, accepted, replied
- Best-performing message templates
- Prospects needing follow-up"

Real Performance Numbers

When you implement AI-assisted LinkedIn outreach properly:

Generic Approach

  • Connection acceptance: 5-10%
  • Reply rate: 2-5%
  • Meeting rate: 0.5-1%

AI-Personalized Approach

  • Connection acceptance: 35-50%
  • Reply rate: 15-25%
  • Meeting rate: 5-10%

That's a 10x improvement in meetings booked.

Sample Week

DayProspects ResearchedMessages SentAcceptedRepliedMeetings
Mon2020831
Tue2020941
Wed2020730
Thu20201052
Fri2020841
Total10010042195

Five meetings from 100 prospects, with maybe 2 hours of actual work (review and approve messages).

Avoiding LinkedIn Jail

LinkedIn's algorithms detect automation. Here's how to stay safe:

Activity Limits

  • Connection requests: 20-25/day max
  • Messages: 50-75/day max
  • Profile views: 100-150/day max
  • Searches: Spread throughout the day

Human Patterns

  • Don't send at exactly the same time daily
  • Vary message lengths
  • Take weekends off (mostly)
  • Accept requests manually sometimes

Quality Signals

LinkedIn rewards engagement:

  • Post your own content weekly
  • Comment thoughtfully on others' posts
  • Complete your profile fully
  • Have a reasonable network size

Red Flags to Avoid

  • Identical messages to multiple people
  • Sending from a brand new account
  • Mass connection requests in short bursts
  • Never posting your own content

Integrating with Your Sales Stack

LinkedIn outreach works best when integrated:

CRM Sync

codex "Create a HubSpot integration that:

1. Creates/updates contacts when LinkedIn connections accept
2. Logs LinkedIn messages as activities
3. Updates deal stage when replies indicate interest
4. Triggers sales sequences for qualified prospects"

Routing to AEs

When a prospect engages:

  1. Research reply — Check sentiment, interest level
  2. Update CRM — Add notes on what they said
  3. Notify AE — Slack alert with context
  4. Queue handoff message — Draft intro from SDR to AE

Pro Tips from Top Performers

Tip 1: Engage Before Connecting

Before sending a connection request:

  • Like 2-3 of their posts
  • Leave a thoughtful comment
  • Share something of theirs with your take

Now when you connect, they recognize your name.

Tip 2: Use Their Words

If they wrote a post about "sales efficiency," use that exact phrase. If they call themselves a "revenue leader" not a "sales leader," mirror that.

Claude is great at this when you provide the source material.

Tip 3: Give Before Asking

The ratio should be 3:1 — three value-adds for every ask:

  1. Connection request (light ask)
  2. Useful article/insight (give)
  3. Relevant introduction (give)
  4. Industry tip (give)
  5. Meeting request (ask)

Tip 4: Warm Up the DM

Your best prospects probably follow influencers in your space. Engage with those influencers' content where your prospects are commenting.

Now you've "met" in public before sliding into DMs.

Common Mistakes to Avoid

Over-Relying on AI

AI generates the message, but you should:

  • Review every message before sending
  • Add personal touches you genuinely know
  • Skip prospects where you can't find real hooks
  • Adjust based on responses

Fake Personalization

# BAD
"I see you're passionate about sales—me too!"

# GOOD
"Your post last week about discounting during
enterprise negotiations changed how I think
about pricing conversations."

If you can't find real personalization, use a honest generic:

"Expanding my network of sales leaders in IoT. 
Your background at [Company] caught my eye.
Happy to connect and share what I'm seeing
in the space."

Honest generic beats fake personal every time.

Pitching Too Soon

The sequence matters:

  1. Connect
  2. Acknowledge
  3. Provide value
  4. Ask

Skipping to step 4 kills the relationship.

Getting Started This Week

Day 1: Set Up Tools

  • Install Claude Code / Codex CLI
  • Set up tracking spreadsheet or Supabase table
  • Create your prospect list (50 targets)

Days 2-3: Build Research Flow

  • Create research prompt
  • Test on 5 prospects manually
  • Refine based on what's useful

Days 4-5: Generate Messages

  • Create message prompts for each sequence step
  • Generate messages for 20 prospects
  • Review and improve prompt

Week 2: Launch

  • Send 10-15 connection requests daily
  • Track acceptance and reply rates
  • Iterate on messages based on performance

Next Steps

LinkedIn outreach is just one piece of the prospecting puzzle. To see how AI-powered outreach fits into a complete SDR workflow:

Book a MarketBetter demo — We'll show you how the Daily SDR Playbook combines LinkedIn signals, email outreach, and CRM data to tell your reps exactly who to contact and what to say.


The best LinkedIn outreach doesn't feel like outreach. It feels like a human who did their homework. Now you can do that homework in seconds.