Prerequisites
- A Slack workspace where you have permission to install apps
- Admin access to create Slack apps
Creating a Slack App
-
Create New App
- Go to https://api.slack.com/apps
- Click “Create New App”
- Choose “From scratch”
- Name your app (e.g., “Weaver Bot”)
- Select your workspace
-
Enable Socket Mode
- Navigate to “Socket Mode” in the left sidebar
- Toggle “Enable Socket Mode” to ON
- Generate an app-level token:
- Name:
weaver-socket - Scope:
connections:write
- Name:
- Save the token (starts with
xapp-)
-
Configure OAuth & Permissions
- Go to “OAuth & Permissions”
- Under “Bot Token Scopes”, add:
app_mentions:read- See mentionschannels:history- View messages in public channelschannels:read- View basic channel infochat:write- Send messagesfiles:read- Access file informationim:history- View messages in DMsim:read- View basic DM infoim:write- Send DMsreactions:write- Add emoji reactionsusers:read- View user info
-
Install App to Workspace
- Scroll up and click “Install to Workspace”
- Review permissions and click “Allow”
- Save the Bot User OAuth Token (starts with
xoxb-)
-
Enable Event Subscriptions
- Go to “Event Subscriptions”
- Toggle “Enable Events” to ON
- Under “Subscribe to bot events”, add:
app_mention- Bot was mentionedmessage.im- Direct messages to bot
- Save Changes
-
Optional: Create Slash Commands
- Go to “Slash Commands”
- Click “Create New Command”
- Command:
/weaver - Description: “Interact with Weaver”
- Usage Hint:
[your message]
Configuration
Add the Slack channel to yourconfig.yaml:
Configuration Options
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | Enable Slack channel |
bot_token | string | Yes | Bot User OAuth Token (xoxb-) |
app_token | string | Yes | App-Level Token (xapp-) |
allow_from | array | No | Allowed Slack user IDs |
User ID Format
Slack uses alphanumeric user IDs likeU01234ABCDE.
Finding User IDs:
- Click on a user’s profile in Slack
- Click “More” → “Copy member ID”
- Or check Weaver logs after a message:
Supported Features
Message Types
- Direct Messages - Bot responds to all DMs
- Channel Mentions - Responds when @mentioned in channels
- Thread Replies - Maintains conversation threads
- File Attachments - Downloads and processes files
- Slash Commands - Custom
/weavercommands (if configured)
Reactions & Indicators
- 👀 (eyes): Added when message is received
- ✅ (check mark): Added when response is sent
- Threading: Replies maintain thread context
File Handling
- File Types: All file types supported
- Audio Files: Transcribed if Groq is enabled
- Authentication: Uses bot token for private file downloads
- Cleanup: Temporary files deleted after processing
Chat ID Format
Slack uses composite chat IDs:- Direct Messages:
{channel_id}(e.g.,D01234ABCDE) - Channel Threads:
{channel_id}/{thread_ts}(e.g.,C01234ABCDE/1234567890.123456)
Audio Transcription
Enable audio transcription inconfig.yaml:
Bot Mention Handling
The bot automatically strips its own mention from messages: User sends:Connection Mode: Socket Mode
Weaver uses Slack’s Socket Mode:- No webhook URL required - Bot connects via WebSocket
- Works behind firewalls - Outbound connection only
- Real-time events - Instant message delivery
- Persistent connection - Auto-reconnects on disconnect
Why Socket Mode?
- No need for public HTTPS endpoint
- Simpler setup for development and self-hosting
- Lower latency than HTTP webhooks
- Built-in retry and reconnection logic
Error Handling
Common Issues
Invalid Tokens- Verify
bot_tokenstarts withxoxb- - Verify
app_tokenstarts withxapp- - Regenerate tokens if needed
- Add required scopes in OAuth & Permissions
- Reinstall app to workspace
- Enable Socket Mode in app settings
- Ensure app-level token has
connections:writescope
- Add user ID to
allow_fromlist - Or remove
allow_fromto allow all users
Security Considerations
- Token Security: Keep bot and app tokens secret
- Scope Minimization: Only request necessary OAuth scopes
- Allowlist: Use
allow_fromto restrict access - File Access: Bot can only access files in channels it’s invited to
Metadata Captured
Each Slack message includes:Example Configurations
Basic Setup
With Allowlist & Transcription
Logging
Monitor Slack activity:Best Practices
- Invite Bot to Channels: Use
/invite @WeaverBotin channels where you want it active - Use Threads: Mention bot in threads to keep conversations organized
- Set Display Info: Add bot description and icon in app settings
- Monitor Reactions: Watch for 👀 and ✅ to track message flow
- Test in Private Channel: Create a test channel for development
Slash Commands
If you created a/weaver slash command:
Thread Behavior
- New conversations: Messages in channels start new threads
- Existing threads: Replies stay in thread context
- DMs: No threading (not supported in Slack DMs)
Next Steps
- Configure Agents to respond in Slack
- Set up Voice Transcription for audio files
- Customize Bot Responses for workplace context