Slack

Team communication and collaboration platform

40 tools available ยท API Key authentication

SDK Usage #

// Import typed helpers for full type safety
import { Hotglue } from "@hotglue/sdk";
import { toolName } from "@hotglue/sdk/slack";
const client = new Hotglue({ apiKey: "hg_live_xxx" });
const result = await client.execute({
...toolName({ /* typed input */ }),
userId: "user_123",
});
// result is fully typed!
import { Hotglue } from "@hotglue/sdk";
const client = new Hotglue({ apiKey: "hg_live_xxx" });
const result = await client.execute({
integration: "slack",
tool: "tool_name",
userId: "user_123",
input: { /* ... */ },
});
import { createHotglueTools } from "@hotglue/sdk";
import { Agent } from "@mastra/core/agent";
const hotglueTools = createHotglueTools({ apiKey: "hg_live_xxx" });
const agent = new Agent({
name: "Slack Agent",
model: "anthropic/claude-sonnet-4-0",
tools: () => hotglueTools({
integrations: ["slack"],
userId: "user_123",
}),
});

Authentication Setup #

Create a Slack App and install it to your workspace to get a Bot Token.

1. Create a Slack App

  1. Go to api.slack.com/apps
  2. Click Create New App
  3. Choose From scratch
  4. Enter an app name and select your workspace
  5. Click Create App

2. Configure Bot Scopes

Navigate to OAuth & Permissions and add these Bot Token Scopes:

chat:write
Send messages as the bot
channels:read
View public channel info
channels:history
Read message history
users:read
View user information

// Add more scopes based on the actions you need to use.

3. Install App to Workspace

  1. Scroll up to OAuth Tokens for Your Workspace
  2. Click Install to Workspace
  3. Review the permissions and click Allow

4. Copy Bot Token

After installation, copy the Bot User OAuth Token:

xoxb-xxxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx

// This token starts with xoxb- and is your API key.

Available Scopes

Add scopes based on the actions you need:

chat:write send messages
chat:write.public post to any channel
channels:read list channels
channels:history read messages
channels:join join channels
channels:manage create/manage channels
users:read view users
users:read.email view user emails
reactions:write add reactions
files:read view files
pins:write pin messages
bookmarks:write manage bookmarks
usergroups:read view user groups
emoji:read view custom emoji

Invite Bot to Channels

For the bot to interact with private channels, invite it using /invite @YourBotName in the channel. Public channels work with chat:write.public scope without an invite.