Prerequisites
- A Slack workspace where you have admin permissions
- The Whilst web app running (locally or production)
- AWS infrastructure deployed (for Lambda endpoints)
1. Create a Slack App
Create the app
Go to api.slack.com/apps and click Create New App → From scratch.
- App Name: Whilst
- Workspace: Select your workspace
Configure event subscriptions
Navigate to Event Subscriptions and enable events.
- Request URL:
https://api.staging.whilst.app/slack/events(or your API Gateway URL) - Subscribe to bot events:
app_mention
Set bot scopes
Go to OAuth & Permissions and add these Bot Token Scopes:
app_mentions:readchat:writechannels:historygroups:historyusers:read
2. Configure OAuth
Set these environment variables for the OAuth install flow:3. Complete the Install Flow
Visit/slack/install on your running instance to complete the OAuth handshake. This registers the workspace and stores the bot token (encrypted) in the database.
4. Test the Bot
In your Slack workspace, mention the bot in any channel:- An instant acknowledgement
- Progressive status updates
- A final answer with citations
Troubleshooting
Bot doesn't respond to mentions
Bot doesn't respond to mentions
- Verify the bot is in the channel (invite with
/invite @whilst) - Check the Event Subscriptions URL is correct and verified
- Review CloudWatch logs for the Event Intake Lambda
OAuth flow fails
OAuth flow fails
- Ensure
SLACK_CLIENT_IDandSLACK_CLIENT_SECRETare set correctly - Check the redirect URI matches your API Gateway URL
- Verify the Slack app has the required scopes

