> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendler.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# connection_request.sent

> Triggered when a connection request is sent to a lead

This event is triggered when a LinkedIn connection request is successfully sent to a lead through campaign automation.

## When This Event Fires

* Campaign automation sends a connection request
* The connection request is successfully delivered to LinkedIn
* The lead's status changes to `CONNECTION_SENT`

## Payload

```json theme={null}
{
  "eventId": "evt_1708456789123_abc123def",
  "eventType": "connection_request.sent",
  "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",
    "note": "Hi John, I noticed we share an interest in SaaS growth..."
  }
}
```

## Payload Fields

| Field | Type | Description |
| - | - | - |
| `eventId` | string | Unique event identifier for idempotency |
| `eventType` | string | Always `connection_request.sent` |
| `timestamp` | string | ISO 8601 timestamp when the request was sent |
| `workspaceId` | string | Your workspace ID |
| `data.leadId` | string | The lead who received the connection request |
| `data.campaignId` | string | The campaign this lead belongs to |
| `data.linkedinUrl` | string | LinkedIn profile URL of the lead |
| `data.senderId` | string | LinkedIn sender account that sent the request |
| `data.note` | string | Connection note if included (LinkedIn Premium only) |

## Use Cases

> **Outreach Tracking**
>
> Track daily connection request volume

> **CRM Sync**
>
> Log outreach activity in your CRM

> **Follow-up Tasks**
>
> Create follow-up tasks if no response after X days

> **Reporting**
>
> Build custom reports on outreach activity

## Example Handler

```javascript theme={null}
app.post('/webhooks/sendpilot', async (req, res) => {
  const event = req.body;
  
  if (event.eventType === 'connection_request.sent') {
    const { leadId, campaignId, linkedinUrl, note } = event.data;
    
    // Log to CRM
    await crm.logActivity({
      leadId,
      type: 'connection_request_sent',
      message: note || 'Connection request sent (no note)',
      campaignId
    });
    
    // Schedule a follow-up task if no response in 7 days
    await taskQueue.schedule({
      type: 'check_connection_status',
      leadId,
      executeAt: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000)
    });
    
    console.log(`Connection request sent to ${linkedinUrl}`);
  }
  
  res.status(200).send('OK');
});
```

> [!NOTE]
>
> The `note` field is only populated for LinkedIn Premium accounts that include a message with their connection requests. Free accounts will have this field empty or undefined.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.