> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracecat.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack

> Reference for the Tracecat Slack integration: registered actions, required secrets, expected inputs, and example workflow usage.

## Add reaction

Action ID: `tools.slack.add_reaction`

Add a reaction to a message in a Slack channel.

Reference: [https://docs.slack.dev/reference/methods/reactions.add/](https://docs.slack.dev/reference/methods/reactions.add/)

### Input fields

<ParamField path="channel" type="string" required>
  ID of the channel to add the reaction to.
</ParamField>

<ParamField path="name" type="string" required>
  Name of the reaction to add.
</ParamField>

<ParamField path="timestamp" type="string" required>
  Timestamp of the message to add the reaction to.
</ParamField>

## Append stream

Action ID: `tools.slack.append_stream`

Append text or chunks to an existing Slack streaming message.

Reference: [https://docs.slack.dev/reference/methods/chat.appendStream/](https://docs.slack.dev/reference/methods/chat.appendStream/)

### Input fields

<ParamField path="channel" type="string" required>
  ID of the channel containing the streaming message.
</ParamField>

<ParamField path="ts" type="string" required>
  Timestamp of the streaming message.
</ParamField>

<ParamField path="chunks" type="array[object] | null">
  Streaming chunks, such as markdown\_text, task\_update, plan\_update, or blocks chunks.

  Default: `null`.
</ParamField>

<ParamField path="markdown_text" type="string | null">
  Markdown-formatted text to append to the stream.

  Default: `null`.
</ParamField>

## Archive channel

Action ID: `tools.slack.archive_channel`

Archive a Slack channel.

Reference: [https://docs.slack.dev/reference/methods/conversations.archive/](https://docs.slack.dev/reference/methods/conversations.archive/)

### Input fields

<ParamField path="channel" type="string" required>
  ID of the channel to archive.
</ParamField>

## Assistant search context

Action ID: `tools.slack.assistant_search_context`

Search Slack messages, files, channels, and users for AI assistant context.

Reference: [https://docs.slack.dev/reference/methods/assistant.search.context/](https://docs.slack.dev/reference/methods/assistant.search.context/)

### Input fields

<ParamField path="action_token" type="string" required>
  Action token from a Slack assistant message event.
</ParamField>

<ParamField path="query" type="string" required>
  User prompt or search query.
</ParamField>

<ParamField path="after" type="integer | null">
  UNIX timestamp filter for results after this time.

  Default: `null`.
</ParamField>

<ParamField path="before" type="integer | null">
  UNIX timestamp filter for results before this time.

  Default: `null`.
</ParamField>

<ParamField path="channel_types" type="array[string]">
  Slack channel types to search.

  Default: `[
      "public_channel"
    ]`.
</ParamField>

<ParamField path="content_types" type="array[string]">
  Slack content types to include in search results.

  Default: `[
      "messages"
    ]`.
</ParamField>

<ParamField path="context_channel_id" type="string | null">
  Context channel ID to scope the search when applicable.

  Default: `null`.
</ParamField>

<ParamField path="cursor" type="string | null">
  Cursor returned by Slack for the next page of results.

  Default: `null`.
</ParamField>

<ParamField path="disable_semantic_search" type="boolean">
  Whether to disable semantic search and use keyword search only.

  Default: `false`.
</ParamField>

<ParamField path="highlight" type="boolean">
  Whether to highlight the search query in results.

  Default: `false`.
</ParamField>

<ParamField path="include_archived_channels" type="boolean">
  Whether to include archived channels in search results.

  Default: `false`.
</ParamField>

<ParamField path="include_bots" type="boolean">
  Whether to include bot-authored results.

  Default: `false`.
</ParamField>

<ParamField path="include_context_messages" type="boolean">
  Whether to include context messages around message results.

  Default: `false`.
</ParamField>

<ParamField path="include_deleted_users" type="boolean">
  Whether to include deleted users in user search results.

  Default: `false`.
</ParamField>

<ParamField path="include_message_blocks" type="boolean">
  Whether to include message blocks in the response.

  Default: `false`.
</ParamField>

<ParamField path="limit" type="integer">
  Number of results to return, up to a maximum of 20.

  Default: `20`.
</ParamField>

<ParamField path="modifiers" type="string | null">
  Slack search modifiers, such as has:pin before:yesterday.

  Default: `null`.
</ParamField>

<ParamField path="sort" type="string">
  Field to sort results by. Supported values are score and timestamp.

  Default: `"score"`.
</ParamField>

<ParamField path="sort_dir" type="string">
  Direction to sort results by. Supported values are asc and desc.

  Default: `"desc"`.
</ParamField>

<ParamField path="term_clauses" type="array[string]">
  Term clauses that every returned search result should match.

  Default: `[]`.
</ParamField>

## Assistant search info

Action ID: `tools.slack.assistant_search_info`

Return Slack assistant search capabilities for the workspace.

Reference: [https://docs.slack.dev/reference/methods/assistant.search.info/](https://docs.slack.dev/reference/methods/assistant.search.info/)

### Input fields

This action does not take input fields.

## Create channel

Action ID: `tools.slack.create_channel`

Create a new Slack channel.

Reference: [https://docs.slack.dev/reference/methods/conversations.create/](https://docs.slack.dev/reference/methods/conversations.create/)

### Input fields

<ParamField path="name" type="string" required>
  Name of the channel to create.
</ParamField>

<ParamField path="is_private" type="boolean">
  Whether the channel is private.

  Default: `false`.
</ParamField>

## Delete message

Action ID: `tools.slack.delete_message`

Delete a message from a Slack channel.

Reference: [https://docs.slack.dev/reference/methods/chat.delete/](https://docs.slack.dev/reference/methods/chat.delete/)

### Input fields

<ParamField path="channel" type="string" required>
  ID of the channel to delete the message from.
</ParamField>

<ParamField path="ts" type="string" required>
  Timestamp of the message to delete.
</ParamField>

## Get reactions

Action ID: `tools.slack.get_reactions`

Get reactions to a message.

Reference: [https://docs.slack.dev/reference/methods/reactions.get/](https://docs.slack.dev/reference/methods/reactions.get/)

### Input fields

<ParamField path="channel" type="string" required>
  The channel to get reactions from.
</ParamField>

<ParamField path="timestamp" type="string" required>
  The timestamp of the message to get reactions from.
</ParamField>

## Get user profile

Action ID: `tools.slack.get_profile`

Get a user's profile.

Reference: [https://docs.slack.dev/reference/methods/users.profile.get/](https://docs.slack.dev/reference/methods/users.profile.get/)

### Input fields

<ParamField path="user" type="string" required>
  ID of the user to get the profile of.
</ParamField>

## Invite members to channel

Action ID: `tools.slack.invite_members`

Invite members to a Slack channel.

Reference: [https://docs.slack.dev/reference/methods/conversations.invite/](https://docs.slack.dev/reference/methods/conversations.invite/)

### Input fields

<ParamField path="channel" type="string" required>
  ID of the channel to invite members to.
</ParamField>

<ParamField path="users" type="array[string]" required>
  List of user IDs to invite to the channel.
</ParamField>

## Kick member

Action ID: `tools.slack.kick_member`

Kick a member from a Slack channel.

Reference: [https://docs.slack.dev/reference/methods/conversations.kick/](https://docs.slack.dev/reference/methods/conversations.kick/)

### Input fields

<ParamField path="channel" type="string" required>
  ID of the channel to kick members from.
</ParamField>

<ParamField path="user" type="string" required>
  ID of the user to kick from the channel.
</ParamField>

## List channels

Action ID: `tools.slack.list_channels`

List all channels.

Reference: [https://docs.slack.dev/reference/methods/conversations.list/](https://docs.slack.dev/reference/methods/conversations.list/)

### Input fields

<ParamField path="exclude_archived" type="boolean">
  Whether to exclude archived channels from the list.

  Default: `false`.
</ParamField>

<ParamField path="limit" type="integer">
  Maximum number of channels to return.

  Default: `100`.
</ParamField>

<ParamField path="types" type="array[string]">
  Types of channels to return.

  Default: `[
      "public_channel",
      "private_channel"
    ]`.
</ParamField>

## List conversation replies

Action ID: `tools.slack.list_replies`

List replies to a conversation in a Slack channel.

Reference: [https://docs.slack.dev/reference/methods/conversations.replies/](https://docs.slack.dev/reference/methods/conversations.replies/)

### Input fields

<ParamField path="channel" type="string" required>
  ID of the channel to list replies from.
</ParamField>

<ParamField path="ts" type="string" required>
  Timestamp of the thread's parent message or message in the thread to list replies from. Also known as `thread_ts` in some Slack responses.
</ParamField>

## List members

Action ID: `tools.slack.list_members`

List members of a Slack channel.

Reference: [https://docs.slack.dev/reference/methods/conversations.members/](https://docs.slack.dev/reference/methods/conversations.members/)

### Input fields

<ParamField path="channel" type="string" required>
  ID of the channel to list members of.
</ParamField>

<ParamField path="limit" type="integer">
  Maximum number of members to return.

  Default: `100`.
</ParamField>

## List messages

Action ID: `tools.slack.list_messages`

List messages from a Slack channel.

Reference: [https://docs.slack.dev/reference/methods/conversations.history/](https://docs.slack.dev/reference/methods/conversations.history/)

### Input fields

<ParamField path="channel" type="string" required>
  ID of the channel to list messages from.
</ParamField>

<ParamField path="latest" type="string | null">
  Unix timestamp of the latest message to return.

  Default: `null`.
</ParamField>

<ParamField path="limit" type="integer">
  Maximum number of messages to return.

  Default: `100`.
</ParamField>

<ParamField path="oldest" type="string | null">
  Unix timestamp of the oldest message to return.

  Default: `null`.
</ParamField>

## List users

Action ID: `tools.slack.list_users`

List users in a Slack workspace.

Reference: [https://docs.slack.dev/reference/methods/users.list/](https://docs.slack.dev/reference/methods/users.list/)

### Input fields

<ParamField path="include_locale" type="boolean">
  Whether to include the locale in the response.

  Default: `false`.
</ParamField>

<ParamField path="limit" type="integer">
  The maximum number of users to return.

  Default: `100`.
</ParamField>

## Lookup many users by email

Action ID: `tools.slack.lookup_users_by_email`

Lookup users by emails. Returns a list of users found and a list of users not found.

Reference: [https://docs.slack.dev/reference/methods/users.lookupByEmail/](https://docs.slack.dev/reference/methods/users.lookupByEmail/)

### Secrets

Required secrets:

* `slack`: required values `SLACK_BOT_TOKEN`.

### Input fields

<ParamField path="emails" type="array[string]" required>
  List of user emails.
</ParamField>

## Lookup user by email

Action ID: `tools.slack.lookup_user_by_email`

Get a Slack user by email.

Reference: [https://docs.slack.dev/reference/methods/users.lookupByEmail/](https://docs.slack.dev/reference/methods/users.lookupByEmail/)

### Input fields

<ParamField path="email" type="string" required>
  Email of an existing user.
</ParamField>

## Open view

Action ID: `tools.slack.open_view`

Open a view. Used to create a pop up modal.

Reference: [https://docs.slack.dev/reference/methods/views.open/](https://docs.slack.dev/reference/methods/views.open/)

### Input fields

<ParamField path="trigger_id" type="string" required>
  Trigger ID from a Slack interaction payload. See: [https://docs.slack.dev/reference/interaction-payloads/block\_actions-payload/](https://docs.slack.dev/reference/interaction-payloads/block_actions-payload/)
</ParamField>

<ParamField path="view" type="object" required>
  View payload for the modal to open. See: [https://docs.slack.dev/reference/views/modal-views/](https://docs.slack.dev/reference/views/modal-views/)
</ParamField>

## Post ephemeral message

Action ID: `tools.slack.post_ephemeral`

Send an ephemeral Slack message to a user in a channel.

Reference: [https://docs.slack.dev/reference/methods/chat.postEphemeral/](https://docs.slack.dev/reference/methods/chat.postEphemeral/)

### Input fields

<ParamField path="channel" type="string" required>
  Channel, private group, or IM channel to send the ephemeral message to.
</ParamField>

<ParamField path="user" type="string" required>
  ID of the user who will receive the ephemeral message.
</ParamField>

<ParamField path="as_user" type="boolean | null">
  Legacy option to post the message as the authenticated user.

  Default: `null`.
</ParamField>

<ParamField path="attachments" type="array[object] | null">
  List of JSON-based attachments.

  Default: `null`.
</ParamField>

<ParamField path="blocks" type="array[object] | null">
  List of JSON-based blocks.

  Default: `null`.
</ParamField>

<ParamField path="icon_emoji" type="string | null">
  Emoji to use as the icon for this message.

  Default: `null`.
</ParamField>

<ParamField path="icon_url" type="string | null">
  URL to an image to use as the icon for this message.

  Default: `null`.
</ParamField>

<ParamField path="link_names" type="boolean">
  Whether Slack should find and link channel names and usernames.

  Default: `false`.
</ParamField>

<ParamField path="markdown_text" type="string | null">
  Markdown-formatted message text. Do not use with blocks or text.

  Default: `null`.
</ParamField>

<ParamField path="parse" type="string | null">
  How Slack should parse message text.

  Default: `null`.
</ParamField>

<ParamField path="text" type="string | null">
  Message text. Used as fallback text when blocks are provided.

  Default: `null`.
</ParamField>

<ParamField path="thread_ts" type="string | null">
  Parent message timestamp for posting the ephemeral message in a thread.

  Default: `null`.
</ParamField>

<ParamField path="username" type="string | null">
  Bot username to display.

  Default: `null`.
</ParamField>

## Post message

Action ID: `tools.slack.post_message`

Post a message to a Slack channel.

Reference: [https://docs.slack.dev/reference/methods/chat.postMessage/](https://docs.slack.dev/reference/methods/chat.postMessage/)

### Input fields

<ParamField path="channel" type="string" required>
  The channel to post the message to.
</ParamField>

<ParamField path="blocks" type="array[object] | null">
  List of JSON-based blocks.

  Default: `null`.
</ParamField>

<ParamField path="markdown_text" type="string | null">
  The text to post to Slack, in Markdown format.

  Default: `null`.
</ParamField>

<ParamField path="text" type="string | null">
  The message to post to Slack.

  Default: `null`.
</ParamField>

<ParamField path="thread_ts" type="string | null">
  The timestamp of the thread to reply to.

  Default: `null`.
</ParamField>

<ParamField path="unfurl_links" type="boolean">
  Whether to unfurl links in the message.

  Default: `true`.
</ParamField>

<ParamField path="unfurl_media" type="boolean">
  Whether to unfurl media in the message.

  Default: `false`.
</ParamField>

## Remove reaction

Action ID: `tools.slack.remove_reaction`

Remove a reaction from a message in a Slack channel.

Reference: [https://docs.slack.dev/reference/methods/reactions.remove/](https://docs.slack.dev/reference/methods/reactions.remove/)

### Input fields

<ParamField path="channel" type="string" required>
  ID of the channel to remove the reaction from.
</ParamField>

<ParamField path="name" type="string" required>
  Name of the reaction to remove.
</ParamField>

<ParamField path="timestamp" type="string" required>
  Timestamp of the message to remove the reaction from.
</ParamField>

## Revoke sessions

Action ID: `tools.slack.revoke_sessions`

Revoke all sessions on all devices for a Slack user.

Reference: [https://docs.slack.dev/reference/methods/admin.users.session.reset/](https://docs.slack.dev/reference/methods/admin.users.session.reset/)

### Input fields

<ParamField path="user_id" type="string" required>
  ID of an existing user.
</ParamField>

## Search messages

Action ID: `tools.slack.search_messages`

Search for messages matching a query in a Slack workspace.

Reference: [https://docs.slack.dev/reference/methods/search.messages/](https://docs.slack.dev/reference/methods/search.messages/)

### Secrets

Required secrets:

* `slack_oauth`: OAuth token `SLACK_USER_TOKEN`.

### Input fields

<ParamField path="query" type="string" required>
  Search query. To search within a channel / specific user, add `in:channel_name` / `from:&lt;@user_id>` to the query.
</ParamField>

<ParamField path="count" type="integer">
  Number of messages to return.

  Default: `20`.
</ParamField>

<ParamField path="cursor" type="string | null">
  For the first call send '\*', for subsequent calls send the value of `next_cursor` from the previous call.

  Default: `null`.
</ParamField>

<ParamField path="sort" type="string">
  Sort by score or timestamp.

  Default: `"score"`.

  Allowed values: `score`, `timestamp`.
</ParamField>

## Set assistant thread status

Action ID: `tools.slack.set_assistant_thread_status`

Set the status for a Slack AI assistant thread.

Reference: [https://docs.slack.dev/reference/methods/assistant.threads.setStatus/](https://docs.slack.dev/reference/methods/assistant.threads.setStatus/)

### Input fields

<ParamField path="channel_id" type="string" required>
  Channel ID containing the assistant thread.
</ParamField>

<ParamField path="status" type="string" required>
  Status to display for the bot user. Use an empty string to clear it.
</ParamField>

<ParamField path="thread_ts" type="string" required>
  Message timestamp of the assistant thread.
</ParamField>

<ParamField path="icon_emoji" type="string | null">
  Emoji to use as the icon for this message.

  Default: `null`.
</ParamField>

<ParamField path="icon_url" type="string | null">
  Image URL to use as the icon for this message.

  Default: `null`.
</ParamField>

<ParamField path="loading_messages" type="array[string]">
  Loading indicator messages to rotate through, up to 10 messages.

  Default: `[]`.
</ParamField>

<ParamField path="username" type="string | null">
  Bot username to display.

  Default: `null`.
</ParamField>

## Set assistant thread suggested prompts

Action ID: `tools.slack.set_assistant_thread_suggested_prompts`

Set suggested prompts for a Slack AI assistant thread.

Reference: [https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts/](https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts/)

### Input fields

<ParamField path="channel_id" type="string" required>
  Channel ID containing the assistant thread.
</ParamField>

<ParamField path="prompts" type="array[map[string, string]]" required>
  Suggested prompts, each with title and message attributes.
</ParamField>

<ParamField path="thread_ts" type="string" required>
  Message timestamp of the assistant thread.
</ParamField>

<ParamField path="title" type="string | null">
  Optional title for the suggested prompts list.

  Default: `null`.
</ParamField>

## Set assistant thread title

Action ID: `tools.slack.set_assistant_thread_title`

Set the title for a Slack AI assistant thread.

Reference: [https://docs.slack.dev/reference/methods/assistant.threads.setTitle/](https://docs.slack.dev/reference/methods/assistant.threads.setTitle/)

### Input fields

<ParamField path="channel_id" type="string" required>
  Channel ID containing the assistant thread.
</ParamField>

<ParamField path="thread_ts" type="string" required>
  Message timestamp of the assistant thread.
</ParamField>

<ParamField path="title" type="string" required>
  Title to use for the assistant thread.
</ParamField>

## Set channel description

Action ID: `tools.slack.set_channel_description`

Set the description of a Slack channel.

Reference: [https://docs.slack.dev/reference/methods/conversations.setPurpose/](https://docs.slack.dev/reference/methods/conversations.setPurpose/)

### Input fields

<ParamField path="channel" type="string" required>
  The ID of the channel to set the description for.
</ParamField>

<ParamField path="description" type="string" required>
  The description to set for the channel.
</ParamField>

## Set channel topic

Action ID: `tools.slack.set_channel_topic`

Set the topic of a Slack channel.

Reference: [https://docs.slack.dev/reference/methods/conversations.setTopic/](https://docs.slack.dev/reference/methods/conversations.setTopic/)

### Input fields

<ParamField path="channel" type="string" required>
  The ID of the channel to set the topic for.
</ParamField>

<ParamField path="topic" type="string" required>
  The topic to set for the channel.
</ParamField>

## Start stream

Action ID: `tools.slack.start_stream`

Start a new Slack streaming message in a thread.

Reference: [https://docs.slack.dev/reference/methods/chat.startStream/](https://docs.slack.dev/reference/methods/chat.startStream/)

### Input fields

<ParamField path="channel" type="string" required>
  ID of the channel, private group, or DM for the stream.
</ParamField>

<ParamField path="thread_ts" type="string" required>
  Parent message timestamp to reply to with the stream.
</ParamField>

<ParamField path="chunks" type="array[object] | null">
  Initial streaming chunks, such as markdown\_text, task\_update, plan\_update, or blocks chunks.

  Default: `null`.
</ParamField>

<ParamField path="icon_emoji" type="string | null">
  Emoji to use as the icon for this message.

  Default: `null`.
</ParamField>

<ParamField path="icon_url" type="string | null">
  URL to an image to use as the icon for this message.

  Default: `null`.
</ParamField>

<ParamField path="markdown_text" type="string | null">
  Initial markdown-formatted text for the stream.

  Default: `null`.
</ParamField>

<ParamField path="recipient_team_id" type="string | null">
  ID of the recipient user's team. Required by Slack when streaming to channels.

  Default: `null`.
</ParamField>

<ParamField path="recipient_user_id" type="string | null">
  ID of the user receiving the stream. Required by Slack when streaming to channels.

  Default: `null`.
</ParamField>

<ParamField path="task_display_mode" type="string | null">
  How task chunks are displayed. Accepts timeline, plan, or dense.

  Default: `null`.
</ParamField>

<ParamField path="username" type="string | null">
  Bot username to display.

  Default: `null`.
</ParamField>

## Stop stream

Action ID: `tools.slack.stop_stream`

Stop and finalize a Slack streaming message.

Reference: [https://docs.slack.dev/reference/methods/chat.stopStream/](https://docs.slack.dev/reference/methods/chat.stopStream/)

### Input fields

<ParamField path="channel" type="string" required>
  ID of the channel containing the streaming message.
</ParamField>

<ParamField path="ts" type="string" required>
  Timestamp of the streaming message.
</ParamField>

<ParamField path="blocks" type="array[object] | null">
  Blocks rendered at the bottom of the finalized message.

  Default: `null`.
</ParamField>

<ParamField path="chunks" type="array[object] | null">
  Final streaming chunks, such as markdown\_text, task\_update, plan\_update, or blocks chunks.

  Default: `null`.
</ParamField>

<ParamField path="markdown_text" type="string | null">
  Final markdown-formatted text to append before stopping the stream.

  Default: `null`.
</ParamField>

<ParamField path="metadata" type="object | null">
  Slack message metadata with event\_type and event\_payload fields.

  Default: `null`.
</ParamField>

## Update message

Action ID: `tools.slack.update_message`

Update a message in a Slack channel.

Reference: [https://docs.slack.dev/reference/methods/chat.update/](https://docs.slack.dev/reference/methods/chat.update/)

### Input fields

<ParamField path="channel" type="string" required>
  ID of the channel to update the message in.
</ParamField>

<ParamField path="ts" type="string" required>
  Timestamp of the message to update.
</ParamField>

<ParamField path="blocks" type="array[object] | null">
  List of JSON-based blocks.

  Default: `null`.
</ParamField>

<ParamField path="markdown_text" type="string | null">
  The text to update the message with, in Markdown format.

  Default: `null`.
</ParamField>

<ParamField path="text" type="string | null">
  New text for the message.

  Default: `null`.
</ParamField>

## Update view

Action ID: `tools.slack.update_view`

Update a view. Used to update a pop up modal.

Reference: [https://docs.slack.dev/reference/methods/views.update/](https://docs.slack.dev/reference/methods/views.update/)

### Input fields

<ParamField path="view" type="object" required>
  Updated view payload for the modal. See: [https://docs.slack.dev/reference/views/modal-views/](https://docs.slack.dev/reference/views/modal-views/)
</ParamField>

<ParamField path="view_id" type="string" required>
  ID of the view to update.
</ParamField>
