Telegram AI Chatbot

Telegram AI ChatbotTelegram Bots

This workflow turns a Telegram bot into an AI-powered chat assistant using OpenAI. It handles regular chat messages, a welcome /start command, and an image generation command (/image) and returns text or photos back to the user.

What You Can Do

  • Reply to user messages with GPT-based conversational responses (uses gpt-4 by default)
  • Send a localized welcome message when users send /start
  • Generate images from a text prompt using the /image command and send them as photos
  • Show typing or uploading actions while the bot processes requests

Quick Start

  1. Import this workflow to n8n
  2. Configure your credentials for Telegram Bot API and OpenAI API (set your OpenAI API key as the OpenAI credential)
  3. Optionally adjust the ‘Settings’ node values: model_temperature and token_length
  4. Activate the workflow and send a message to your Telegram bot to test