Connect your Idun agent to Slack so users can interact with it through direct messages or channel messages.
Prerequisites
- A running Idun agent (engine)
- A Slack workspace where you have permission to install apps
- Your engine must be publicly reachable (use ngrok for local development)
Setup
Open the integrations catalog
Navigate to Integrations. The channel catalog shows WhatsApp, Discord, and Slack as active channels.
Create the Slack integration
Click + on Slack and fill in the bot token and signing secret.| Field | Value |
|---|
bot_token | Bot User OAuth Token from your Slack app (xoxb-...) |
signing_secret | Signing secret from your Slack app |
Assign to an agent
After saving, open the agent you want to connect and select the Slack integration from the Integrations field.
Create a Slack app
- Go to the Slack API Portal
- Click Create an App > From scratch
- Give it a name and select your workspace
Get your credentials
- Go to Basic Information > App Credentials > copy the Signing Secret
- Go to OAuth & Permissions > under Bot Token Scopes, add:
chat:write (send messages)
channels:read (view basic channel info)
- Click Install to Workspace > Allow
- Copy the Bot User OAuth Token (
xoxb-...)
Configure the integration
Add the Slack integration to your engine config:integrations:
- provider: "SLACK"
enabled: true
config:
bot_token: "xoxb-..."
signing_secret: "abc123..."
| Field | Description |
|---|
bot_token | Bot User OAuth Token from step 2 (xoxb-...) |
signing_secret | Signing secret from step 2 (used for HMAC-SHA256 request verification) |
Enable event subscriptions
- Make sure your engine is running and publicly reachable
- In the Slack API Portal, go to Event Subscriptions > toggle ON
- Set Request URL to:
https://<your-domain>/integrations/slack/webhook
Slack sends a url_verification challenge. The engine handles this automatically. You should see a green Verified checkmark.
- Under Subscribe to bot events, add:
message.im (messages in direct conversations with the bot)
message.channels (messages in channels the bot is a member of)
- Click Save Changes
If you see a yellow banner saying “You’ve changed the permission scopes. Please reinstall your app”, click the reinstall link. Events are not delivered until you reinstall.
Enable the messages tab
- Go to App Home in the sidebar
- Under Show Tabs, enable the Messages Tab
- Check “Allow users to send Slash commands and messages from the messages tab”
Invite the bot to a channel
If you want the bot to respond in channels (not only DMs):
- Go to the channel in Slack and type
/invite @YourBotName
- Or click the channel name > Integrations tab > Add an App
Test it
- Open Slack
- Send a direct message to your bot, or post in a channel it has been invited to
- Your agent processes the message and replies in the same conversation
How it works
- User sends a message to the bot (DM or channel)
- Slack POSTs the event to your engine’s webhook
- Engine verifies the HMAC-SHA256 signature using the signing secret
- Engine invokes the agent with the message text
- Engine sends the agent’s reply back via the Slack Web API (
chat.postMessage)
Session tracking: The Slack user ID is used as the session ID, so conversation context is maintained per user.
Bot messages ignored: The handler skips messages with a bot_id to avoid infinite loops. Last modified on March 22, 2026