📅 TelegramToGoogleCalendar
This project allows you to automatically analyze messages from Telegram and add events to Google Calendar using MistralAI via OpenRouter.
- 📩 Retrieve messages from Telegram
- 🧠 Analyze text using MistralAI (via OpenRouter API)
- 📅 Add events to your Google Calendar
- Go to https://my.telegram.org/apps
- Log in using your phone number
- Open the API Development Tools section
- Create an application and obtain:
api_idapi_hash
- Go to https://openrouter.ai
- Register and log in
- Open the API Keys section
- Copy your API key
- Make sure you are using the model:
mistralai/mistral-7b-instruct
- Go to Google Cloud Console
- Create a new project
- Enable Google Calendar API
- Go to Credentials and create an OAuth 2.0 Client ID:
- Type: Desktop Application
- Download
credentials.json
- Place
credentials.jsonin the root of the project
- In the project root, locate
configTemplate.json - Rename it to
config.json - Fill in your values:
{
"telegram_api_id": "YOUR_API_ID",
"telegram_api_hash": "YOUR_API_HASH",
"openrouter_api_key": "YOUR_OPENROUTER_API_KEY"
}- Install dependencies:
pip install -r requirements.txt
- Start the main script:
python main.py
- On the first run, a Google authorization window will appear — log in with your Google account.
- The project requires a stable internet connection.
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.