Skip to main content

Generate Images on Telegram πŸ€–πŸ–ΌοΈ from Text and Voice using Grok Imagine & Kie AI

Workflow preview

Workflow preview
100%
Generate Images on Telegram πŸ€–πŸ–ΌοΈ from Text and Voice using Grok Imagine & Kie AI preview
Open on n8n.io

1. Workflow Overview

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

Best for

  • Content Creation automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatopenrouter, n8n-nodes-base.stickynote, n8n-nodes-base.code, n8n-nodes-base.telegramtrigger, n8n-nodes-base.telegram, n8n-nodes-base.set, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.toolworkflow

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Davide Boizza.

Original n8n.io source

1.1 Workflow description

Title
Generate Images on Telegram πŸ€–πŸ–ΌοΈ from Text and Voice using Grok Imagine & Kie AI
Workflow name
Generate Images on Telegram πŸ€–πŸ–ΌοΈ from Text and Voice using Grok Imagine & Kie AI

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
  1. 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)
  1. 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
  1. Async Processing: The workflow uses Wait nodes to handle asynchronous image generation, polling Kie.ai for results via task IDs.

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

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Grok 4.1 Fast

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 2 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Code

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Get Message

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.1

Block 6 - Send a text message

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 7 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Get Text

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Switch2

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 10 - Run text to image

Type / Role
@n8n/n8n-nodes-langchain.toolWorkflow - toolWorkflow
Config choices
Version 2.2

Block 11 - Wait1

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 12 - Run image to image

Type / Role
@n8n/n8n-nodes-langchain.toolWorkflow - toolWorkflow
Config choices
Version 2.2

Block 13 - Wait2

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 14 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.4

Block 15 - Run Kei AI

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Block 16 - Run text to image1

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 17 - Run image to image1

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 18 - Result text to image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 19 - Result image to image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 20 - Get voice message

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 21 - Transcribe recording

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.7

Block 22 - Get image file

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 23 - Upload image

Type / Role
n8n-nodes-base.ftp - ftp
Config choices
Version 1

Block 24 - Set Image Url

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Showing the first 24 of 30 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Generate Images on Telegram πŸ€–πŸ–ΌοΈ from Text and Voice using Grok Imagine & Kie AI
Complexity advanced
Nodes 30
Categories Content Creation, AI Chatbot
Author Davide Boizza
Published 13 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13367/13367.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate Images on Telegram πŸ€–πŸ–ΌοΈ from Text and Voice using Grok Imagine & Kie AI do?

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

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, AI Chatbot use case.