A Telegram bot for managing and scheduling social media posts across platforms, with initial support for Threads integration.
- Connect and manage Threads accounts via Telegram
- View Threads account information
- Schedule posts (coming soon)
- Create thread sequences (coming soon)
- AI-powered post optimization (coming soon)
The project consists of two main components:
- API Service: FastAPI backend handling authentication and platform integrations
- Threads: Threads API integration with Threads API Python Library
- Twitter: Twitter API integration with Twitter API Python Library
- Bot Service: Telegram bot interface built with python-telegram-bot
- Telegram: Telegram API integration with python-telegram-bot
- Python 3.11
- FastAPI
- python-telegram-bot
- LangChain
- PostgreSQL
- Docker
-
Clone the repository
-
Generate a Telegram bot token with @BotFather. Follow the instructions at https://core.telegram.org/api/bots
-
Generate certificates. Used for Threads authentication. Follow the instructions at https://developers.threads.net/docs/auth/overview
3.1. Create a subdirectory for the certificates called
certs3.2. Create a key and a certificate
- openssl genrsa -out key.pem 2048
- openssl req -new -key key.pem -out csr.pem
- openssl x509 -req -days 365 -in csr.pem -signkey key.pem -out cert.pem
-
Create a
.envfile with the variables from the .env.example file -
Run with Docker Compose:
docker-compose up --build
- Start a chat with your Telegram bot
- Use
/startto see the welcome message - Connect your Threads account using
/connect - View your account info with
/account
Apache License 2.0 - See LICENSE file for details