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

# LinkedIn

> Log connection requests, messages, and profile visits via Unipile.

<Note>
  LinkedIn has no official API for DMs. Nous uses [Unipile](https://unipile.com) as a middleware — you connect your LinkedIn account to Unipile, and Unipile forwards events to Nous via webhook.
</Note>

## Server Setup

<Steps>
  <Step title="Create a Unipile account">
    Sign up at [unipile.com](https://unipile.com). You need a paid plan to use the LinkedIn messaging API.

    <Frame>
      <img src="https://mintcdn.com/proply/LwqIW-gQ3m06WJtc/images/Screenshot-2026-05-15-at-11.08.31-AM.png?fit=max&auto=format&n=LwqIW-gQ3m06WJtc&q=85&s=70202dad48f879ea18093ed2fc3384b4" alt="Screenshot 2026 05 15 At 11 08 31 AM" title="Screenshot 2026 05 15 At 11 08 31 AM" style={{ width:"53%" }} width="1790" height="1086" data-path="images/Screenshot-2026-05-15-at-11.08.31-AM.png" />
    </Frame>
  </Step>

  <Step title="Get your API Key and DSN">
    In the Unipile dashboard go to **Settings → API**. Copy your **API Key** and **DSN** (the webhook base URL).

    <Frame>
      <img src="https://mintcdn.com/proply/LwqIW-gQ3m06WJtc/images/Screenshot-2026-05-15-at-11.09.53-AM.png?fit=max&auto=format&n=LwqIW-gQ3m06WJtc&q=85&s=296945bed0bce92726383e9edd6b21a3" alt="Screenshot 2026 05 15 At 11 09 53 AM" title="Screenshot 2026 05 15 At 11 09 53 AM" style={{ width:"54%" }} width="1870" height="1462" data-path="images/Screenshot-2026-05-15-at-11.09.53-AM.png" />
    </Frame>
  </Step>

  <Step title="Add to nous.env">
    ```bash theme={null}
    UNIPILE_API_KEY=your-api-key
    UNIPILE_DSN=your-dsn
    LINKEDIN_WEBHOOK_SECRET=a-random-secret-string
    ```

    Restart your containers after saving.
  </Step>

  <Step title="Connect your LinkedIn account in Unipile">
    In the Unipile dashboard go to **Accounts → Add account → LinkedIn** and follow the login flow.
  </Step>

  <Step title="Register the Connections webhook">
    In Unipile go to **Webhooks → Add webhook**. Set:

    * **Event:** On new relation
    * **URL:**

    ```text theme={null}
    https://api.yourdomain.com/inbound/linkedin?workspace_id=YOUR_WORKSPACE_ID&secret=YOUR_LINKEDIN_WEBHOOK_SECRET
    ```

    <img src="https://mintcdn.com/proply/LwqIW-gQ3m06WJtc/images/Screenshot-2026-05-15-at-11.13.24-AM.png?fit=max&auto=format&n=LwqIW-gQ3m06WJtc&q=85&s=d1b2168e6eeab1f0e42bcc57758ceabe" alt="Screenshot 2026 05 15 At 11 13 24 AM" title="Screenshot 2026 05 15 At 11 13 24 AM" style={{ width:"52%" }} width="1320" height="672" data-path="images/Screenshot-2026-05-15-at-11.13.24-AM.png" />
  </Step>

  <Step title="Register the Messages webhook">
    Add a second webhook:

    * **Event:** On new message
    * **URL:** same URL as above

    <img src="https://mintcdn.com/proply/LwqIW-gQ3m06WJtc/images/Screenshot-2026-05-15-at-11.13.51-AM.png?fit=max&auto=format&n=LwqIW-gQ3m06WJtc&q=85&s=00085367e10d21b0c8a969b92042eaf0" alt="Screenshot 2026 05 15 At 11 13 51 AM" title="Screenshot 2026 05 15 At 11 13 51 AM" style={{ width:"53%" }} width="1260" height="994" data-path="images/Screenshot-2026-05-15-at-11.13.51-AM.png" />
  </Step>

  <Step title="Connect to LinkedIn inside Integrations Page">
    After you set up everything in Uniple, now you can registrar with your Log-in data or cookies into your LinkedIn account.
  </Step>
</Steps>

<Tip>
  Find your Workspace ID in **Webhooks** — the URL shown there already has it embedded.
</Tip>

## What gets logged

| Event                   | Activity logged             |
| ----------------------- | --------------------------- |
| New connection accepted | `linkedin_connection`       |
| Inbound DM              | `linkedin_message_received` |
| Outbound DM             | `linkedin_message_sent`     |
