Skip to main content
This guide walks you through building a production-ready LinkedIn outreach sequence using the Edges API. You’ll learn how to:
  • Set up identities and connect LinkedIn accounts
  • Source and manage leads
  • Send connection requests and messages at scale
  • Handle replies, de-duplication, and errors
  • Respect rate limits and best practices
Recommended setup: Use Engagement Identities for outreach actions. They’re credit-free for connection requests, messages, and profile visits.

Section 1: Prerequisites & Key Concepts

Before building your sequence, familiarize yourself with these core concepts:

Identity Setup Checklist

1

Create an Engagement Identity

Use the Create Identity API with is_engagement: true
2

Connect LinkedIn

Use Connect Integration with cookies, email/password, or login links
3

Set up Webhooks

Monitor integration status changes like AUTH_EXPIRED. See LinkedIn Integration Webhooks

Section 2: Lead Sourcing

Leads can come from Edges search actions or external sources like CSV uploads.
How it works: Build your search filters on LinkedIn (title, location, company, etc.), then copy the search URL and pass it to the API. See Search LinkedIn People for details.
Have Sales Navigator? Use salesnavigator-search-people instead for access to advanced filters (seniority, function, company headcount growth, etc.). Works the same way — build your search on LinkedIn Sales Navigator and pass the URL.

Option B: External Sources

Import leads from your CRM, CSV, or other sources. Required fields:
  • linkedin_profile_url (required) - e.g., https://www.linkedin.com/in/johndoe
  • full_name (recommended for personalization)
  • company_name (recommended for personalization)
Best practice: Store the immutable linkedin_profile_id once you have it. Profile URLs can change if users update their vanity URL.

Section 3: Get User’s LinkedIn Profile ID

The user’s linkedin_profile_id is needed to detect replies (comparing who sent the last message).
Good news: The linkedin_profile_id is already available in the integration’s meta field when you retrieve the integration details. No extra API call needed!
See Get an Identity’s Integration for full response schema.
Alternative: If you need additional profile details (headline, company, etc.), you can use linkedin-me which returns full profile information.

Section 4: Database Schema (Pseudocode)

Track leads, conversations, and outreach history:

Section 5: Lead Lifecycle State Machine

Visualize how leads progress through your sequence:

Part A: Main Outreach Flow

The happy path from new lead to reply:

Part B: Edge Cases (Already Connected / Existing Conversation)

Handle leads who are already in your network or have messaged first:

Part C: Identity Failure Recovery

When LinkedIn auth expires, pause affected leads and resume when fixed:

Edge Cases Summary


Section 6: Action Limits Quick Reference

Each action in the sequence has specific daily limits. Link to the action doc for full response schema.
Connection notes limit: LinkedIn Classic accounts can only send 5 connection requests WITH a personalized note per month. After that, notes are silently dropped. Consider: connect without note, then message after they accept.
Full limits reference: LinkedIn Smart Limits →

Section 7: Error Labels for Outreach Actions

Each action returns specific error labels. Handle these in your code. How to handle in code:
Full error reference: Error Reference →

Section 8: Optimized Sync Flow (last_message optimization)

The last_message field in extract-conversations contains the sender’s linkedin_profile_id. This lets you detect replies without calling extract-messages.
When you DO need extract-messages:
  • Building a Lemlist-like inbox UI - Display full conversation threads to users in your app
  • Full conversation history for CRM sync
  • Message analytics/sentiment analysis
  • Compliance/audit requirements

Section 9: Sending Outreach Actions (Complete Examples)

Send a Connection Request

Send a Message


Section 10: De-duplication Logic

Before sending any outreach, check for existing conversations and pending requests.

Section 11: Business Hours & Timezone Sending

Send messages during the lead’s business hours for better response rates.

Section 12: Callback Correlation with custom_data

When using async execution, pass custom_data to correlate callbacks with your leads.
See Callbacks Documentation → for full callback payload structure.

Section 13: Rate Limits & Scaling

Understand both types of limits:

1. LinkedIn Smart Limits (per identity, per action)

These protect individual LinkedIn accounts from restrictions:

2. API Rate Limits (per workspace)

Based on your Edges plan tier. See API Rate Limits →

Choosing the Right Execution Mode

Choose based on when and how you need the action executed:
Implementation stays the same regardless of user count. Your architecture should support all modes from day 1 based on feature requirements, not scale.
Best practice: Space out requests. Instead of bursting 50 messages at once, spread them across the day using job queues or scheduled runs.

Section 14: When to Sync Data

Knowing when to sync connections and conversations is critical for accurate outreach.

Connections Extraction

Conversations Extraction

Schedule mode is ideal for recurring syncs. Set up a schedule to run extract-connections daily and extract-conversations every few hours. See Scheduled Runs →

Section 15: Sync-Before-Send Pattern (Race Condition Prevention)

Problem: If you sync at 8:00am but send at 8:05am, lead could have replied at 8:03am. Solution: Always sync immediately before sending:
Acceptable staleness: 5-10 minutes for most use cases. For high-value leads, sync immediately before.

Section 16: Identity Failure Recovery

Prerequisite: Set up integration webhooks. See Monitor LinkedIn Integration Status → When identity auth expires (webhook event: AUTH_EXPIRED):

Section 17: Handling Edge Cases (Already Connected, Lead Messaged First)

When adding a lead to a sequence, check for existing relationships:

Section 18: Complete Orchestrator Example

This ties everything together. A daily cron job that processes all leads for all identities.
How to run:
  • Set up a cron job: 0 8 * * * python run_daily_outreach.py
  • Or use a job queue (Bull, Celery, etc.) for better control

Section 19: Testing Strategy

Challenge: Can’t spam real LinkedIn users during development.

Approach 1: Test Accounts

  • Create 2-3 LinkedIn test accounts (personal accounts you control)
  • Use these as “leads” for end-to-end testing
  • Verify messages arrive, connections work

Approach 2: Dry Run Mode

Approach 3: Staging Environment

  • Use a separate Edges workspace for testing
  • Connect test identities only
  • Isolates production data

Approach 4: Unit Test Mocks


Section 20: API Reference & SDK

TypeScript SDK

For a cleaner developer experience, use the official TypeScript SDK:
See SDK Documentation →

Key Actions Reference

Don’t duplicate schemas - refer to live action docs for full request/response examples:

Summary

You now have everything needed to build a production-ready LinkedIn outreach sequence:
Questions? Check the FAQ or reach out to support.