The Slack channel enables IronClaw to respond to app mentions and direct messages in your Slack workspace.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nearai/ironclaw/llms.txt
Use this file to discover all available pages before exploring further.
Features
- App mentions -
@YourBotin any channel - Direct messages - DM the bot directly
- Thread support - Conversations tracked via Slack’s native threading
- Signature validation - HMAC-based request verification
- DM pairing - Approve unknown users with pairing codes
Prerequisites
- Slack workspace admin access
- Public HTTPS URL for webhooks (ngrok, Cloudflare Tunnel, etc.)
- IronClaw installed and configured
Setup
1. Create a Slack App
- Go to api.slack.com/apps
- Click Create New App → From scratch
- Name your app (e.g., “IronClaw Agent”) and select your workspace
2. Configure Bot Token Scopes
Under OAuth & Permissions, add these Bot Token Scopes:app_mentions:read- Detect @mentionschat:write- Send messagesim:history- Read DM historyim:read- Access DM channelsim:write- Send DMs
3. Install App to Workspace
- Click Install to Workspace
- Copy the Bot User OAuth Token (starts with
xoxb-)
4. Enable Event Subscriptions
- Go to Event Subscriptions → Enable Events
- Set Request URL to
https://your-tunnel-url/webhook/slack - Under Subscribe to bot events, add:
app_mention- Bot is mentionedmessage.im- DM received
- Save Changes
5. Get Signing Secret
- Go to Basic Information → App Credentials
- Copy the Signing Secret
6. Configure IronClaw
Set environment variables:7. Start IronClaw with Tunnel
Configuration
Edit~/.ironclaw/channels/slack.capabilities.json:
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
signing_secret_name | string | "slack_signing_secret" | Name of secret containing signing secret |
owner_id | string | null | Slack user ID; when set, only this user can message |
dm_policy | string | "pairing" | open, allowlist, or pairing |
allow_from | array | [] | Pre-approved user IDs. ["*"] allows everyone |
DM Pairing
When an unknown user DMs your bot withdm_policy: "pairing":
Flow
- Unknown user sends a DM
- Bot replies:
To pair with this bot, run: ironclaw pairing approve slack ABC12345 - You run:
ironclaw pairing approve slack ABC12345 - User is added to the allow list; future messages are delivered
Commands
Usage
App Mentions (Channel)
Mention the bot in any channel where it’s a member:Direct Messages
DM the bot directly:Threaded Conversations
Replies automatically thread under the original message:Secrets
The channel requires two secrets:Bot Token
Slack Bot OAuth Token (starts withxoxb-):
Signing Secret
Slack Signing Secret for HMAC validation:X-Slack-Signature header before forwarding events to the WASM channel.
Events
URL Verification
When you first set the Request URL in Slack’s Event Subscriptions, Slack sends a challenge:Event Callback
After verification, Slack sends event payloads:<@U987XYZ> mention, and forwards "hello" to the agent.
Message Metadata
Each message includes metadata for response routing:Permissions
Owner Restriction
Limit the bot to a single user:DM Policy
open - Allow all DMs:
allowlist - Only pre-approved users:
pairing - Allowlist + interactive pairing:
Rate Limiting
Slack’s API has a rate limit of ~1 request/second per method. The channel enforces 50 requests/minute for safety. If you exceed this, responses will be queued and sent when the rate limit resets.Manual Installation
If the channel isn’t installed via the wizard:Troubleshooting
Events not received
- Check Request URL - Verify the URL in Slack’s Event Subscriptions matches your tunnel
- Tunnel running - Ensure ngrok/Cloudflare tunnel is active
- Logs - Check
ironclaw runlogs for “Slack event” messages - Signature validation - Ensure
SLACK_SIGNING_SECRETis correct
Bot not responding
- Bot is a member - Add the bot to the channel (
/invite @YourBot) - Permissions - Verify bot has
chat:writescope - Token valid - Check
SLACK_BOT_TOKENstarts withxoxb- - Logs - Look for “Slack API error” in logs
Pairing not working
- DM policy - Ensure
dm_policyis"pairing" - Signing secret - Verify signature validation passes
- Logs - Check for “Pairing request” or “Pairing upsert failed”
Signature validation fails
- Ensure
SLACK_SIGNING_SECRETmatches the value in Slack App Credentials - Check system clock is accurate (HMAC uses timestamp)
- Verify webhook requests are coming from Slack (not a proxy/firewall rewriting headers)
Source Code
- Implementation:
~/workspace/source/channels-src/slack/src/lib.rs - Capabilities:
~/workspace/source/channels-src/slack/slack.capabilities.json
Example App Manifest
For faster setup, use this app manifest:- Go to api.slack.com/apps
- Click Create New App → From an app manifest
- Paste the manifest above
- Update
request_urlwith your tunnel URL - Install to workspace