A versatile Telegram bot that helps users convert files between different formats. The bot supports various file types including documents, images, and spreadsheets.
-
📊 Spreadsheet Conversion
- CSV → PDF (Tables)
- CSV → XLSX (Excel)
- XLSX → CSV
-
🖼️ Image Conversion
- JPG/JPEG → PDF
- JPG/JPEG → PNG
- PNG → PDF
- PNG → JPG
- Open Telegram
- Search for
@QConvertBot
- Start a chat with the bot
- Send
/start
to begin - Send any supported file
- Choose the conversion format from the provided options
- Wait for your converted file
If you want to run your own instance of this bot:
-
Clone this repository:
git clone https://github.com/ImranDevPython/telegram-file-converter-bot.git cd telegram-file-converter-bot
-
Create and activate a virtual environment:
python -m venv .venv # On Windows: .venv\Scripts\activate # On Unix or MacOS: source .venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Create a new bot on Telegram:
- Open Telegram
- Search for
@BotFather
- Send
/newbot
- Follow the instructions to create your bot
- Copy the API token provided
-
Create a
.env
file in the project root:BOT_TOKEN=your_bot_token_here
-
Run the bot:
python bot.py
- Maximum input file size: 20MB
- Maximum output file size: 50MB
- Documents: DOCX, PDF
- Images: JPG/JPEG, PNG
- Spreadsheets: CSV, XLSX
Common issues and solutions:
- File Too Large: Try compressing your file before uploading
- Conversion Failed: Make sure your file is not corrupted and in the correct format
- Bot Not Responding: Check if the bot is running and has proper internet connection
If you encounter any issues:
- Check the Issues section
- Create a new issue if your problem isn't already reported
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Python 3.x and python-telegram-bot
- Modular architecture with separate configuration and utility modules
- Robust error handling and user feedback
- python-telegram-bot for the Telegram Bot API wrapper
- Various Python libraries used for file conversion