DEV Community

Bastullah Batas
Bastullah Batas

Posted on

Building an AI-Powered Weather Agent using n8n, Groq LLM & Telegram

Automating everyday tasks with AI Agents has never been easier. Recently, I built an end-to-end intelligent weather assistant using n8n, Groq AI (LLM), and Telegram.

In this article, I'll break down the workflow architecture, how the AI agents process intent, and how you can replicate this project.

🌐 Project Overview
Instead of simple keyword matching, this bot processes natural language queries from Telegram, extracts context using Groq AI, fetches live weather data via HTTP nodes, and formats the output into readable responses.

πŸ—οΈ Architecture & Workflow Breakdown
Here is how data flows through the n8n pipeline:

Telegram Trigger: Listens for incoming user messages in natural language (e.g., "Is it going to rain in Dhaka today?").

AI Agent (Groq Chat Model): Parses the user prompt, identifies the location, and extracts parameters.

HTTP Request Nodes: Makes dynamic API calls to fetch real-time weather metrics from an external Weather API.

Merge Node (chooseBranch): Manages data routing and joins parallel processing branches.

Secondary AI Agent: Formats raw API JSON data into a clear, user-friendly markdown response.

Telegram Send Message Node: Delivers the formatted answer back to the user.

πŸ› οΈ Tech Stack
Workflow Engine: n8n (Cloud / Self-hosted)

LLM Model: Groq Chat Model

Data Sources: External Weather API via HTTP Request Node

Interface: Telegram Bot API

πŸš€ Getting Started
If you want to try this out yourself:

Clone the repository from GitHub: Your Repository Link

Import the workflow.json into your n8n instance.

Set up credentials for Telegram Bot, Groq API, and your Weather API Key.

Activate the workflow and test it out on Telegram!

πŸ’¬ Final Thoughts & Links
Building multi-agent workflows with low-code platforms like n8n combined with fast LLMs like Groq unlocks endless automation potential.

πŸ“« Let's Connect on LinkedIn: www.linkedin.com/in/bastullah-batas-54ab23335

Feel free to drop any questions or feedback in the comments below!

Top comments (0)