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