Build Your Own Telegram AI Chatbot with n8n (Step-by-Step Guide + Video)
Hey everyone ![]()
I just published a tutorial on how to create a Telegram AI chatbot powered by n8n and OpenAI.
You can watch the full video here
: https://www.youtube.com/watch?v=mmdppi7VvDU
JSON workflow to start instantly: https://s3.ap-southeast-1.amazonaws.com/automatewith.me/n8n-workflow-json/My+Telegram+AI+Agent+Chatbot.json
For those who prefer to read, here’s a detailed step-by-step guide:
Steps to Create the Telegram AI Chatbot in n8n
-
Prerequisites
-
Telegram account
-
n8n instance (Cloud or self-hosted)
-
-
Create a Telegram Bot
-
Open Telegram → search for BotFather
-
Use /newbot command to create a bot
-
Set a name & username (must end with bot)
-
Copy the API Token provided
-
-
Create a New Workflow in n8n
-
Add Telegram Trigger node
-
Configure credentials → paste your Telegram API Token
-
Trigger: On Message
-
-
Add an AI Agent Node
-
Use the AI Agent node
-
Select a chat model (e.g., OpenAI GPT-4.1)
-
Write a simple prompt (e.g., “Answer HR-related questions”)
-
Input: pass user’s message from the Telegram Trigger
-
-
Send a Response Back to Telegram
-
Add Telegram “Send Message” node
-
Use the same credentials
-
Chat ID: map from the Telegram Trigger
-
Text: output of the AI Agent node
-
-
Test Your Chatbot
-
Go to your Telegram bot and click Start
-
Send a message (e.g., “Hello” or “What is the onboarding process?”)
-
The bot should reply instantly with an AI-generated answer
-
Use Cases:
-
HR assistant to answer company policy questions
-
IT support bot
-
Customer support chatbot
-
Or extend it for any domain you like
Give it a try and let me know what you build!
Would love to hear your feedback or see your chatbot ideas ![]()