> ## 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 Task Operations: Inputs, Cost & CLI Example

> Updating task assignment, timing, or status. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## 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_update_task:{"id":"{{id}}"}' --json
```

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

## Input Schema

| Name                  | Type                | Required | Default | Description |
| --------------------- | ------------------- | -------- | ------- | ----------- |
| `payload.id`          | `string`            | Yes      |         |             |
| `payload.assigned_to` | `string`            | No       |         |             |
| `payload.due_date`    | `string`            | No       |         |             |
| `payload.title`       | `string`            | No       |         |             |
| `payload.message`     | `string`            | No       |         |             |
| `payload.priority`    | `"0" \| "1" \| "2"` | No       |         |             |
| `payload.done`        | `boolean`           | No       |         |             |

### Allowed values

| Field              | Allowed values |
| ------------------ | -------------- |
| `payload.priority` | `0`, `1`, `2`  |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Update task(s).",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1
      },
      "assigned_to": {
        "type": "string",
        "minLength": 1
      },
      "due_date": {
        "type": "string",
        "minLength": 1,
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?(?:Z|[+-]\\d{2}:\\d{2})$",
        "format": "date-time"
      },
      "title": {
        "type": "string"
      },
      "message": {
        "type": "string"
      },
      "priority": {
        "type": "string",
        "enum": [
          "0",
          "1",
          "2"
        ]
      },
      "done": {
        "type": "boolean"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name            | Type     | Required | Default | Description |
| --------------- | -------- | -------- | ------- | ----------- |
| `result.status` | `string` | Yes      |         |             |
| `result.result` | `object` | Yes      |         |             |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "status": {
        "type": "string"
      },
      "result": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "done": {
            "type": "boolean"
          }
        },
        "required": [
          "_id",
          "done"
        ],
        "additionalProperties": true
      }
    },
    "required": [
      "status",
      "result"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Advanced: Direct CLI

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

```bash theme={null}
deepline tools execute lemlist_update_task --payload '{
  "id": "string"
}' --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.                      |

## Provider API Context

<details>
  <summary>Show provider reference (optional)</summary>

  ````md theme={null}
  > Modifies aspects of an existing task including assignment, scheduling, and status.

  # Update Task

  export const SnippetObjectReference = ({objectName, objectPath = null}) => {
    const lowerCaseObjectName = objectName.toLowerCase();
    if (lowerCaseObjectName === 'lead' || lowerCaseObjectName === 'leads') {
      return &lt;Note>
          This endpoint uses the &lt;a href={`/api-reference/objects-definitions/${objectPath}`}>{objectName} object&lt;/a>. Make sure to also check the &lt;a href={`/api-reference/objects-definitions/${lowerCaseObjectName === 'lead' ? 'contact' : 'lead'}`}>{lowerCaseObjectName === 'lead' ? 'Contact' : 'Lead'} object&lt;/a> to understand the distinction between the two.
        &lt;/Note>;
    }
    return &lt;Note>
        This endpoint uses the &lt;a href={`/api-reference/objects-definitions/${objectPath}`}>{objectName} object&lt;/a>.
      &lt;/Note>;
  };

  &lt;SnippetObjectReference objectName="Task" objectPath="task" />

  ## Updatable Fields

  All fields are optional except `id`:

  * **Assignment**: Change the assigned team member with `assignedTo`
  * **Schedule**: Update the `dueDate`
  * **Details**: Modify `title` or `message` content
  * **Priority**: Set priority level (0=low, 1=medium, 2=high, ""=none)
  * **Status**: Mark as complete with `done: true`

  Examples:

  &lt;CodeGroup>
    ```json mark as done theme={"theme":"dracula"}
    {
        "id": "opp_abc123",
        "done": true
    }
    ```

    ```json reassign and reschedule: theme={"theme":"dracula"}
    {
        "id": "opp_abc123",
        "assignedTo": "usr_xyz789",
        "dueDate": "2025-03-15T10:00:00.000Z"
    }
    ```
  &lt;/CodeGroup>

  ## 75. Get Team Credits

  Source: https://developer.lemlist.com/api-reference/endpoints/team/get-team-credits.md
  ````
</details>

## 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`.
