Slack
Connect an agent to Slack so it answers in channels, direct messages, and @mentions. Slack is connected per agent in the Channels tab of the agent builder, using a Slack app you create.
Prerequisites
- A saved agent (the Channels tab is locked until the agent is saved).
- Admin access to a Slack workspace.
- A Slack app created at api.slack.com/apps (granular permissions; classic apps are not supported).
What you’ll need from Slack
| Field | Where to find it | Required |
|---|---|---|
| Slack App Name | The name you gave the app at api.slack.com | Yes |
| Bot User OAuth Token | OAuth & Permissions (starts with xoxb-) | Yes |
| Signing Secret | Basic Information → App Credentials | Yes |
| App ID | Basic Information → App Credentials | No |
How to connect
- Create the Slack appAt api.slack.com/apps, click Create New App.
- Add bot token scopesIn OAuth & Permissions, add chat:write, app_mentions:read, and im:history.
- Install to workspaceClick Install to Workspace and authorize, then copy the Bot User OAuth Token.
- Enter credentials in TeamMateIn the agent’s Channels tab, open Slack → Configure, and paste the app name, bot token, and signing secret.
- Configure the event subscription URLIn Slack → Event Subscriptions, enable events and paste TeamMate’s Event Subscription URL as the Request URL.
- Subscribe to bot eventsUnder Subscribe to bot events, add message.channels, message.im, and app_mention, then Save Changes.
- Invite the botIn each Slack channel, run /invite @YourAppName so the bot can receive messages.
The Event Subscription URL is https://tmmate.ai/api/webhook/slack/events/<agentId>. An optional Interactivity URL (/api/webhook/slack/interactive/<agentId>) is also provided for buttons and menus.
What the agent can do
- Reply to direct messages and
@mentions. - Respond in channels it has been invited to.
- Send AI-generated replies in real time.
Troubleshooting
- Slack rejects the Request URL. The signing secret must be entered before Slack can verify the URL challenge. Re-check the signing secret and that the agent is saved.
- The bot doesn’t respond in a channel. Invite it with
/invite @YourAppName— the bot only receives messages in channels it’s a member of. - DMs don’t work. Confirm the
im:historyscope and themessage.imbot event are both added.