This workflow creates an AI-powered Telegram bot that allows users to generate and modify images using Grok Imagine models via the Kie AI API. --- Key Advantages 1. β Multi-Modal Input Support Users can interact using: Text Voice Images This makes the bot highly flexible and user-friendly. 2. β Intelligent AI Orchestration Instead of directly calling APIs, the workflow uses an AI agent that: Understands

This workflow creates an AI-powered Telegram bot that allows users to generate and modify images using Grok Imagine models via the Kie AI API. --- Key Advantages 1. β Multi-Modal Input Support Users can interact using: Text Voice Images This makes the bot highly flexible and user-friendly. 2. β Intelligent AI Orchestration Instead of directly calling APIs, the workflow uses an AI agent that: Understands intent Enhances prompts Chooses the correct tool automatically This dramatically improves output quality. 3. β Fully Automated Image Pipeline From user input to final image delivery: Upload Processing Generation Result retrieval Delivery via Telegram Everything is automated end-to-end. 4. β Asynchronous & Scalable Architecture The use of: Webhook callbacks Wait nodes Task polling Prevents timeouts and supports longer image generation tasks. 5. β Secure Access Control The Telegram ID validation ensures: Only authorized users can access the workflow. 6. β Modular & Extendable Design The workflow is built with: Tool-based architecture Separate image generation workflows Clear orchestration logic This makes it easy to extend with: Video generation Style presets Advanced editing tools Multi-user support 7. β Production-Ready Structure The workflow includes: Error handling guidelines Structured system prompts Memory handling Clear separation of concerns This makes it suitable for: Creative agencies AI SaaS products Marketing automation Telegram-based AI services --- How it works This workflow creates a Telegram bot that uses AI to generate and transform images through Grok Imagine models, with support for text, voice, and image inputs. 1. Telegram Input Handling: Users interact with the bot by sending messages, voice notes, or images. The workflow authenticates users based on their Telegram ID. 2. Input Processing: - Text messages β Directly sent to the AI agent - Voice messages β Transcribed using OpenAI Whisper, then converted to text - Images β Downloaded from Telegram, uploaded to an FTP server (BunnyCDN), and the public URL is generated 3. AI Agent Decision Making: The "Grok Imagine Agent" (powered by Grok 4.1 Fast model) analyzes user input and determines whether to: - Generate a new image from text description (text-to-image) - Transform an existing image using a prompt (image-to-image) 4. Tool Execution: The agent calls specialized workflow tools that trigger image generation via Kie.ai API: - Text-to-Image: Creates images from text prompts using "grok-imagine/text-to-image" model - Image-to-Image: Modifies existing images using "grok-imagine/image-to-image" model 5. Async Processing: The workflow uses Wait nodes to handle asynchronous image generation, polling Kie.ai for results via task IDs. 6. Result Delivery: Once images are generated, they're sent back to the user through Telegram messages. --- Setup Steps 1. Telegram Configuration: - Create a Telegram Bot via BotFather to get a bot token - Add your Telegram user ID in the "Code" node (replace XXX) - Configure Telegram credentials in n8n with your bot token 2. API Credentials: - OpenRouter: Sign up at OpenRouter.ai, get API key for Grok 4.1 Fast access - Kie.ai: Register at Kie.ai for free API key to access image generation models - OpenAI: Set up OpenAI API key for voice transcription (Whisper model) 3. FTP Server Setup: - Configure FTP server (BunnyCDN recommended) for image hosting - Update FTP credentials in n8n - Set the public URL path in the "Set Image Url" node (replace XXX) 4. Workflow Configuration: - Import the JSON workflow into n8n - Update all credential references to match your accounts - Verify webhook URLs are properly configured for callback handling - Test the workflow and activate when ready 5. Optional Customizations: - Adjust the system prompt in the "Grok Imagine Agent" node for different behavior - Modify image aspect ratios or other parameters in the HTTP Request nodes - Add additional tools for more functionality --- π Subscribe to my new YouTube channel. Here Iβll share videos and Shorts with practical tutorials and FREE templates for n8n. []( --- Need help customizing? Contact me for consulting and support or add me on Linkedin.
Download the workflow JSON file after purchase.
Open n8n β click the menu β Import from File.
Select the downloaded JSON and import.
Set up credentials for each node that requires them.
Click Execute Workflow to test, then activate.
Setup guide included
Purchase to unlock the full step-by-step guide
No reviews yet
Be the first to buy and share your experience.
Leave a review
Sign in to share your experience with this workflow.
Create a free account to purchase workflows.
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.