Skip to content

Easily send notifications from Google Colab to Telegram using a custom bot. This project provides straightforward setup instructions and code examples to integrate real-time messaging into your Colab workflows. Perfect for keeping track of long-running processes and results.

License

Notifications You must be signed in to change notification settings

KastoneX/Google-Colab-to-Telegram-Notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Google Colab to Telegram Notifications

This repository demonstrates how to send notifications from Google Colab to Telegram using a bot. Notifications are sent upon the completion of a cell's execution, allowing you to track the progress of your work seamlessly. Follow the steps below to get started.

Setup Guide

1. Create a Telegram Bot

  1. Open Telegram and search for @BotFather.
  2. Start a conversation with @BotFather by sending /start.
  3. Follow the instructions to create a new bot by sending /newbot.
  4. After naming your bot, you will receive an API token. Keep this token safe.

2. Retrieve Chat ID

To send messages, you need your chat ID. Use the following code to get it.

3. Send Notifications from Google Colab

Use the following function to send messages to your Telegram chat.

Example: Integrating with Google Colab

To integrate this with your Google Colab workflow, simply call the send_telegram_message function at desired points in your code to send updates or notifications. Here’s an example:

# Example of a Google Colab cell where you notify the completion of a process
send_telegram_message('Training completed! Check your results.')

Notes

  • Ensure your Telegram bot is active.
  • Test your setup by sending a few test messages.
  • Remember to handle your API token securely and do not expose it publicly.

Technologies Used

  • Python
  • requests
  • Telegram Bot API

License

This project is licensed under the MIT License - see the LICENSE file for details.

Authors

Acknowledgements

Special thanks to the Telegram Bot API documentation and the Python Requests library documentation for providing the necessary resources.


By following these steps, you'll be able to receive timely notifications from your Google Colab environment directly in your Telegram chat. Happy coding!

Get in touch

About

Easily send notifications from Google Colab to Telegram using a custom bot. This project provides straightforward setup instructions and code examples to integrate real-time messaging into your Colab workflows. Perfect for keeping track of long-running processes and results.

Topics

Resources

License

Stars

Watchers

Forks

Languages