slack.messages.send_message ​
Send a message to a Slack channel
Send a message to a Slack channel using the chat.postMessage API.
Inputs:
channel: Channel ID or name, e.g. C01234567 or #general (required).
text: Message text (required). Supports Slack mrkdwn formatting.
username: Override bot display name (optional).
icon_emoji: Override bot emoji icon, e.g. :robot_face: (optional).
thread_ts: Thread timestamp to reply in a thread (optional).
blocks: Slack Block Kit blocks as JSON list (optional — overrides text for display).
connection_uuid: Slack CloudConnection UUID (optional). The customer's OAuth bot token is read from this connection. Defaults to the organization's active Slack connection when omitted.
Outputs (terminal state_data):
- message_ts: str — message timestamp (use as thread_ts to reply)
- channel: str — channel ID where the message was posted
Token resolution: the bot token comes from the customer's Slack CloudConnection (per-organization OAuth token) via context.get_plugin("slack"), NOT a static app token. A static plugin token, if configured, is only a single-tenant/test fallback.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-slack |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
channel | string | Yes | — | Channel ID or name, e.g. C01234567 or #general |
text | string | Yes | — | Message text (mrkdwn supported) |
username | string | No | — | Override bot display name |
icon_emoji | string | No | — | Override bot emoji icon, e.g. :robot_face: |
thread_ts | string | No | — | Thread timestamp to reply in a thread |
blocks | json | No | — | Slack Block Kit blocks list |
connection_uuid | uuid | No | — | Slack CloudConnection UUID (per-organization OAuth token); defaults to the organization's active Slack connection |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
channel | string | No | — | — |
message_ts | string | No | — | — |
blocks | json | No | — | — |
connection_uuid | uuid | No | — | — |
icon_emoji | string | No | — | — |
text | string | No | — | — |
thread_ts | string | No | — | — |
username | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "slack.messages.send_message",
"initial_data": {
"channel": "value",
"text": "value"
}
}