This n8n workflow allows you to generate AI images using Nano Banana PRO through a Telegram bot interface, with optional automatic publishing to social media platforms.
Users interact with the workflow entirely via Telegram commands and forms. The workflow supports multiple image generation modes and can automatically enhance prompts, compress images, generate captions, and publish content to Facebook, Instagram, and X.
This template is especially useful for product visuals, lifestyle scenes, and content creation workflows where manual image generation and posting would otherwise be repetitive.
How it works
- A user sends a command to the Telegram bot (text-to-image, image-to-image, or multi-image fusion).
- The workflow collects the required inputs (text prompt, uploaded images, aspect ratio, quality).
- If enabled, an AI Agent enhances the user prompt before image generation.
- The workflow sends the request to Kie.ai, which runs the Nano Banana PRO image model.
- The workflow waits for the image generation task to complete and retrieves the result.
- The generated image is downloaded and sent back to the user via Telegram.
- Optionally, the image is compressed using TinyPNG.
- If social sharing is enabled:
- An AI Agent generates platform-optimized captions.
- The image and captions are published automatically to selected platforms (Facebook, Instagram, X) via Blotato.
How to use
- Create a Telegram bot using @BotFather and add the bot token to the Telegram Trigger credentials.
- Configure the required API credentials (see Requirements).
- Activate the workflow in n8n.
- Send a command to your Telegram bot:
/text_to_image
/image_to_image
/multi_image
- Follow the Telegram form prompts to generate and optionally publish images.
Requirements
The following services are required for the workflow to function:
- Telegram Bot – user interaction
- Kie.ai API – Nano Banana PRO image generation (Get access)
- Cloudinary – image hosting for uploaded files (Create an account)
- OpenAI API – prompt enhancement and caption generation
Optional services:
Customising the workflow
- You can disable image compression by removing the TinyPNG nodes.
- Social media auto-publishing can be disabled by removing the Blotato nodes.
- Prompt enhancement behavior can be adjusted in the AI Agent system prompt.
- Additional platforms or posting logic can be added after the caption generation step.
- The workflow can be adapted to other AI image models by replacing the Kie.ai API calls.
Notes
- This is a self-hosted n8n workflow.
- All API keys and credentials must be provided by the user.
- The workflow is modular and can be partially enabled depending on your use case.