Build a Telegram AI Chatbot with Image Generation
detail.loadingPreview
This n8n workflow integrates Telegram with OpenAI to create an AI chatbot capable of chatting and generating images based on user prompts. It uses the Telegram Trigger, Settings, and OpenAI nodes for advanced interaction.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow allows you to build a powerful Telegram bot that leverages AI for both conversational chat and image generation. It starts with a Telegram Trigger node to capture incoming messages. The PreProcessing and Settings nodes prepare the message data and define bot parameters like system commands and temperature. The CheckCommand node intelligently routes messages: handling the /start command with a Greeting node, general chat with the Chat_mode node, and image generation requests with the Create an image node. For unsupported commands, an error message is sent. The workflow also includes a Send Typing action node to provide visual feedback to the user during processing.
Key Features
- Integrates Telegram with OpenAI for AI-powered responses.
- Supports both conversational chat and AI image generation.
- Handles specific commands like
/startfor greetings. - Utilizes the
CheckCommandnode for flexible message routing. - Configurable AI parameters for temperature and token length.
- Provides user feedback with a typing indicator.
How To Use
- Set up your Telegram bot and OpenAI API credentials in n8n.
- Configure the
Telegram Triggernode with your bot token. - Customize the
Settingsnode with your desired system prompt, temperature, and token length. - Adjust the rules in the
CheckCommandnode to define how different commands are handled. - Connect the output of the
CheckCommandnode to the appropriate AI and Telegram nodes (e.g.,Chat_mode,Greeting,Create an image,Send error message). - Ensure the
Text reply,Send image, andSend error messagenodes are configured to send responses back to the correct Telegram chat ID.
Apps Used
Workflow JSON
{
"id": "f8914562-d967-4f3b-93bd-d6cf66ee269e",
"name": "Build a Telegram AI Chatbot with Image Generation",
"nodes": 0,
"category": "Messaging Automation",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: f8914562-d967...
About the Author
N8N_Community_Pick
Curator
Hand-picked high quality workflows from the global community.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Automate Local Business Outreach with AI-Powered Yelp Scraper
This workflow automates the process of scraping local business details from Yelp using AI, then leverages that data to send personalized partnership proposals via Gmail. It's perfect for sales and marketing teams looking to streamline lead generation and outreach campaigns.
Automate Getty Images Editorial Search & CMS Integration
This n8n workflow automates searching for editorial images on Getty Images, extracts key details and embed codes, and prepares them for seamless integration into your Content Management System (CMS), streamlining your content creation process.