Required environment variables for the bot to function:
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_SIGNING_SECRET=your-signing-secret
SLACK_ID_CLIENT=your-client-id
SLACK_WEBHOOK_URL=your-webhook-url
-
Create a new Slack App at https://api.slack.com/apps
-
Under "OAuth & Permissions", add the following scopes:
channels:read chat:write groups:read channels:join im:write users:read team:read commands
-
Install the app to your workspace
-
Copy the following credentials:
- Bot User OAuth Token →
SLACK_BOT_TOKEN
- Signing Secret →
SLACK_SIGNING_SECRET
- Client ID →
SLACK_ID_CLIENT
- Bot User OAuth Token →
The bot currently supports the following commands:
/discover
- View latest issues from repositories
- Navigate to your organization's dashboard
- Click on "Add Slack Integration"
- Authorize the app for your workspace
- Configure the following settings:
- Default channel for notifications
- Daily update time (0-23 hour)
- Welcome message for new members
- Customizable welcome messages for new team members
- Supports Slack markdown formatting
- Sent via DM to new members
- Configurable daily updates about timelogs
- Set specific hour for updates
- Sent to designated channel
- View latest issues from repositories
- Interactive repository selection
- Issue summaries with links
- Slash command support
- Interactive components
- Error handling and user feedback
- Comprehensive activity tracking
- Success/failure monitoring
- Workspace-specific logging
The bot's activity is logged in the SlackBotActivity
model. You can monitor:
- Success rates
- Activity types
- Workspace usage
- Recent activities
Access logs in Django admin under "Slack Bot Activity" with:
- Filtering by activity type
- Success/failure tracking
- Workspace-specific views
- Detailed error messages
Test files are available in website/test_slack.py
for verifying:
- Command handling
- Event processing
- Welcome message delivery
- Integration functionality
Common issues and solutions:
-
Bot Not Responding
- Verify environment variables are set correctly
- Check bot token permissions
- Ensure bot is invited to channels
-
Welcome Messages Not Sending
- Verify bot has
im:write
permission - Check workspace token is valid
- Ensure welcome message is configured
- Verify bot has
-
Commands Not Working
- Verify slash command configuration
- Check signing secret is correct
- Ensure command URLs are accessible
- Keep all tokens and secrets secure
- Never commit environment variables to version control
- Regularly rotate tokens and secrets
- Monitor bot activity for unauthorized usage
For additional support:
- Check the BLT documentation
- Review the Slack API documentation
- Submit issues on the BLT GitHub repository