Automate Telegram AI Chat & Image Generation with NeurochainAI
Instantly generate AI text and images directly within Telegram, cutting content creation latency by over 90% and boosting user interaction.
Managing multiple AI platforms for text and image generation can disrupt your workflow. This n8n workflow integrates NeurochainAI directly into your Telegram bot, providing seamless AI-powered chat and instant image creation.

Documentation
NeurochainAI Telegram AI Assistant
This powerful n8n workflow transforms your Telegram bot into an intelligent AI assistant, capable of generating both insightful text responses and captivating images on demand using the NeurochainAI platform. Perfect for automating support, enhancing community engagement, or simply boosting your personal productivity.
Key Features
- Dynamic AI Text Generation: Instantly receive intelligent responses to questions, summaries, or creative prompts using advanced NeurochainAI language models like Meta-Llama-3.1.
- On-Demand AI Image Creation: Generate unique images from text descriptions with the /flux command, powered by NeurochainAI's text-to-image capabilities.
- Seamless Telegram Integration: Interact with the AI directly through private messages, group mentions, or specific commands within your Telegram chat.
- Real-time Feedback & Error Handling: Users receive instant "typing" indicators and clear messages for processing, short prompts, or API errors.
- Customizable AI Models: Easily switch between various NeurochainAI text and image models to suit your specific needs (e.g., flux1-schnell-gguf for images).
How It Works
The workflow begins when your Telegram bot receives a message. It intelligently routes the message based on its content:
- For AI Text Responses: If the message is a direct message or mentions the bot in a group, the workflow sends a "typing..." action. It then forwards the user's prompt to the NeurochainAI REST API (e.g., Meta-Llama-3.1-8B-Instruct-Q6_K.gguf model) for text generation. The AI's response is then sent back to the user in Telegram.
- For AI Image Generation: If the message starts with /flux [prompt], the command prefix is removed. A temporary "⌛" message is sent to indicate processing. The cleaned prompt is sent to the NeurochainAI Flux API for text-to-image generation (e.g., flux1-schnell-gguf model). Once the image URL is received, the workflow downloads the image and sends it back to the user in Telegram with the original prompt as a caption. The temporary "⌛" message is then deleted.
- Robust Error Management: Both text and image generation paths include specific error handling to inform the user about issues like short prompts or worker unavailability, providing actionable feedback.