Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sendpilot.ai/llms.txt

Use this file to discover all available pages before exploring further.

This event is triggered when a lead replies to your LinkedIn message.

When This Event Fires

  • A lead responds to a campaign message
  • A lead sends a new message in an existing conversation
  • Any inbound message is received from a lead

Payload

{
  "eventId": "evt_1708456789123_abc123def",
  "eventType": "reply.received",
  "timestamp": "2024-02-24T14:30:00.000Z",
  "workspaceId": "ws_abc123xyz",
  "data": {
    "leadId": "lead_abc123",
    "campaignId": "camp_xyz789",
    "linkedinUrl": "https://www.linkedin.com/in/john-doe",
    "senderId": "sender_def456",
    "reply": "Hi! Thanks for reaching out. I'd be happy to learn more about your product. How about we schedule a call for next Tuesday at 2pm?"
  }
}

Payload Fields

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

Use Cases

CRM Integration

Log replies in your CRM and update lead status

Notifications

Alert sales team immediately when leads respond

AI Analysis

Analyze reply sentiment and intent automatically

Auto-Response

Trigger automated follow-up workflows

Example Handler

app.post('/webhooks/sendpilot', (req, res) => {
  const event = req.body;
  
  if (event.eventType === 'reply.received') {
    const { leadId, campaignId, reply } = event.data;
    
    // Update lead status in CRM
    await crm.updateLead(leadId, {
      status: 'replied',
      lastReply: reply,
      repliedAt: event.timestamp
    });
    
    // Send Slack notification
    await slack.notify({
      channel: '#sales-replies',
      text: `🎉 New reply from lead ${leadId}:\n"${reply}"`
    });
    
    console.log(`Reply received from lead ${leadId}`);
  }
  
  res.status(200).send('OK');
});
The reply field contains the full message content from the lead.