Telegram Weather Bot

Telegram Weather BotTelegram Bots

What You Can Do

  • Handle Telegram commands (/start and /getweather) and route requests using a Switch node ✅
  • Fetch current weather for a list of European capitals from the OpenWeatherMap API and transform the response into a CSV for processing ✅
  • Run an R script (ggplot2) to create a visualization, save and send the generated image back to the Telegram user, with error handling for API and R failures ✅

Quick Start

  1. Import this workflow into n8n.
  2. Configure your Telegram credentials (bot token) in n8n.
  3. Set your OpenWeatherMap API key in the “Get weather data” httpRequest node (replace YOUR_API_KEY placeholder).
  4. Ensure R and required packages (ggplot2) are installed on the host where n8n can execute the Rscript command, and that the referenced R script and output folder exist.
  5. Activate the workflow and test by sending /start and /getweather to the Telegram bot.
Flownerd