🥬 The BLT Lettuce (OWASP Helper) Bot - A Slack welcome bot hosted on Cloudflare Workers
- 🎉 Automatic Welcome Messages - Sends a personalized welcome message to new members when they join your Slack workspace
- 📝 Editable Welcome Message - Customize the welcome message by editing
WELCOME_MESSAGE.md - 📊 Stats Dashboard - Track join statistics with a beautiful dashboard
- 📈 Analytics - View charts showing joins over time
- 🚀 One-Click Deploy - Deploy to Cloudflare Workers with a single click
- Click the Deploy to Cloudflare Workers button above
- Follow the prompts to connect your Cloudflare account
- Configure your Slack app credentials (see below)
- Your bot is live!
-
Clone the repository
git clone https://github.com/OWASP-BLT/BLT-Lettuce-on-Cloudflare.git cd BLT-Lettuce-on-Cloudflare -
Install dependencies
npm install
-
Create a Slack App
- Go to Slack API and create a new app
- Enable Event Subscriptions and subscribe to the
team_joinevent - Add the following Bot Token Scopes:
chat:write- Send messagesim:write- Open direct messagesusers:read- Read user info
- Install the app to your workspace
- Copy the Bot User OAuth Token and Signing Secret
-
Create a KV namespace
npx wrangler kv:namespace create SLACK_BOT_KV
Update
wrangler.tomlwith the returned namespace ID. -
Set secrets
npx wrangler secret put SLACK_BOT_TOKEN npx wrangler secret put SLACK_SIGNING_SECRET
-
Deploy
npm run deploy
-
Configure Slack Event URL
- In your Slack app settings, set the Event Request URL to:
https://your-worker.your-subdomain.workers.dev/slack/events
- In your Slack app settings, set the Event Request URL to:
Edit the WELCOME_MESSAGE.md file to customize the welcome message sent to new members. The file supports:
- Headers (
#,##) - Bold text (
**bold**) - Links (
[text](url)) - Bullet points (
-) - Emoji 🎉
After editing, redeploy to apply changes:
npm run deployThe bot includes a built-in dashboard at your worker URL that shows:
- Total Members Welcomed - Count of all members who received welcome messages
- Last Join - When the most recent member joined
- Joins Today - Number of new members today
- Joins Chart - Visual chart of joins over the last 30 days
- Recent Joins List - Table of recent join events
| Endpoint | Description |
|---|---|
GET / |
Dashboard homepage |
POST /slack/events |
Slack Events API endpoint |
GET /api/stats |
Get aggregate statistics |
GET /api/joins |
Get list of recent joins |
# Run locally
npm run dev
# Type check
npm run type-check
# Lint
npm run lint
# Run tests
npm test| Variable | Description |
|---|---|
SLACK_BOT_TOKEN |
Slack Bot OAuth Token (starts with xoxb-) |
SLACK_SIGNING_SECRET |
Slack Signing Secret for request verification |
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
OWASP BLT (Bug Logging Tool) is an open-source project designed to help the security community track and report vulnerabilities.