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

# Lemlist Activity Operations: Inputs, Cost & CLI Example

> Pulling Lemlist activities by type with full reply content, prospect info, and AI interest scores. Includes inputs, outputs, costs, and Deepline CLI examples.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=lemlist_get_activities:{}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                  | Type                                                                                                                                                                                                                                                                                                                                                                                            | Required | Default | Description                                 |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- | ------------------------------------------- |
| `payload.type`        | `"emailsSent" \| "emailsOpened" \| "emailsClicked" \| "emailsReplied" \| "emailsBounced" \| "emailsUnsubscribed" \| "emailsFailed" \| "emailsInterested" \| "emailsNotInterested" \| "linkedinSent" \| "linkedinOpened" \| "linkedinReplied" \| "linkedinInterested" \| "linkedinNotInterested" \| "apiDone" \| "aircallCreated" \| "aircallCompleted" \| "aircallNotAnswered" \| "manualDone"` | No       |         | Activity type to filter by                  |
| `payload.limit`       | `integer`                                                                                                                                                                                                                                                                                                                                                                                       | No       | `100`   | Number of activities to return per page     |
| `payload.offset`      | `integer`                                                                                                                                                                                                                                                                                                                                                                                       | No       | `0`     | Pagination offset                           |
| `payload.campaign_id` | `string`                                                                                                                                                                                                                                                                                                                                                                                        | No       |         | Filter activities to a specific campaign ID |

### Allowed values

| Field          | Allowed values                                                                                                                                                                                                                                                                                                                                            |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.type` | `emailsSent`, `emailsOpened`, `emailsClicked`, `emailsReplied`, `emailsBounced`, `emailsUnsubscribed`, `emailsFailed`, `emailsInterested`, `emailsNotInterested`, `linkedinSent`, `linkedinOpened`, `linkedinReplied`, `linkedinInterested`, `linkedinNotInterested`, `apiDone`, `aircallCreated`, `aircallCompleted`, `aircallNotAnswered`, `manualDone` |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Get Lemlist activities by type with full content. Returns reply text, prospect info, campaign data, and AI interest scores.",
    "properties": {
      "type": {
        "type": "string",
        "description": "Activity type to filter by",
        "enum": [
          "emailsSent",
          "emailsOpened",
          "emailsClicked",
          "emailsReplied",
          "emailsBounced",
          "emailsUnsubscribed",
          "emailsFailed",
          "emailsInterested",
          "emailsNotInterested",
          "linkedinSent",
          "linkedinOpened",
          "linkedinReplied",
          "linkedinInterested",
          "linkedinNotInterested",
          "apiDone",
          "aircallCreated",
          "aircallCompleted",
          "aircallNotAnswered",
          "manualDone"
        ]
      },
      "limit": {
        "type": "integer",
        "description": "Number of activities to return per page",
        "default": 100,
        "minimum": 1,
        "maximum": 100
      },
      "offset": {
        "type": "integer",
        "description": "Pagination offset",
        "default": 0,
        "minimum": 0
      },
      "campaign_id": {
        "type": "string",
        "description": "Filter activities to a specific campaign ID",
        "minLength": 1
      }
    },
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

Output schema is not available yet.

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "array",
    "description": "Array of activity objects",
    "items": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique activity ID"
        },
        "_id": {
          "type": "string",
          "description": "Legacy Lemlist activity ID field"
        },
        "type": {
          "type": "string",
          "description": "Activity type (e.g. linkedinReplied, emailsReplied)"
        },
        "text": {
          "type": "string",
          "description": "Full reply content for LinkedIn messages"
        },
        "messagePreview": {
          "type": "string",
          "description": "Truncated reply preview for email messages"
        },
        "subject": {
          "type": "string",
          "description": "Email subject line"
        },
        "leadId": {
          "type": "string",
          "description": "Lemlist lead ID"
        },
        "leadFirstName": {
          "type": "string",
          "description": "Lead first name"
        },
        "leadLastName": {
          "type": "string",
          "description": "Lead last name"
        },
        "leadEmail": {
          "type": "string",
          "description": "Lead email address"
        },
        "firstName": {
          "type": "string",
          "description": "Lead first name (alternate field)"
        },
        "lastName": {
          "type": "string",
          "description": "Lead last name (alternate field)"
        },
        "email": {
          "type": "string",
          "description": "Lead email (alternate field)"
        },
        "fromEmail": {
          "type": "string",
          "description": "Email address the reply came from"
        },
        "jobTitle": {
          "type": "string",
          "description": "Lead job title"
        },
        "companyDomain": {
          "type": "string",
          "description": "Lead company domain"
        },
        "latest_org": {
          "type": "string",
          "description": "Lead company name"
        },
        "linkedinUrl": {
          "type": "string",
          "description": "Lead LinkedIn profile URL"
        },
        "campaignId": {
          "type": "string",
          "description": "Campaign ID this activity belongs to"
        },
        "campaignName": {
          "type": "string",
          "description": "Campaign name"
        },
        "sendUserName": {
          "type": "string",
          "description": "Name of the rep who sent the original message"
        },
        "sendUserEmail": {
          "type": "string",
          "description": "Email of the sending rep"
        },
        "sendUserId": {
          "type": "string",
          "description": "Lemlist user ID of the sending rep"
        },
        "sequenceStep": {
          "type": "number",
          "description": "Which step in the sequence triggered this activity"
        },
        "totalSequenceStep": {
          "type": "number",
          "description": "Total steps in the sequence"
        },
        "sequenceId": {
          "type": "string",
          "description": "Sequence ID"
        },
        "emailTemplateId": {
          "type": "string",
          "description": "Email template ID used"
        },
        "emailTemplateName": {
          "type": "string",
          "description": "Email template name used"
        },
        "isFirst": {
          "type": "boolean",
          "description": "Whether this is the first reply from this lead"
        },
        "stopped": {
          "type": "boolean",
          "description": "Whether the sequence was stopped after this activity"
        },
        "bot": {
          "type": "boolean",
          "description": "Whether this was detected as a bot reply"
        },
        "aiLeadInterestScore": {
          "type": "number",
          "description": "Lemlist AI-scored interest level (0-1). Higher = more interested."
        },
        "createdAt": {
          "type": "string",
          "description": "ISO 8601 timestamp of when the activity occurred"
        },
        "relatedSentAt": {
          "type": "string",
          "description": "ISO 8601 timestamp of when the original message was sent"
        },
        "contactId": {
          "type": "string",
          "description": "Lemlist contact ID"
        },
        "teamId": {
          "type": "string",
          "description": "Lemlist team ID"
        }
      },
      "required": [
        "id",
        "type",
        "createdAt"
      ],
      "additionalProperties": false
    }
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute lemlist_get_activities --payload '{}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.
* Billing mode: `no_bill`.
