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

# Slack: Message With Hitl

> Post a Slack approval card with buttons, wait for a teammate to respond, and return their decision. Includes SDK V2 examples, schemas, and cost.

Post a Slack approval card with buttons, wait for a teammate to respond, and return their decision.

> [!NOTE]
>
> Tool ID: `slack_message_with_hitl`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'slack_message_with_hitl',
  {
    "channel": "example",
    "text": "example",
    "buttons": [
      {
        "id": "id_123",
        "label": "example"
      }
    ]
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute slack_message_with_hitl --input '{
  "channel": "example",
  "text": "example",
  "buttons": [
    {
      "id": "id_123",
      "label": "example"
    }
  ]
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "resumed": true,
    "timed_out": true,
    "signal": "example",
    "selected_option": "example",
    "final_text": "example",
    "edited": true,
    "actor": {
      "slack_user_id": "slack_user_123",
      "slack_channel_id": "slack_channel_123"
    },
    "message_ref": {
      "channel": "example",
      "ts": "example"
    },
    "event_payload": {}
  }
}
```

Use `deepline describe slack_message_with_hitl --json` for the latest machine-readable contract.

## Input reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.channel` | `string` | Yes | — | Slack channel ID. Minimum length: 1. |
| `payload.text` | `string` | Yes | — | Message text. When blocks are provided, used as notification/accessibility fallback and editable draft in modal. Minimum length: 1. |
| `payload.blocks` | `array` | No | — | Maximum items: 50. |
| `payload.buttons` | `array` | Yes | — | Buttons to display in the Slack message (1–5). Minimum items: 1. Maximum items: 5. |
| `payload.allow_edit` | `boolean` | No | — | Whether to show an Edit button for draft text editing. Defaults to false. |
| `payload.signal` | `string` | No | — | Optional signal key override. Defaults to a workflow+block scoped signal. Required and unique for each interaction when updating an existing HITL card via message\_ref. Minimum length: 1. |
| `payload.message_ref` | `object` | No | — | Reference to a prior HITL card. Supplying it updates that card and re-arms fresh buttons instead of posting another message. |
| `payload.timeout` | `string` | No | — | Optional Slack-card deadline. Explicit string durations (e.g., "30m", "24h") retain their existing meaning without new limits. null opts into a 30-day wait in Plays only. Omitted retains the artifact default (24h legacy / 7d current). Minimum length: 1. |
| `payload.on_timeout` | `"return_null" \| "error"` | No | — | Legacy setting retained with its artifact-specific behavior when on\_timeout\_mode is omitted. Does not enable continuation for default parked artifacts. Allowed: `return_null`, `error`. |
| `payload.on_timeout_mode` | `"park" \| "continue"` | No | — | Play-only option. Explicit "park" keeps the Play paused after card expiration. "continue" expires the card and resolves with timed\_out=true and message\_ref. Check timed\_out before approval actions. Omitted preserves the artifact timeout policy (park by default). explicit modes override legacy settings. Legacy workflow blocks reject this option. Allowed: `park`, `continue`. |
| `payload.timeout_error` | `string` | No | — | Minimum length: 1. |
| `payload.timeout_emit` | `record` | No | — | Legacy field retained for compatibility. Ignored by Play event waits. timeout results have event\_payload=null. |
| `payload.post_interaction` | `object` | No | — | Controls the post-click message for legacy workflow waits. Play event waits instead show an in-place processing state while the Play resumes, then the Play can update and re-arm the card with message\_ref. |
| `payload.mrkdwn` | `boolean` | No | — | — |

> [!NOTE]
>
> This input schema is too large for an inline display. Read the complete live contract with `deepline describe slack_message_with_hitl --json`.

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Normalized HITL decision output for downstream workflow steps. |
| `result.data.resumed` | `boolean` | Yes | — | — |
| `result.data.timed_out` | `boolean` | Yes | — | — |
| `result.data.cancelled` | `boolean` | No | — | — |
| `result.data.signal` | `string` | Yes | — | Minimum length: 1. |
| `result.data.selected_option` | `string \| null` | Yes | — | — |
| `result.data.final_text` | `string \| null` | Yes | — | — |
| `result.data.edited` | `boolean` | Yes | — | — |
| `result.data.actor` | `object` | Yes | — | — |
| `result.data.actor.slack_user_id` | `string \| null` | Yes | — | — |
| `result.data.actor.slack_channel_id` | `string \| null` | Yes | — | — |
| `result.data.message_ref` | `object` | Yes | — | — |
| `result.data.message_ref.channel` | `string` | Yes | — | Minimum length: 1. |
| `result.data.message_ref.ts` | `string` | Yes | — | Minimum length: 1. |
| `result.data.event_payload` | `object \| null` | Yes | — | — |
| `result.meta` | `record` | No | — | — |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "description": "Normalized HITL decision output for downstream workflow steps.",
        "properties": {
          "resumed": {
            "type": "boolean"
          },
          "timed_out": {
            "type": "boolean"
          },
          "cancelled": {
            "type": "boolean"
          },
          "signal": {
            "type": "string",
            "minLength": 1
          },
          "selected_option": {
            "type": [
              "string",
              "null"
            ]
          },
          "final_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "edited": {
            "type": "boolean"
          },
          "actor": {
            "type": "object",
            "properties": {
              "slack_user_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "slack_channel_id": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "slack_user_id",
              "slack_channel_id"
            ],
            "additionalProperties": false
          },
          "message_ref": {
            "type": "object",
            "properties": {
              "channel": {
                "type": "string",
                "minLength": 1
              },
              "ts": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "channel",
              "ts"
            ],
            "additionalProperties": false
          },
          "event_payload": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {}
          }
        },
        "required": [
          "resumed",
          "timed_out",
          "signal",
          "selected_option",
          "final_text",
          "edited",
          "actor",
          "message_ref",
          "event_payload"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

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

## Related documentation

* [Slack provider guide](https://deepline.com/docs/providers/slack/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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