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

# LinkedIn Messages

> Per-message log of the LinkedIn conversations behind each lead — direction, type, sender, and body. Agent-maintained.

## What it is

The message-level log behind the LinkedIn pipeline. One row per message — each inbound or outbound line of a LinkedIn conversation — tied to the [LinkedIn Lead](/for-agents/data-model/linkedin-leads) it belongs to via `lead_id`. It records the direction, the message type (including whether it was an InMail), who sent it, the body, and the provider ids that trace the row back to Unipile.

Use it to reconstruct the full thread for a lead, to see what was actually said, and to time follow-ups.

## How it gets data

Populated by outreach/marketing agents and connectors (Unipile for LinkedIn); not part of the standard onboarding catalog. Available to query once your workspace runs the relevant agents.

## Fields

| Field                 | Type     | Description                                                                        |
| --------------------- | -------- | ---------------------------------------------------------------------------------- |
| `lead_id`             | uuid     | The [LinkedIn Lead](/for-agents/data-model/linkedin-leads) this message belongs to |
| `direction`           | text     | `inbound` (from the lead) or `outbound` (from you)                                 |
| `message_type`        | text     | Kind of message (e.g. connection note, direct message, InMail)                     |
| `is_inmail`           | boolean  | True when the message was sent as an InMail                                        |
| `sender`              | text     | Display name of the sender                                                         |
| `sender_provider_id`  | text     | Provider-side id of the sender                                                     |
| `body`                | text     | The message text                                                                   |
| `message_at`          | datetime | When the message was sent                                                          |
| `unipile_chat_id`     | text     | Unipile conversation id                                                            |
| `unipile_message_id`  | text     | Unipile message id                                                                 |
| `provider_message_id` | text     | LinkedIn/provider message id                                                       |
| `provider_id`         | uuid     | The connected mailbox/provider account the message came through                    |
| `raw`                 | json     | Raw provider payload, kept so nothing from the source is lost                      |
| `department_id`       | uuid     | Owning department, for visibility scoping                                          |

<Note>
  Also carries the system columns `id`, `tenant_id`, `workspace_id` (tenant isolation), and `created_at`. They are managed automatically.
</Note>

## Query it

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "data_query",
    "arguments": {
      "view_slug": "linkedin_messages",
      "filters": { "direction": "inbound" },
      "select_fields": ["lead_id", "sender", "body", "message_at", "is_inmail"],
      "sort_by": "message_at",
      "limit": 50
    }
  }
}
```
