AutomationFlowsAI & RAG › AI-Powered Telegram Chatbot

AI-Powered Telegram Chatbot

Original n8n title: Telegram (agent)

Telegram. Uses agent, telegramTrigger, telegram, lmChatOpenAi. Event-driven trigger; 4 nodes.

Event trigger★★☆☆☆ complexityAI-powered4 nodesAgentTelegram TriggerTelegramOpenAI Chat
AI & RAG Trigger: Event Nodes: 4 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow follows the Agent → OpenAI Chat recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "0f5aae97-3819-4704-ada2-abbcf14cea5f",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        20,
        380
      ],
      "parameters": {
        "text": "=Respond to this as a helpful assistant with emojis:  {{ $json.message.text }}",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 1.8
    },
    {
      "id": "9f828f62-b587-43be-a47f-b2500e36bd9c",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -220,
        380
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "abb92991-faee-4678-9038-7555f694acb1",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        380,
        380
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b20244ba-e15d-4f7f-939f-1c9d8474743a",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -80,
        600
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Telegram. Uses agent, telegramTrigger, telegram, lmChatOpenAi. Event-driven trigger; 4 nodes.

Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow is perfect for anyone who wants to receive AI-powered research summaries directly on Telegram. Ideal for people asking frequent product, tech, or decision-making questions and want up-to

Agent, Lm Chat Deep Seek, Memory Buffer Window +4
AI & RAG

QuantumDefender AI is a next-generation intelligent cybersecurity assistant designed to harness the symbolic strength of quantum computing’s promise alongside cutting-edge AI capabilities. This sophis

OpenAI Chat, Agent, Memory Buffer Window +7
AI & RAG

This workflow triggers on Telegram updates, analyzes messages with an AI Agent using MCP tools, and sends notifications via Gmail and Telegram.

OpenAI Chat, N8N Nodes Mcp, Memory Buffer Window +4
AI & RAG

Use cases are many: Let users book, check, reschedule, or cancel meetings directly from Telegram. Perfect for solopreneurs, agencies, or teams who want an AI-powered assistant that prevents double-boo

Telegram Trigger, Agent, Gmail Tool +5
AI & RAG

Telegram AI Langchain bot. Uses lmChatOpenAi, memoryBufferWindow, telegram, executeWorkflowTrigger. Event-driven trigger; 12 nodes.

OpenAI Chat, Memory Buffer Window, Telegram +5