> Documentation index for agents: https://docs.rocketride.ai/llms.txt

# tool_slack

A RocketRide tool node that lets an agent post to and inspect a Slack workspace. Pick it when an agent needs recent channel context or must notify a team; use a webhook-only setup for a deliberately post-only integration.

## About Slack

Slack is a work communication platform organized around channels and message threads. Teams use it for discussions, notifications, and integrations that report work into shared spaces.

## What it does

The node has no data lanes and exposes four Slack operations to an agent. Bot-token mode can test the connection, post messages, list public channels, and read channel history; incoming-webhook mode exposes posting only. This is a narrower, task-oriented surface than a generic HTTP client, with channel-name handling and Slack-specific failures.

## As a tool

The server-name prefix is `slack`, producing these registered functions.

| Function | Description |
|---|---|
| `slack.check_connection` | Verify the connection and return workspace and bot identity details. |
| `slack.message_post` | Post required `text` to a channel or thread. In webhook mode the webhook's channel is used. |
| `slack.channels_list` | List public channels. |
| `slack.channel_history` | Return recent messages for a required channel. |

`message_post` requires `text`; `channel` is required in bot-token mode and can be an ID or a name. `thread_ts` replies in a thread. `channels_list` accepts `limit`; `channel_history` accepts required `channel`, plus `limit`, `oldest`, and `latest`. Errors are raised as Slack-specific failures: invalid credentials, missing OAuth scope, rate limiting, bad requests, and server failures. In webhook mode the three inspection functions reject the call because they require a bot token.

`channel_history` returns `ts`, `user` and `text` per message, `thread_ts` for threaded
messages, `subtype` whenever Slack classifies the entry, and `bot_id` whenever a bot
posted it. Treat `subtype` as a classifier rather than a noise flag: `file_share`,
`thread_broadcast` and `me_message` are ordinary user messages, while `channel_join`,
`channel_leave`, `channel_topic`, `tombstone`, `pinned_item` and `reminder_add` are
system entries. That system list is open-ended, so drop entries by naming the subtypes
you do not want rather than by presence. To skip your own posts, compare `bot_id`
against the one `check_connection` reports — not the `bot_message` subtype, since an app
posting under its own bot identity produces a `bot_id` and no subtype at all.

## Configuration

Configure exactly one credential mode. A configured value wins over the corresponding environment fallback; configuring both token and webhook URL, or neither, prevents startup.

### Bot User OAuth Token

Use this mode when the agent needs channel discovery or history. The bot token supports posting with `chat:write`, listing public channels with `channels:read`, and history with `channels:history`; invite the bot to every channel it must read. Choose it rather than a webhook whenever the agent needs more than post-only behavior.

### Incoming Webhook URL

Use a webhook for a fixed-channel, post-only agent. `message_post` ignores its `channel` and `thread_ts` arguments in this mode, because Slack delivers to the webhook's configured channel. Do not pair it with a bot token.

## Authentication

Set either a bot OAuth token or an incoming-webhook URL. Both are secrets. Slack authentication and authorization errors reach the agent as typed failures; a missing scope error identifies the required scope.

## Notes

### Channel lookup

Channel arguments may be IDs such as `C0123ABCDEF` or names such as `#general`. If a name cannot be resolved, call `slack.channels_list` and retry with the returned ID.

## Upstream docs

- [Slack API documentation](https://api.slack.com/docs)

<!-- ROCKETRIDE:GENERATED:PARAMS START -->
<!-- Generated by nodes:docs-generate. Do not edit by hand. -->

## Schema

| Field | Type | Description | Default |
|---|---|---|---|
| `slack.token` | `string` | **Bot User OAuth Token**<br/>Slack bot token (starts with xoxb-) from your app's OAuth & Permissions page. Needs chat:write to post, channels:read to list channels, and channels:history to read history. Leave empty when using a webhook URL. | `""` |
| `slack.webhookUrl` | `string` | **Incoming Webhook URL**<br/>Slack incoming-webhook URL for zero-scope setups. Enables ONLY message_post, and messages always go to the channel the webhook was created for. Configure either this or a bot token, not both. | `""` |

## Dependencies

- `slack_sdk` `>=3.27.0,<4.0.0`

## Source

[<svg viewBox="0 0 16 16" width="15" height="15" fill="currentColor" aria-hidden="true" style="vertical-align:-0.15em;margin-right:0.35em"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg> View source](https://github.com/rocketride-org/rocketride-server/tree/develop/nodes/src/nodes/tool_slack)
<!-- ROCKETRIDE:GENERATED:PARAMS END -->
