A slack bot that explains why a user has a specific Slack ID, using AI to make far-fetched conclusions based on profile fields.
- Cloudflare Workers
- Cloudflare KV
- Typescript
- Openrouter (uses Cerebras and Groq)
- Vercel AI SDK
- slack-cloudflare-workers
- Deploy to Cloudflare Workers
- Bind KV namespace to Cloudflare Workers
- Get an openrouter api key
- Create a slack bot here and get a bot ID. It needs the conversations.history scope.
- Set ENV vars
CHANNEL_ID=
OPENROUTER_API_KEY=
SLACK_BOT_TOKEN=
SLACK_LOGGING_LEVEL=
SLACK_SIGNING_SECRET=
- Set up Slack event subscriptions with the URL
https://<YOUR_WORKER_URL>/slack/events