Skip to content

JohnGenri/TaskBot-Telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 TaskBot - Smart AI Task Manager

Python PostgreSQL Telegram Yandex Cloud

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.


✨ Key Features

🤖 AI-Powered Task parsing

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.

🎙️ Voice-to-Text Integration

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.

⏰ Smart Reminders & Scheduling

  • 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.

🗄️ Robust Architecture

  • Built with Python and asyncio for high performance.
  • Persistent storage using PostgreSQL.
  • Secure SSL connection to the database.

🛠️ Installation & Setup

Prerequisites

  • Python 3.9+
  • PostgreSQL Database
  • Telegram Bot Token (from @BotFather)
  • Yandex Cloud API Key (for GPT and SpeechKit features)

1. Clone the Repository

git clone https://github.com/JohnGenri/TaskBot-Telegram.git
cd TaskBot-Telegram

2. Install Dependencies

pip install -r requirements.txt

3. Configuration

Create a configuration directory and file:

mkdir important
touch important/config_task.json

Add 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.crt file in the important/ directory as well.

4. Database Initialization

Run the initialization script to create the necessary tables:

python3 sql.py

---

## 🚀 Usage

1. Start the bot:
   ```bash
   python3 TaskBot.py
  1. Open Telegram and search for your bot.
  2. Send /start to begin.
  3. Set your timezone when prompted.
  4. Create tasks by sending text or voice messages!

📂 Project Structure

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

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Made with ❤️ by John Genri

About

Telegram bot designed to streamline personal task management.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages