Skip to main content

Slack

Type ID: slack  ·  Kind: Action  ·  Trace: TOOL

Send messages to Slack channels, groups, and direct messages via the Slack Web API.

Credentials

Slack

Resources & operations

  • Message (message)
    • Send (send) — Send a message to a channel, group, or user.

Properties

Common

PropertyKeyTypeRequiredDefaultPossible valuesShown when
ResourceresourceoptionsYesmessageMessage (message)
OperationoperationoptionsYessendSend (send)resource = message

Message → Send

PropertyKeyTypeRequiredDefaultPossible valuesShown when
Channel/UserchannelstringYes''Channel name (e.g. #general), channel ID (e.g. C1234567890), or user ID (e.g. U1234567890)resource = message, operation = send
Message TexttextstringYes''Free text; supports markdown, @mentions, :emojis:, links (<url|text>)resource = message, operation = send
Advanced Message OptionsadditionalFieldsobjectNo{}Collection (see below)resource = message, operation = send

additionalFields collection options:

PropertyKeyTypeRequiredDefaultPossible values
Thread Timestampthread_tsstringNo''Parent message ts value to reply in-thread
Use MarkdownmrkdwnbooleanNotruetrue / false
Link Nameslink_namesbooleanNotruetrue / false
Unfurl Linksunfurl_linksbooleanNotruetrue / false
Unfurl Mediaunfurl_mediabooleanNotruetrue / false

Notes

  • Requires a Slack credential; the credential ID is read from credentials.id and resolved to a bearer token. A missing credential ID or token raises an error before any request.
  • Calls POST https://slack.com/api/chat.postMessage with Authorization: Bearer <token>.
  • channel and text are validated as non-empty at runtime; either being missing throws Channel and message text are required.
  • Optional fields (thread_ts, mrkdwn, link_names, unfurl_links, unfurl_media) are only added to the request body when present.
  • Slack returns HTTP 200 even on failure; the handler inspects the ok field and throws Slack API error: <error> when ok is false.
  • Output JSON: { success: true, channel, timestamp, message: { text, ts, user, bot_id, bot_name, thread_ts } }.