TaskBot is an advanced Telegram bot designed to streamline personal task management. It leverages AI (YandexGPT) to intelligently parse and structure tasks from natural language, and uses Voice Recognition (SpeechKit) to convert audio notes into actionable items.
With robust timezone support and a reliable PostgreSQL backend, TaskBot ensures you never miss a deadline, no matter where you are.
Simply send a message like "Buy groceries on Friday", and the bot will:
- Use YandexGPT to extract a meaningful title and description.
- Automatically structure the task for easy viewing.
Don't have time to type? Just send a voice message!
- Yandex SpeechKit transcribes your audio instantly.
- The transcribed text is then processed by AI to create a structured task.
- Custom Reminders: Set specific dates and times for notifications.
- Recurring Tasks: Create tasks that repeat daily, weekly, or at custom intervals.
- Timezone Awareness: Reminders are sent according to your local time, configured via the bot settings.
- Built with Python and asyncio for high performance.
- Persistent storage using PostgreSQL.
- Secure SSL connection to the database.
- Python 3.9+
- PostgreSQL Database
- Telegram Bot Token (from @BotFather)
- Yandex Cloud API Key (for GPT and SpeechKit features)
git clone https://github.com/JohnGenri/TaskBot-Telegram.git
cd TaskBot-Telegrampip install -r requirements.txtCreate a configuration directory and file:
mkdir important
touch important/config_task.jsonAdd your credentials to important/config_task.json:
{
"BOT_TOKEN": "YOUR_TELEGRAM_BOT_TOKEN",
"ADMIN_ID": 123456789,
"DATABASE": {
"USER": "db_user",
"PASSWORD": "db_password",
"HOST": "db_host",
"PORT": "6432",
"DB_NAME": "db_name"
},
"YANDEX_GPT": {
"API_KEY": "YOUR_YANDEX_API_KEY",
"FOLDER_ID": "YOUR_FOLDER_ID",
"MODEL_URI": "gpt://folder_id/yandexgpt/rc",
"SYSTEM_PROMPT": "You are a personal assistant..."
},
"YANDEX_SPEECHKIT": {
"API_KEY": "YOUR_YANDEX_API_KEY",
"FOLDER_ID": "YOUR_FOLDER_ID"
}
}Note: For secure database connections, place your
root.crtfile in theimportant/directory as well.
Run the initialization script to create the necessary tables:
python3 sql.py
---
## 🚀 Usage
1. Start the bot:
```bash
python3 TaskBot.py
- Open Telegram and search for your bot.
- Send
/startto begin. - Set your timezone when prompted.
- Create tasks by sending text or voice messages!
TaskBot/
├── TaskBot.py # Main application entry point
├── sql.py # Database initialization script
├── requirements.txt # Python dependencies
├── important/ # Configuration and secrets (git-ignored)
│ ├── config_task.json
│ ├── root.crt
│ └── user_map.json
└── README.md # Project documentation
Contributions are welcome! Please feel free to submit a Pull Request.
Made with ❤️ by John Genri