Daily & On-demand Weather Reports with OpenWeatherMap to Telegram

Go to Workflow
0 views
Built by Abhishek Patoliya Abhishek Patoliya
Created on July 10, 2025

Description

This powerful n8n automation sends you daily weather updates directly to your Telegram chat using live data from OpenWeatherMap. It supports automatic daily updates and manual lookups via form input.

βœ… Prerequisites

Before you begin, make sure you have:

A working n8n instance (v1.0 or later recommended).
An account with OpenWeatherMap (free plan is sufficient).
A Telegram Bot created via @BotFather.
Your Telegram user ID or chat ID.

πŸ” API & Bot Setup

🧩 OpenWeatherMap API

Go to https://openweathermap.org/api
Sign up and verify your account.
Navigate to API Keys in your account dashboard.
Copy your API key (used later in the HTTP Request node).

πŸ€– Telegram Bot

Open @BotFather in Telegram.
Run /newbot and follow the prompts:

Choose a name and username for your bot.
You’ll get a bot token (copy this).
Start a chat with your new bot to activate it.
To get your Telegram User ID, use @userinfobot or an n8n Telegram Trigger node.

πŸ”„ Trigger Options

⏰ Schedule Trigger (Automatic)

Runs daily at 8:00 AM IST.
Ideal for consistent, passive updates.

πŸ“ Form Trigger (Manual)

Input πŸŒ† City and 🌍 Country manually.
Instantly receive weather info in Telegram.

🧠 How the Flow Works

Trigger Activated (Scheduled or Form)
City & Country fetched (default or from form)
HTTP Request sent to OpenWeatherMap with API key
Weather Data Parsed & Formatted:

πŸ“… Current Date
πŸ“ City & Country
🌀️ Weather Description
🌑️ Temperature (°C)
πŸ’§ Humidity (%)
🌬️ Wind Speed (m/s)
πŸ”Ό Atmospheric Pressure
πŸŒ… Sunrise Time (IST)
πŸŒ‡ Sunset Time (IST)
Message Sent to Telegram

🧰 Nodes Used

Schedule Trigger** – Runs every day at 8:00 AM IST
Form Trigger** – Accepts user input
Set Node** – Default city/country values and date formatting
HTTP Request** – Calls OpenWeatherMap API
Function Node** – Converts timestamps to IST
Telegram Node** – Sends formatted weather message

πŸ“¦ Example Telegram Output

πŸ“… Wednesday, 10 July 2025
🌀 Weather in Mumbai, IN:
Condition: Clear sky
Temperature: 30Β°C
πŸ’§ Humidity: 70%
🌬 Wind Speed: 3 m/s
πŸ”Ό Pressure: 1013 hPa
πŸŒ… Sunrise: 5:57:12 AM
πŸŒ‡ Sunset: 6:53:45 PM

πŸ› οΈ Customization Tips

πŸ™οΈ Change Default City/Country

Locate the Set Node (used before the API call).
Replace "Mumbai" and "IN" with your preferred location.
Or connect the Form Trigger input to allow dynamic values.

πŸ•— Change Schedule Time

Open the Schedule Trigger node.
Adjust to your preferred time zone and daily timing (e.g., 7 AM IST).

πŸ§ͺ Add Extra Data

OpenWeatherMap returns more fields like visibility, UV index, etc.
You can include these in your Telegram message via the Function Node and Set Node.

Nodes Used (2)

HTTP Request
n8n-nodes-base.httpRequest
Telegram
n8n-nodes-base.telegram