Slack
Connect your Triggerfish agent to Slack so your agent can participate in workspace conversations. The adapter uses the Bolt framework with Socket Mode, which means no public URL or webhook endpoint is required.
Default Classification
Slack defaults to PUBLIC classification. This reflects the reality that Slack workspaces often include external guests, Slack Connect users, and shared channels. You can raise this to INTERNAL or higher if your workspace is strictly internal.
Setup
Step 1: Create a Slack App
- Go to api.slack.com/apps
- Click Create New App
- Choose From scratch
- Name your app (e.g., "Triggerfish") and select your workspace
- Click Create App
Step 2: Configure Bot Token Scopes
Navigate to OAuth & Permissions in the sidebar and add the following Bot Token Scopes:
| Scope | Purpose |
|---|---|
chat:write | Send messages |
channels:history | Read messages in public channels |
groups:history | Read messages in private channels |
im:history | Read direct messages |
mpim:history | Read group direct messages |
channels:read | List public channels |
groups:read | List private channels |
im:read | List direct message conversations |
users:read | Look up user information |
Step 3: Enable Socket Mode
- Navigate to Socket Mode in the sidebar
- Toggle Enable Socket Mode to on
- You will be prompted to create an App-Level Token -- name it (e.g., "triggerfish-socket") and add the
connections:writescope - Copy the generated App Token (starts with
xapp-)
Step 4: Enable Events
- Navigate to Event Subscriptions in the sidebar
- Toggle Enable Events to on
- Under Subscribe to bot events, add:
message.channelsmessage.groupsmessage.immessage.mpim
Step 5: Get Your Credentials
You need three values:
- Bot Token -- Go to OAuth & Permissions, click Install to Workspace, then copy the Bot User OAuth Token (starts with
xoxb-) - App Token -- The token you created in Step 3 (starts with
xapp-) - Signing Secret -- Go to Basic Information, scroll to App Credentials, and copy the Signing Secret
Step 6: Get Your Slack User ID
To configure owner identity:
- Open Slack
- Click your profile picture in the top-right
- Click Profile
- Click the three dots menu and select Copy member ID
Step 7: Configure Triggerfish
Add the Slack channel to your triggerfish.yaml:
channels:
slack:
botToken: "xoxb-your-bot-token"
appToken: "xapp-your-app-token"
signingSecret: "your-signing-secret"
ownerId: "U01234ABC"| Option | Type | Required | Description |
|---|---|---|---|
botToken | string | Yes | Bot User OAuth Token (xoxb-...) |
appToken | string | Yes | App-Level Token for Socket Mode (xapp-...) |
signingSecret | string | Yes | Signing Secret from App Credentials |
ownerId | string | Recommended | Your Slack member ID for owner verification |
classification | string | No | Classification level (default: PUBLIC) |
Store Secrets Securely
Never commit tokens or secrets to source control. Use environment variables or your OS keychain. See Secrets Management for details.
Step 8: Invite the Bot
Before the bot can read or send messages in a channel, you need to invite it:
- Open the Slack channel you want the bot in
- Type
/invite @Triggerfish(or whatever you named your app)
The bot can also receive direct messages without being invited to a channel.
Step 9: Start Triggerfish
triggerfish stop && triggerfish startSend a message in a channel where the bot is present, or DM it directly, to confirm the connection.
Owner Identity
Triggerfish uses the Slack OAuth flow for owner verification. When a message arrives, the adapter compares the sender's Slack user ID against the configured ownerId:
- Match -- Owner command
- No match -- External input with
PUBLICtaint
Workspace Membership
For recipient classification, Slack workspace membership determines whether a user is INTERNAL or EXTERNAL:
- Regular workspace members are
INTERNAL - Slack Connect external users are
EXTERNAL - Guest users are
EXTERNAL
Message Limits
Slack supports messages up to 40,000 characters. Messages exceeding this limit are truncated. For most agent responses, this limit is never reached.
Typing Indicators
Triggerfish sends typing indicators to Slack when the agent is processing a request. Slack does not expose incoming typing events to bots, so this is send-only.
Group Chat
The bot can participate in group channels. Configure group behavior in your triggerfish.yaml:
groups:
default_behavior: "mentioned-only"
overrides:
- channel: slack
channel_name: "#ai-assistant"
behavior: "always"| Behavior | Description |
|---|---|
mentioned-only | Only respond when the bot is @mentioned |
always | Respond to all messages in the channel |
Changing Classification
channels:
slack:
botToken: "xoxb-..."
appToken: "xapp-..."
signingSecret: "..."
classification: INTERNALValid levels: PUBLIC, INTERNAL, CONFIDENTIAL, RESTRICTED.