https://github.com/waheeb71/tenth_power_bot
Smart Telegram Bot for Customer Management and Automated Customer Service
https://github.com/waheeb71/tenth_power_bot
bot python telegram telegrambot
Last synced: 8 months ago
JSON representation
Smart Telegram Bot for Customer Management and Automated Customer Service
- Host: GitHub
- URL: https://github.com/waheeb71/tenth_power_bot
- Owner: waheeb71
- License: other
- Created: 2025-09-03T14:07:56.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-04T15:02:24.000Z (10 months ago)
- Last Synced: 2025-09-17T07:48:37.382Z (9 months ago)
- Topics: bot, python, telegram, telegrambot
- Language: Python
- Homepage:
- Size: 61.5 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Business Assistant Bot
Smart Telegram Bot for Customer Management and Automated Customer Service
Powered by Google Gemini | Ideal for businesses, contractors, and technical services
---
## Overview
**Business Assistant Bot** is an integrated Telegram bot designed to help small and medium-sized businesses automatically manage customer communication, combining AI with human interaction.
It combines:
- Smart replies via **Google Gemini**
- Interactive button interface
- Supervisor message forwarding system with direct reply capability
- 🌐 **Webhook** support for deployment on Render / Heroku / Railway
Ideal for businesses in:
- Contracting
- Maintenance and technical services
- Administrative services
- 🔧 Technical support
---
## Key Features
| Feature | Description |
|-------|-------|
| 💡 Smart Replies | Uses **Google Gemini 1.5 Flash** for automatic responses in Arabic and English |
| 📱 Interactive UI | Main buttons for services, contact, and consultations |
| 📥 Internal Messaging System | Customers can send messages, and supervisors are notified |
| ✉️ Team Response | Supervisors reply using `/reply_123` command, and the response is automatically delivered to the customer |
| 🌐 Webhook and Polling Support | Works in local environments and public servers |
| 🔧 Easy Customization | Easily modify texts, services, and contact numbers |
| 📦 Lightweight and Fast | Built on `python-telegram-bot` and `Flask` |
---
## Technical Structure
```
business-assistant-bot/
├── app.py # Main application (Flask + PTB)
├── ai_handler.py # Google Gemini API integration
├── handlers.py # Commands and button handlers
├── config.py # General settings
├── requirements.txt # Required libraries
└── README.md # This file
```
---
## 🔧 Requirements
- ✅ Python 3.8 or higher
- ✅ [Google Gemini API Key](https://aistudio.google.com/app/apikey)
- ✅ [Telegram Bot Token](https://t.me/BotFather)
- ✅ HTTPS-enabled server (e.g., Render, Heroku, or VPS) — for Webhook activation
---
## How to Run
### 1. Clone the Project
```bash
git clone https://github.com/waheeb71/tenth_power_bot.git
cd tenth_power_bot
```
### 2. Install Dependencies
```bash
pip install -r requirements.txt
```
### 3. Set Environment Variables
Create a `.env` file or set variables directly in your environment:
```bash
export TELEGRAM_TOKEN="123456:ABC-DEF123456"
export GEMINI_API_KEY="AIzaSyXXXXXXYourKeyHere"
export WEBHOOK_URL="https://yourdomain.onrender.com" # Leave empty for local polling
export PORT=10000
```
> ⚠️ Use `https://` only in `WEBHOOK_URL`.
### 4. Run the Bot
```bash
python app.py
```
> If webhook is not enabled, the bot will automatically run in **polling** mode.
---
## 🌐 Deployment on Render / Heroku
1. Push the project to a GitHub repository.
2. Create an app on [Render](https://render.com) or Heroku.
3. Connect it to your repository.
4. Add environment variables in the dashboard.
5. Launch the app.
✅ Webhook will be set automatically.
---
## How to Customize
1. Open `config.py` and modify:
- `COMPANY_NAME`: Your company name
- `CONTACT_PHONE`: Contact phone number
- `CONTACT_EMAIL`: Company email
- `SERVICES`: List of services
- `ADMIN_IDS`: Telegram user IDs of supervisors
2. Edit texts in `handlers.py` according to your business needs.
---
## License
This project is distributed under the [MIT License](LICENSE), meaning you can:
- Reuse it
- Modify it
- Sell it as part of a service
- Use it commercially
---
Built to empower businesses with efficient and intelligent customer service automation.
Contribute to its development or share it with your team!
---
## How Can You Benefit From This Project?
- ✔️ Use it as a **ready-made template** for any business.
- ✔️ Include it in your portfolio as a **smart customer management system**.
- ✔️ Sell it as a service to small businesses.
- ✔️ Add a web dashboard for supervisors to turn it into a full CRM system.
---
## Contact:
For questions or support, contact me via:
- Telegram: [@SyberSc71](https://t.me/SyberSc71)
- Telegram: [@WAT4F](https://t.me/WAT4F)
- GitHub: [waheeb71](https://github.com/waheeb71)
- GitHub2: [cyberlangdev](https://github.com/cyberlangdev)
- **Location:** I am from Yemen, Taiz.
- **YouTube Channel:** [Cyber Code](https://www.youtube.com/@cyber_code1)
- **X (formerly Twitter):** [@wa__cys](https://x.com/wa__cys)
---
## Author / Developer
**English:** Waheeb Mahyoob Al-Sharabi (Waheeb Al-Sharabi)
**العربية:** وهيب مهيوب الشرعبي (وهيب الشرعبي)
## اللغة / Language
📖 [اقرأ النسخة العربية](READMEAR.md)