Seppo is a Slack bot powered by Claude AI, deployed as a Cloudflare Worker. When mentioned in a Slack channel, Seppo responds in character as a helpful 60-year-old Finnish caretaker.
- Cloudflare account with Workers enabled
- Anthropic API key
- Slack workspace with permission to create apps
- Node.js 18+ and npm
- Go to api.slack.com/apps and click Create New App > From scratch.
- Give it a name (e.g. Seppo) and select your workspace.
- Under OAuth & Permissions, add the following Bot Token Scopes:
app_mentions:readchat:write
- Under Event Subscriptions, enable events and add the bot event
app_mention. The Request URL will be set after deployment — come back to this step. - Install the app to your workspace and copy the Bot User OAuth Token (
xoxb-...). - From Basic Information, copy the Signing Secret.
git clone <repo-url>
cd slack-bot-seppo
npm installEdit wrangler.toml and set your Cloudflare account ID:
name = "350fi-seppo"
main = "src/index.ts"
compatibility_date = "2025-02-14"
account_id = "<your-cloudflare-account-id>"
workers_dev = trueYour account ID is found in the Cloudflare dashboard URL or under Workers & Pages > Overview.
Store sensitive values as Cloudflare Worker secrets (they are never stored in code or wrangler.toml):
# Slack bot token (xoxb-...)
npx wrangler secret put SLACK_BOT_TOKEN
# Slack signing secret
npx wrangler secret put SLACK_SIGNING_SECRET
# Anthropic API key
npx wrangler secret put ANTHROPIC_API_KEYEach command will prompt you to paste the value.
npm run deployWrangler will output the Worker URL, e.g.:
https://350fi-seppo.<your-subdomain>.workers.dev
- Go back to your Slack app's Event Subscriptions page.
- Set the Request URL to your Worker URL. Slack will send a challenge request — the Worker handles it automatically.
- Save changes and reinstall the app if prompted.
Run the Worker locally with a tunnel for Slack events:
npm run devWrangler starts a local server and can expose it via --remote or you can use a tunnel tool (e.g. cloudflared) to expose the local port to the internet for Slack's event delivery.
| Component | Role |
|---|---|
slack-cloudflare-workers |
Handles Slack request verification and event routing |
| Cloudflare Workers | Serverless runtime — no server to manage |
| Anthropic API | Generates Seppo's responses via claude-sonnet-4-5 |
When Seppo is @mentioned in a channel, the Worker:
- Verifies the request signature from Slack
- Strips the mention tag from the message text
- Sends the text to Claude with Seppo's Finnish caretaker system prompt
- Posts the reply in the same thread
| Variable | Source | Description |
|---|---|---|
SLACK_BOT_TOKEN |
Slack app | Bot User OAuth Token (xoxb-...) |
SLACK_SIGNING_SECRET |
Slack app | Used to verify request signatures |
ANTHROPIC_API_KEY |
Anthropic console | API key for Claude |