Slack App Setup
This guide provides detailed information about configuring your Slack app for Gorkie, including OAuth scopes, event subscriptions, and connection modes.Creating Your Slack App
Gorkie includes a pre-configured app manifest (slack-manifest.json) that automatically sets up all required permissions and features.
Using the App Manifest
Open Slack API Dashboard
Navigate to https://api.slack.com/apps
Paste Manifest
Copy the entire contents of
slack-manifest.json from the repository and paste it into the editor:OAuth Scopes Explained
The manifest configures the following bot token scopes. Each scope grants specific permissions:Core Chat Functionality
chat:write- Send messages as Gorkieapp_mentions:read- Receive notifications when Gorkie is @mentionedreactions:read- View emoji reactions on messagesreactions:write- Add emoji reactions to messages
Channel Access
channels:history- View message history in public channelschannels:join- Join public channels automaticallychannels:manage- Manage channel settingschannels:read- View information about public channelschannels:write.invites- Invite users to channels
Private Channel & Group Support
groups:history- View message history in private channelsgroups:read- View information about private channelsgroups:write- Manage private channel memberships
Direct Messages
im:history- View direct message historyim:write- Send direct messages
Group Direct Messages
mpim:history- View group DM historympim:read- View group DM informationmpim:write- Send messages in group DMs
Files and Attachments
files:read- Access files shared in conversationsfiles:write- Upload files to Slack (used for generated images and sandbox outputs)
User and Workspace Info
users:read- View user informationusers.profile:read- View user profile detailsteam:read- View workspace information
Search Capabilities
search:read.files- Search for filessearch:read.public- Search public channels and messagessearch:read.users- Search for users
Assistant Features
assistant:write- Use Slack’s Assistant API for suggested prompts and enhanced UX
Event Subscriptions
Gorkie listens to the following bot events to respond to user interactions:Message Events
message.channels- Messages posted in public channelsmessage.groups- Messages posted in private channelsmessage.im- Direct messages to the botmessage.mpim- Messages in group DMs
Mention Events
app_mention- When Gorkie is @mentioned in any channel
Channel Events
member_joined_channel- When a user joins a channelmember_left_channel- When a user leaves a channel
Event subscriptions are automatically configured when using the manifest. These events enable Gorkie to respond to conversations across your workspace.
Connection Modes: Socket Mode vs HTTP
Gorkie supports two connection modes for receiving events from Slack:Socket Mode (Recommended for Development)
Socket Mode uses WebSockets to receive events without exposing a public HTTP endpoint. Advantages:- No public URL required
- Perfect for local development
- Works behind firewalls and NAT
- Easier to set up
Generate App-Level Token
Navigate to Basic Information > App-Level Tokens and click Generate Token and Scopes
- Name:
gorkie-socket-token(or any name) - Scope:
connections:write
HTTP Mode (Recommended for Production)
HTTP mode receives events via webhook POST requests to a public URL. Advantages:- More scalable for production
- Better for serverless deployments
- Lower latency
Configure Event Subscriptions
In your Slack app settings under Event Subscriptions:
- Enable Events: On
- Request URL:
https://your-domain.com/slack/events - Slack will verify the URL with a challenge request
Bot Token Setup
After creating your app, you need to generate and install the bot token:Install App to Workspace
Go to OAuth & Permissions in your Slack app settings and click Install to Workspace
Signing Secret
The signing secret verifies that requests are coming from Slack:Interactivity
Interactivity is enabled in the manifest to support:- Button clicks
- Select menus
- Modal interactions
- Message actions
https://your-domain.com/slack/events.
Assistant View Configuration
The manifest configures Slack’s Assistant API with suggested prompts:Testing Your Configuration
After setting up your Slack app:- Start Gorkie with
bun run dev - Invite the bot to a channel:
/invite @gorkie - Send a test message:
@gorkie Hello! - Verify the response appears in the thread
Troubleshooting
Invalid token errors
Invalid token errors
- Verify tokens don’t have extra spaces or line breaks
- Ensure you’re using the Bot User OAuth Token (starts with
xoxb-), not the App-Level Token - Check that the app is installed to the correct workspace
Events not being received
Events not being received
For Socket Mode:
- Verify
SLACK_APP_TOKENis set withconnections:writescope - Check Socket Mode is enabled in app settings
- Look for WebSocket connection logs in the console
- Verify your URL is publicly accessible
- Check SSL certificate is valid
- Review Event Subscriptions URL verification status
- Ensure your server is running on the correct port
Permission denied errors
Permission denied errors
- Verify all required OAuth scopes are granted
- Reinstall the app to workspace to refresh permissions
- Check that the bot is a member of the channel (use
/invite @gorkie)
Signature verification failed
Signature verification failed
- Verify
SLACK_SIGNING_SECRETmatches the value in Basic Information - Check for extra whitespace in the environment variable
- Ensure requests are coming from Slack’s IPs
Security Best Practices
- Rotate tokens periodically from the Slack app dashboard
- Use environment variables for all sensitive configuration
- Enable token rotation in your Slack app settings (optional)
- Restrict API access to only the scopes you need
- Monitor logs for unusual activity or unauthorized access attempts
Next Steps
Now that your Slack app is configured:Quickstart
Complete the full setup process
Environment Variables
Configure AI providers, database, and additional services