⚡ Daily weather reports with OpenWeatherMap and Telegram Bot

1,345 views · ⚡ Personal Productivity

Description

Get automated weather updates delivered directly to your Telegram chat at scheduled intervals. This workflow fetches current weather data from OpenWeatherMap and sends formatted weather reports via a Telegram bot.

Use Cases

Prerequisites

Before setting up this workflow, ensure you have:

Setup Instructions

Step 1: Create OpenWeatherMap Account

  1. Go to OpenWeatherMap and sign up for a free account
  2. Navigate to the API keys section in your account
  3. Copy your API key (you’ll need this for the workflow configuration)

Step 2: Create Telegram Bot

  1. Open Telegram and search for @BotFather
  2. Start a chat and use the /newbot command
  3. Follow the prompts to create your bot and get the bot token
  4. Save the bot token securely

Step 3: Get Your Telegram Chat ID

  1. Start a conversation with your newly created bot
  2. Send any message to the bot
  3. Visit https://api.telegram.org/bot<YourBOTToken>/getUpdates in your browser
  4. Look for your chat ID in the response (it will be a number like 123456789)

Step 4: Configure the Workflow

  1. Import this workflow into your n8n instance
  2. Configure each node with your credentials:

Schedule Trigger Node

Get Weather Node

Send a text message Node

Customization Options

Location Settings

In the “Get Weather” node, modify the cityName parameter to change the location. You can specify:

Schedule Frequency

In the “Schedule Trigger” node, adjust the cron expression:

Message Format

In the “Format Weather” node, you can customize the message template by modifying the message variable in the function code. Current format includes:

Language Support

In the “Get Weather” node, change the language parameter to get weather descriptions in different languages:

Troubleshooting

Common Issues

Weather data not updating:

Messages not being sent:

Workflow not triggering:

Testing the Workflow

  1. Use the “Test workflow” button to run manually
  2. Check each node’s output for errors
  3. Verify the final message format in Telegram

Node Descriptions

Schedule Trigger

Automatically starts the workflow based on a cron schedule. Runs at specified intervals to fetch fresh weather data.

Get Weather

Connects to OpenWeatherMap API to retrieve current weather conditions for the specified location.

Format Weather

Processes the raw weather data and creates a user-friendly message with emojis and organized information.

Send a text message

Delivers the formatted weather report to your Telegram chat using the configured bot.

Additional Features

You can extend this workflow by:

Security Notes

Special thanks to Arkadiusz, the only person who supports me in n8n mission to make automation great again.

🔗 Nodes Used

Cron, Function, OpenWeatherMap, Telegram

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup