Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeAtomic
LibraryApp-slack
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
channelstringYes—Channel ID or name, e.g. C01234567 or #general
textstringYes—Message text (mrkdwn supported)
usernamestringNo—Override bot display name
icon_emojistringNo—Override bot emoji icon, e.g. :robot_face:
thread_tsstringNo—Thread timestamp to reply in a thread
blocksjsonNo—Slack Block Kit blocks list
connection_uuiduuidNo—Slack CloudConnection UUID (per-organization OAuth token); defaults to the organization's active Slack connection

Output Schema ​

FieldTypeRequiredDefaultDescription
channelstringNo——
message_tsstringNo——
blocksjsonNo——
connection_uuiduuidNo——
icon_emojistringNo——
textstringNo——
thread_tsstringNo——
usernamestringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "slack.messages.send_message",
  "initial_data": {
    "channel": "value",
    "text": "value"
  }
}