How to Build a Telegram AI Chatbot with n8n (Step-by-Step Tutorial, No Coding)

:loudspeaker: Build Your Own Telegram AI Chatbot with n8n (Step-by-Step Guide + Video)

Hey everyone :waving_hand:

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 :movie_camera:: 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:

:small_blue_diamond: Steps to Create the Telegram AI Chatbot in n8n

  1. Prerequisites

    • Telegram account

    • n8n instance (Cloud or self-hosted)

  2. 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

  3. Create a New Workflow in n8n

    • Add Telegram Trigger node

    • Configure credentials → paste your Telegram API Token

    • Trigger: On Message

  4. 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

  5. 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

  6. 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

:light_bulb: Use Cases:

  • HR assistant to answer company policy questions

  • IT support bot

  • Customer support chatbot

  • Or extend it for any domain you like

:backhand_index_pointing_right: Give it a try and let me know what you build!

Would love to hear your feedback or see your chatbot ideas :rocket: