Recordabot is a multi-channel reminder service built with FastAPI. It schedules recurring or cron-based reminders and delivers them through Telegram, WhatsApp, or email, with optional dynamic content generation from an external provider.
- Product-oriented backend project with a clear API surface.
- Combines scheduling, messaging integrations, and operational controls.
- Useful as a reference for bots, notification systems, and automation workflows.
- Interval and cron scheduling.
- Telegram, WhatsApp (Twilio), and SMTP email delivery.
- Flexible Telegram payloads for rich messages.
- Optional external message provider for dynamic content generation.
- REST API plus CLI utilities.
- SQLite persistence and Docker-based local deployment.
- Python
- FastAPI
- APScheduler
- SQLModel
- python-telegram-bot
- Docker
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reloadThe API is available at http://localhost:8000.
docker compose up --buildCopy .env.example to .env and set the relevant values.
Core variables:
TELEGRAM_BOT_TOKENDATABASE_URLSCHEDULER_TIMEZONEMESSAGE_PROVIDER_URLMESSAGE_PROVIDER_TIMEOUT_SECONDSMESSAGE_PROVIDER_AUTH_HEADEREMAIL_SMTP_HOST,EMAIL_SMTP_PORT,EMAIL_SMTP_USER,EMAIL_SMTP_PASSWORD,EMAIL_FROM,EMAIL_USE_TLSWHATSAPP_TWILIO_ACCOUNT_SID,WHATSAPP_TWILIO_AUTH_TOKEN,WHATSAPP_FROM_NUMBER
Main endpoints:
POST /remindersGET /remindersPATCH /reminders/{id}DELETE /reminders/{id}POST /reminders/{id}/send-nowPOST /reminders/{id}/controlsPOST /telegram/webhook
Example reminder payload:
{
"recipient": "123456789",
"channel": "telegram",
"schedule_type": "interval",
"schedule_value": "3600",
"payload": {
"method": "sendMessage",
"params": {
"text": "Hello from Recordabot"
}
}
}python -m app.cli send-telegram --recipient 123456789 --method sendMessage --params-json '{"text":"hello"}'
python -m app.cli send-email --to user@example.com --subject "Hello" --body "Message"
python -m app.cli send-whatsapp --to +34123456789 --body "Hello"
python -m app.cli set-webhook --url https://your-domain.com/telegram/webhookWhen MESSAGE_PROVIDER_URL is configured, Recordabot can fetch a replacement payload before sending a reminder. If the provider fails, the original payload is used as a fallback.
- Reminder state is persisted in SQLite and restored at startup.
- Telegram controls support pause, resume, send now, skip next, and refresh payload actions.
MIT