slack
slack.
automatisation slack via bot token. envoi de messages, lecture d'historique, liste des channels, réactions, dm, recherche d'utilisateurs.
setup & usage
Two ways to get a Slack credential, same tools behind both:
conversations.history / conversations.replies) for distributed apps not listed in its Marketplace, and an app you create for your own workspace is exempt.Whichever the path, the two tokens:
xoxb-): read channels, post under the app's identity. This is the default token.xoxp-): post in your name, and search (search:read only exists as a user token). Optional.author="me" (in your name) or author="app" (under the app's name) — with no choice, the send is refused rather than going out under the wrong name. The response says who wrote and in which channel, and whether that channel is shared externally.⚠️ switching app restarts channel memberships. Memberships belong to the app, not to the key: moving a workspace from your own app to the published one (or back) means re-inviting the new app in private channels (/invite @<app>).
With the instance's published app, an org admin can make one hosted agent answer in Slack: send the app a direct message and that agent runs, as you — your confirmed Slack email must be the one of your account in the org — then answers in the thread. Guests and people from another workspace are refused. Mentioning the app in a channel does nothing. It only works with the published app ("Add to Slack"), not with your own app.
1. go to api.slack.com/apps → Create New App → choose From a manifest (not "AI agent" nor "Starter app": those are conversational-app templates, unrelated)
2. choose the workspace. The editor that opens is already filled with an example (display_information: name: Demo App): select all and replace it — pasting over it without clearing welds the two manifests together and Slack refuses ("Nested mappings are not allowed in compact mappings"). The manifest to put in its place, which already declares all the scopes the oto tools need:
```yaml
display_information:
name: Oto
description: Reads and writes in Slack for your Oto agent
features:
bot_user:
display_name: Oto
always_online: false
oauth_config:
scopes:
bot:
- channels:read
- channels:history
- channels:join
- groups:read
- groups:history
- im:read
- im:history
- im:write
- mpim:read
- mpim:history
- users:read
- users:read.email
- chat:write
- reactions:write
- files:read
- usergroups:read
- usergroups:write
user:
- search:read
- chat:write
- usergroups:read
- usergroups:write
settings:
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: false
```
3. Create, then Install to Workspace and authorize
4. in OAuth & Permissions, copy the Bot User OAuth Token (xoxb-) and, if you want to post in your name, the User OAuth Token (xoxp-)
5. paste them here — nothing else to configure
*(without a manifest: Blank app, then declare the same scopes by hand in OAuth & Permissions before installing. The manifest avoids exactly this step.)*
⚠️ a scope does not replace channel membership. without membership, Slack answers not_in_channel — which wrongly looks like a token problem. two cases, and only one can be automated:
slack_join_channel gets the app in on its own (this is what the manifest's channels:join scope above is for)/invite @Oto in the channel — oto cannot do it for them, and says so instead of letting you believe it's an outageSlack reference: create an app from a manifest · install with oauth v2
a Slack token is issued per installation: two workspaces = two independent sets of tokens. Redo the installation in the second workspace (same manifest), then set its tokens as a second workspace of the connector (section "several workspaces").
send and read slack messages from claude — in your name or under the app's, depending on the tokens set.
slack_post_messageslack_find_user_by_email then slack_open_dm then slack_post_messageslack_read_history (top-level messages; oldest/latest to read only a window)slack_read_thread — a thread's replies, which slack_read_history does not return (it only shows the count)slack_join_channel (public channels only)slack_add_reactionslack(op="usergroups") (all groups), slack(op="usergroup_members", usergroup=…) (one group's members)slack_act (op="create_usergroup", "add_usergroup_members", "update_usergroup"…; dry_run=true shows the member diff first)⚠️ user groups: they require a paid Slack plan. An app installed before these scopes were added must be reinstalled (OAuth & Permissions → add usergroups:read / usergroups:write → Reinstall), then its new tokens set here. Writing with the bot token only works when the workspace lets everyone manage user groups; otherwise write with author="me" and the user token of a member allowed to (an admin, by default). Slack replaces a group's member list as a whole and refuses an empty one — a group is emptied by disabling it.
this connector accepts multiple workspaces: each stored credential becomes a named account (one name per workspace), at your level, your team's or your org's.
_account="<name>" on the tool; list them: oto_identity(op='list', connector='slack') (scope='org' or scope='group' for the org's or team's)oto_identity(op='set', connector='slack', identity_id='<name>'); rename: op='rename' with new_name_account) and adding upoutils
utilisation
claude plugin marketplace add otomata-tech/oto-plugin — mcp + skill configurés.pipx install oto-cli puis oto slack …