A Python script that fetches tomorrowβs rain forecast using WeatherAPI and sends an alert to a Telegram chat via a bot.
π Support This Project If you found this project useful or want to support its development, consider contributing:
Every little bit helps! π
- βοΈ Gets tomorrowβs rain forecast based on your city (latitude & longitude).
- π€ Sends formatted alerts to a Telegram bot chat.
- π¦οΈ Custom message formatting based on chance of rain.
- π Designed for daily scheduled use (e.g., via GitHub Actions or cron).
- Fetches weather forecast using
WeatherAPI. - Extracts the chance of rain for tomorrow.
- Crafts a friendly, emoji-based message.
- Sends it to your Telegram chat using the Telegram Bot API.
Before running the script, set the following environment variables:
| Variable Name | Description |
|---|---|
OWM_API_KEY |
Your weatherapi.com API key |
LAT_LONG |
Location in "latitude,longitude" format (e.g. xxxxx,xxxxx) |
XLSXRAIN_BOT_TOKEN |
Your Telegram bot token (from @BotFather) |
XLSXRAIN_CHAT_ID |
Chat ID where messages will be sent |
π¦οΈ Hmmm... Skyβs feeling moody π«οΈ β 35% chance of rain in IN YOUR AREA tomorrow!
Keep a hoodie handy just in case πβοΈ
Sanjay XLSX
π Linktree