Skip to content

mshipilov5/TelegramToGoogleCalendar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TelegramToGoogleCalendar

📅 TelegramToGoogleCalendar

This project allows you to automatically analyze messages from Telegram and add events to Google Calendar using MistralAI via OpenRouter.


🚀 Features

  • 📩 Retrieve messages from Telegram
  • 🧠 Analyze text using MistralAI (via OpenRouter API)
  • 📅 Add events to your Google Calendar

⚙️ Setup and Configuration

1. 🔑 Get Telegram API ID and Hash

  1. Go to https://my.telegram.org/apps
  2. Log in using your phone number
  3. Open the API Development Tools section
  4. Create an application and obtain:
    • api_id
    • api_hash

2. 🧠 Get MistralAI API Key via OpenRouter

  1. Go to https://openrouter.ai
  2. Register and log in
  3. Open the API Keys section
  4. Copy your API key
  5. Make sure you are using the model:
    mistralai/mistral-7b-instruct
    

3. 📅 Configure Google Calendar API

  1. Go to Google Cloud Console
  2. Create a new project
  3. Enable Google Calendar API
  4. Go to Credentials and create an OAuth 2.0 Client ID:
    • Type: Desktop Application
    • Download credentials.json
  5. Place credentials.json in the root of the project

4. 🛠 Configure the Project

  1. In the project root, locate configTemplate.json
  2. Rename it to config.json
  3. Fill in your values:
{
  "telegram_api_id": "YOUR_API_ID",
  "telegram_api_hash": "YOUR_API_HASH",
  "openrouter_api_key": "YOUR_OPENROUTER_API_KEY"
}

▶️ Run the Project

  1. Install dependencies:
    pip install -r requirements.txt
  2. Start the main script:
    python main.py

📝 Notes

  • On the first run, a Google authorization window will appear — log in with your Google account.
  • The project requires a stable internet connection.

🤝 Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.


📜 License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages