A Slack bot that monitors the #wfh-leaves-ooo channel for leave messages, uses LLM to parse them, and syncs confirmed leaves to Google Calendar and Harvest.
- 🤖 Slack Integration - Monitors leave channel using Socket Mode
- 🧠 LLM Parsing - Uses OpenAI to understand natural language leave requests
- 📅 Google Calendar Sync - Creates calendar events (with spanning support)
- ⏱️ Harvest Integration - Logs time entries for leave tracking
- ✅ Confirmation Flow - Interactive buttons for user approval
- 🖥️ Web Admin - FastAPI-based management interface
# Install dependencies
uv sync
# Configure environment
cp .env.example .env
# Edit .env with your credentials
# Run migrations
uv run leave-bot migrate
# Start everything
uv run leave-bot allSee the doc/ folder for comprehensive documentation:
| Document | Description |
|---|---|
| Overview | Documentation index and quick navigation |
| Architecture | System components, data flow, tech stack |
| Slack Bot | Message handling, LLM parsing, button handlers |
| Database | Schema, models, relationships, migrations |
| Integrations | Google Calendar, Harvest, OpenAI setup |
| Web Admin | API endpoints, admin interface |
| Configuration | Environment variables, runtime settings |
| Deployment | Docker, local dev, production deployment |
| Tech Spec | Complete technical specification |
Post a message in #wfh-leaves-ooo:
On leave tomorrow
Taking sick leave from 5th to 7th January
Half day tomorrow afternoon
The bot will parse your message, send a confirmation prompt, and upon approval, sync to Calendar and Harvest.
# Run tests
uv run pytest
# Format code
uv run ruff format .
# Lint
uv run ruff check .MIT License - see LICENSE file for details.