Telegram Weather Query Bot Workflow
This workflow provides users with a convenient real-time weather inquiry service through a Telegram bot, supporting weather information retrieval for multiple European capitals. Users can receive text and professional visualized weather data with simple chat commands. The bot intelligently recognizes commands, offers friendly prompts for invalid inputs, and provides timely feedback in case of errors, enhancing the interactive experience. Whether for personal inquiries, travel planning, or business reminders, this tool effectively meets various needs.

Workflow Name
Telegram Weather Query Bot Workflow
Key Features and Highlights
This workflow is built on a Telegram bot that enables users to obtain real-time weather information for multiple European capitals, including London, Berlin, Madrid, and Rome, via chat commands. A distinctive feature is that the weather data is delivered not only as text but also as professionally generated visualizations created using the R language’s ggplot2 package, enhancing the user experience. The bot intelligently recognizes commands, provides friendly prompts for invalid inputs, and promptly sends error messages to inform users of any issues during data retrieval or image generation.
Core Problems Addressed
Provides users with a convenient and intuitive real-time weather query service, eliminating the need for complex operations or switching between multiple platforms. By automating the workflow, it overcomes the traditional problem of dry and hard-to-interpret weather API responses, while improving the intelligence and user-friendliness of interactions.
Application Scenarios
- Quick weather checks for major European cities by individual users
- Travel enthusiasts planning trips with up-to-date weather conditions
- Internal corporate weather notification systems
- Educational and data visualization demonstration projects
Main Workflow Steps
- The user sends a message to the bot on Telegram, triggering the message listener node (Telegram Trigger).
- A Switch node evaluates the user’s command type:
- The /start command triggers a welcome greeting message.
- The /getweather command initiates the weather data retrieval process.
- Unrecognized commands return an error prompt.
- Upon a weather request, the bot sends a “please wait” message.
- The bot sequentially calls the OpenWeatherMap API for each city in a predefined list to fetch weather data.
- API responses are transformed into a simplified data structure and saved as CSV files.
- An R script processes the CSV data to generate weather data visualizations (dumbbell plots).
- The generated image files are read.
- The weather information images are sent to the user via the Telegram bot.
- If API calls or R script execution fail, corresponding error messages are sent to inform the user.
Involved Systems and Services
- Telegram API (for message interaction)
- OpenWeatherMap API (for real-time weather data)
- R environment and ggplot2 package (for generating weather data visualizations)
- Local file system (for storing intermediate CSV and image files)
- n8n automation platform (to integrate workflow nodes and enable automated execution)
Target Users and Value
- Individual users needing quick access to weather in major European cities
- Automation system administrators and developers using it as a demonstration case for multi-system integration
- Professionals in travel and transportation industries seeking a convenient weather query tool
- Data analysts and visualization enthusiasts learning practical applications of R scripting
This workflow allows users to effortlessly obtain visually appealing and intuitive weather information directly within Telegram, delivering a seamless one-stop intelligent weather query experience that significantly enhances interaction efficiency and service quality.