Aller au contenu

Prêt à créer avec AnyBot ?

Documentation AnyBot
Integrations

Slack (read-only tools)

A read-only Slack tool family: list channels, read history and threads, look up users, and search messages. Owner-only, never posts.

Cette page n’est pas encore traduite, la version anglaise est affichée.

The same Slack connection that lets your agent answer DMs and @mentions also doubles as a read-only tool family: your agent can list channels, read channel and thread history, look up workspace users, and search messages, all while working a task. These tools only read; they never post. Posting stays the job of the Slack channel.

Connect

There's nothing new to link here. The tools ride the same connection as the Slack channel. If Slack is already connected as a channel, the read tools are available; if not, connect it once and both surfaces light up.

  1. Follow Connect Slack as a channel: paste your Slack app's Bot Token and Signing Secret.
  2. Enable the Slack read tools for the agent that should use them.
  3. The agent can now read Slack while working a task. It still can't post through these tools.

The real gotcha: these tools are owner-only. They run only on internal/owner surfaces (your own dashboard agent), never for a public website visitor. And search needs more than a bot token: slack_search_messages requires a user-scoped token with search:read. A workspace connected with only a bot token gets the other six tools, but search returns a clear "requires a user token" error.

Tools

ToolAccessTypeWhat it does
slack_list_channelsOwner-onlyReadLists public and private channels the bot can see: id, name, topic/purpose, member count, and archive status. Cursor-paginated.
slack_channel_historyOwner-onlyReadReads recent messages from a channel: sender, text, timestamp, thread info, and reactions. Use list_channels to find the channel id.
slack_thread_repliesOwner-onlyReadFetches the replies in a thread, given the parent message's timestamp from channel history.
slack_channel_membersOwner-onlyReadLists a channel's participants, optionally resolving user ids to names and emails.
slack_list_usersOwner-onlyReadLists workspace users: id, name, real name, email when available, and bot/deactivated flags. Cursor-paginated.
slack_user_infoOwner-onlyReadLooks up one user by id: name, email, timezone, title, and status.
slack_search_messagesOwner-onlyReadSearches messages across the workspace with modifiers like in-channel and from-user. Needs a user token with search:read.

That's the whole surface: every tool above is read-only, and nothing here writes.

Public-safe vs owner-only

Unlike Web Search, none of the Slack tools are public-safe. Every one is owner-only. The agent can reach them only on an internal/owner surface, and a visitor on a public bot never triggers them. That's deliberate: workspace channels, message history, and member emails are sensitive, so the tool calls are also hidden from the conversation stream. If you want the agent to act in Slack for the public (replying in DMs and to @mentions), that's the Slack channel, a separate capability.

Worked example

You ask your own dashboard assistant: "What did the #launch channel decide about the pricing page last week?" The agent runs slack_list_channels to find #launch's id, slack_channel_history to pull recent messages, follows a decision into its thread with slack_thread_replies, and summarizes back to you, reading only, never posting a word into Slack.

Read-only, by design

There are no write tools in this family. The agent can list, read, and search, but it cannot post, edit, react, invite, or archive. Anything the agent should say in Slack goes through the channel instead.

Troubleshooting

  • The tools don't appear. They're owner-only. Confirm you're on an internal/owner surface (not a public channel) and that Slack is connected as a channel first.
  • Search returns "requires a user token." slack_search_messages needs a user-scoped token with search:read; a bot-token-only workspace can use the other six tools but not search.
  • Private channels are missing. The bot only sees channels it's a member of. Invite it to the private channel, then re-list.
  • Members show as IDs, not names. Keep name resolution on for slack_channel_members, or resolve a single id with slack_user_info. Slack doesn't always include names inline.

FAQ

Can the agent post through these tools? No. They're strictly read-only. Posting is the Slack channel's job.

Do I connect Slack twice? No. One Slack connection powers both the channel and these read tools.

Why can't my public bot use them? They expose workspace data, so they're owner-only by design and never run for a visitor.

Next