Hive76's Slack assistant. Answers questions in #new-members and responds to
@BeeBot mentions anywhere. Pulls its knowledge from Google Drive docs, the
Hive76 WordPress site, and Eventbrite events.
- A Linux host with Docker + Docker Compose
- A Hive76 Google Workspace admin account
- An Anthropic API account (console.anthropic.com)
- Go to console.cloud.google.com
- Create a new project called
hive76-beebot(or use an existing one) - Enable the Google Drive API:
- APIs & Services → Enable APIs → search "Google Drive API" → Enable
- Create a Service Account:
- APIs & Services → Credentials → Create Credentials → Service Account
- Name:
beebot-sync - Role: none needed (access granted via Drive sharing, not project roles)
- Create and download a JSON key:
- Click the service account → Keys → Add Key → Create new key → JSON
- Save as
config/service-account.jsonin this directory
- Note the service account email address (looks like
beebot-sync@YOUR-PROJECT-ID.iam.gserviceaccount.com)
- Open the
HiveBot Docsfolder in Google Drive - Click Share
- Paste the service account email
- Set to Viewer
- Uncheck "Notify people" → Share
The service account can now read all docs in that folder and subfolders.
- Go to api.slack.com/apps → Create New App → From scratch
- Name:
BeeBot, select your Hive76 workspace
- Settings → Socket Mode → Enable
- Generate an App-Level Token with scope
connections:write - Save this token as
SLACK_APP_TOKEN(starts withxapp-)
- Features → OAuth & Permissions → Bot Token Scopes → Add:
app_mentions:readchannels:historychat:writecommandsusers:read
- Features → Event Subscriptions → Enable Events
- Subscribe to bot events:
app_mentionmessage.channels
- Features → Slash Commands → Create New Command for each:
| Command | Description |
|---|---|
/beebot-sync |
Force knowledge base sync (admin only) |
/beebot-config |
View and manage bot configuration (admin only) |
/beebot-logs |
View recent bot logs (admin only) |
/beebot-restart |
Restart the bot process (admin only) |
- Settings → Install App → Install to Workspace → Allow
- Copy the Bot User OAuth Token (starts with
xoxb-) →SLACK_BOT_TOKEN
/invite @BeeBot
Do this in #new-members and any other channel where you want mention support.
Right-click #new-members → View channel details → scroll to bottom → Copy channel ID
Looks like: C08XXXXXXXX
- Go to console.anthropic.com
- API Keys → Create Key → name it
beebot - Copy the key →
ANTHROPIC_API_KEY
# SSH into your server
ssh user@your-server
# Clone the repo
git clone https://github.com/hive76/beebot.git /opt/beebot
cd /opt/beebot
# Copy env file and fill in values
cp .env.example .env
nano .env # fill in all REPLACE-ME values
# Put your service account JSON in place
mkdir -p config
# scp service-account.json to config/service-account.json
# Pull the image from GitHub Container Registry
docker compose pull
# Run initial sync to populate knowledge base
docker compose run --rm beebot-sync
# Start the bot
docker compose up -d beebot
# Check logs
docker logs -f beebotBeeBot uses a pull-based deployment model. When commits are merged to main,
GitHub Actions builds a new image and pushes it to
ghcr.io/hive76/beebot:latest. A host cron job polls for new images and
restarts the container — no SSH access from CI required.
Add to crontab on the host (crontab -e):
# Pull and redeploy beebot every 5 minutes (no-op if image hasn't changed)
*/5 * * * * cd /opt/beebot && docker compose pull beebot --quiet && docker compose up -d --no-deps beebot >> /var/log/beebot-update.log 2>&1Since ghcr.io/hive76/beebot is a public image, no GHCR authentication is needed.
The sync container runs once and exits. Trigger it on a schedule via cron on the host:
crontab -e
# Add (runs at 3am daily):
0 3 * * * docker compose -f /opt/beebot/docker-compose.yml run --rm beebot-sync >> /var/log/beebot-sync.log 2>&1Or trigger it manually anytime with /beebot-sync in Slack.
Triggers an immediate knowledge base sync from Google Drive, WordPress, and Eventbrite. Admin only.
View and manage runtime configuration. Admin only.
| Subcommand | Example | Description |
|---|---|---|
show |
/beebot-config show |
Display all current settings |
set KEY value |
/beebot-config set BOT_EMOJI :bee: |
Update a setting |
reset KEY |
/beebot-config reset BOT_EMOJI |
Reset a setting to default |
export |
/beebot-config export |
Export full config as JSON |
wp-blocklist-show |
/beebot-config wp-blocklist-show |
List blocked WordPress slugs |
wp-blocklist-add slug |
/beebot-config wp-blocklist-add events |
Block a WordPress slug from sync |
wp-blocklist-remove slug |
/beebot-config wp-blocklist-remove events |
Unblock a slug |
Returns the last 50 lines of the bot log as an ephemeral message. Admin only.
Gracefully exits the bot process — Docker's restart policy brings it back within seconds. Admin only.
Bot not responding in #new-members
- Check
docker logs beebotfor errors - Verify
NEW_MEMBERS_CHANNEL_IDmatches the actual channel ID (not name) - Confirm BeeBot is invited to the channel (
/invite @BeeBot)
Sync failing
- Check service account JSON is at
config/service-account.json - Verify the Drive folder is shared with the service account email
- Run
docker compose run --rm beebot-syncand check output - Use
/beebot-logsin Slack for recent error detail
Wrong answers / missing info
- Check knowledge base:
docker exec beebot cat /app/data/knowledge_base.txt - If a doc is missing, confirm it's a Google Doc (not a Sheet/Slide/PDF) in the folder
- Run
/beebot-syncto force a refresh
Rate limit hitting legitimate users
- Increase
RATE_LIMIT_MAXvia/beebot-config set RATE_LIMIT_MAX 20
# Run tests (inside Docker test stage)
make test
# Build production image
make build
# Scan for secrets and CVEs
make scanTests run automatically in the Docker test stage — if they fail, the build fails. The CI pipeline (GitHub Actions) runs tests and secret scanning on every PR.
See docs/BeeBot Admin Guide.md for the non-technical content management guide intended for Hive76 management.
Google Drive (HiveBot Docs folder)
└── service account (read-only)
└── sync_docs.py (daily cron + /beebot-sync)
└── /app/data/knowledge_base.txt (Docker volume)
└── beebot.py (Slack Bolt, Socket Mode)
├── #new-members: all messages
├── anywhere: @BeeBot mentions
└── Anthropic API (claude-haiku-4-5)
GitHub (hive76/beebot)
└── GitHub Actions CI (test + secret scan on PRs)
└── GHCR (ghcr.io/hive76/beebot:latest)
└── host cron (polls every 5 min, pulls, restarts)