Skip to main content
This event is triggered when a lead sends a reply message to your LinkedIn outreach. This indicates engagement and typically requires follow-up.

When This Event Fires

  • A lead replies to a message you sent
  • The reply is detected by SendPilot’s webhook system
  • The lead’s status changes to REPLY_RECEIVED

Payload

{
  "eventId": "evt_1708456789123_abc123def",
  "eventType": "message.received",
  "timestamp": "2024-02-24T10:30:00.000Z",
  "workspaceId": "ws_abc123xyz",
  "data": {
    "leadId": "lead_abc123",
    "campaignId": "camp_xyz789",
    "linkedinUrl": "https://www.linkedin.com/in/john-doe",
    "senderId": "sender_def456",
    "replyPreview": "Thanks for reaching out! I would be interested in learning more about..."
  }
}

Payload Fields

FieldTypeDescription
eventIdstringUnique event identifier for idempotency
eventTypestringAlways message.received
timestampstringISO 8601 timestamp when the reply was detected
workspaceIdstringYour workspace ID
data.leadIdstringThe lead who replied
data.campaignIdstringThe campaign this lead belongs to
data.linkedinUrlstringLinkedIn profile URL of the lead
data.senderIdstringLinkedIn sender account that received the reply
data.replyPreviewstringFirst 100 characters of the reply content

Use Cases

Sales Alerts

Notify your sales team immediately when a lead responds

CRM Sync

Update lead status in your CRM to reflect engagement

Response Tracking

Track response rates and campaign effectiveness

Workflow Automation

Trigger follow-up workflows in tools like Zapier or n8n

Example Handler

app.post('/webhooks/sendpilot', async (req, res) => {
  const event = req.body;
  
  if (event.eventType === 'message.received') {
    const { leadId, campaignId, linkedinUrl, replyPreview } = event.data;
    
    // Notify sales team via Slack
    await slack.postMessage({
      channel: '#sales-leads',
      text: `🎉 New reply from lead!\n` +
            `Profile: ${linkedinUrl}\n` +
            `Preview: ${replyPreview}`
    });
    
    // Update CRM
    await crm.updateLead(leadId, {
      status: 'responded',
      lastActivity: event.timestamp
    });
    
    console.log(`Reply received from ${linkedinUrl}`);
  }
  
  res.status(200).send('OK');
});
This is typically the most important webhook event for sales teams. Consider setting up real-time notifications to Slack, email, or your team’s preferred communication tool.