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

# Slack

> Slack messaging business platform tools

## Overview

Slack tools allow you to interact with the Slack messaging platform. It provides functionalities for sending messages, retrieving user profiles, broadcasting messages, and more.

## Key Features

* `SLACK_POST_MESSAGE`
  * Send messages to users or channels
* `SLACK_POST_BLOCKS_MESSAGE`
  * Post rich messages to channels using the Block Kit format (sections, headers, images, dividers, actions, etc.)
* `SLACK_GET_CONVERSATION_REPLIES`
  * Retrieve replies to a specific thread in a channel

## Authentication

To use the Slack tools, you to create a Slack App and obtain a Bot User OAuth Access Token. You can create a Slack App and get the token from the [Slack API website](https://api.slack.com/apps). Follow the instructions in the developer documentation to set up your app and get the token.

<Note>
  For detailed setup instructions on configuring Slack credentials, see the [Slack Credentials page](/en/pages/credentials/slack).
</Note>

<Warning>
  Treat API keys as sensitive information and never commit them to public repositories.
</Warning>

### Example: Sending and Retrieving Messages

```yaml theme={null}
- id: get_conversation_replies
  tool: SLACK_GET_CONVERSATION_REPLIES
  config:
    - name: token
      value: "{{secrets.SLACK_BOT_TOKEN}}"
  input:
    - name: channel
      value: "#jinba-dev-tmp"
    - name: thread_ts
      value: "1738331888.564969"
- id: send_message
  tool: SLACK_POST_MESSAGE
  config:
    - name: token
      value: "{{secrets.SLACK_BOT_TOKEN}}"
  input:
    - name: text
      value: Hello, world!
    - name: channel
      value: "#900_tl_yuta"

```

### Example: Posting a Block Kit Message

`SLACK_POST_BLOCKS_MESSAGE` accepts a `blocks` array (up to 50 block objects, each with a `type` property), a fallback `text` shown in notifications and clients that do not support Block Kit, a `channel`, and an optional `thread_ts` to reply in a thread.

```yaml theme={null}
- id: post_blocks_message
  tool: SLACK_POST_BLOCKS_MESSAGE
  config:
    - name: token
      value: "{{secrets.SLACK_BOT_TOKEN}}"
  input:
    - name: channel
      value: "#general"
    - name: text
      value: "Weekly report is ready"
    - name: blocks
      value: |
        [
          {
            "type": "header",
            "text": { "type": "plain_text", "text": "Weekly Report" }
          },
          {
            "type": "section",
            "text": { "type": "mrkdwn", "text": "*Status:* All checks passed :white_check_mark:" }
          }
        ]
```
