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
Import this workflow into n8n.
Configure your Telegram credentials (bot token) in n8n.
Set your OpenWeatherMap API key in the “Get weather data” httpRequest node (replace YOUR_API_KEY placeholder).
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.
Activate the workflow and test by sending /start and /getweather to the Telegram bot.