Skip to content

Ideas-Net-Studio/sabbath-school-bot

Repository files navigation

Sabbath School Bot 📖

A WhatsApp bot that automatically sends daily Sabbath School lesson summaries to a WhatsApp group.

Features

  • 🔍 Scrapes lessons from Sabbath School website (91 days/quarter)
  • 🤖 AI-powered summaries using DeepSeek API
  • 📱 WhatsApp integration via GREEN-API (free tier)
  • Scheduled delivery - sends lessons automatically each morning
  • 🖥️ Web dashboard - manage lessons, edit summaries, manual send

Quick Start

1. Clone & Install

git clone https://github.com/Ideas-Net-Studio/sabbath-school-bot.git
cd sabbath-school-bot
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

2. Configure Environment

Copy .env.example to .env and fill in:

DEEPSEEK_API_KEY=your_deepseek_api_key

# GREEN-API (free at green-api.com)
GREEN_API_INSTANCE_ID=your_instance_id
GREEN_API_TOKEN=your_api_token
GREEN_API_GROUP_ID=your_group_id

3. Setup GREEN-API (WhatsApp)

  1. Sign up at green-api.com (free Developer plan)
  2. Create an instance and scan QR code on their portal
  3. Copy Instance ID and API Token to .env
  4. Get group ID: python -c "from whatsapp_bot import get_groups; get_groups()"
  5. Add group ID to .env

4. Run

python app.py

Open http://localhost:8000

Usage

  1. Fetch Lessons: Enter quarterly URL (e.g., https://sabbath-school.adventech.io/pt/2025-02) and click Fetch
  2. Review: Check the generated summaries on the dashboard
  3. Edit: Click Edit on any lesson to modify the summary
  4. Send: Click Send to manually post to WhatsApp, or let the scheduler do it automatically

Project Structure

├── app.py              # Flask web application
├── database.py         # SQLAlchemy models
├── scraper.py          # Website scraper (Selenium)
├── summarizer.py       # DeepSeek AI summarization
├── scheduler.py        # Daily message scheduler
├── job_scraper.py      # Background job runner
├── whatsapp_bot.py     # GREEN-API WhatsApp integration
├── templates/          # HTML templates
├── static/             # CSS & JavaScript
└── instance/           # SQLite database

Docker

docker compose up --build

License

MIT

About

Bot to send Sabbath School daily summary

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published