Latenode

Automate Telegram AI image generation and social media posting

This n8n workflow allows users to generate AI-powered images and visuals through a Telegram bot interface, with optional automatic publishing to popular social media platforms like Facebook, Instagram, and X. Users can create text-to-image, image-to-image, and multi-image fusion scenes, leveraging the Nano Banana PRO AI model.

The workflow handles image enhancement, compression, and social media caption generation to streamline the content creation and distribution process. This is a self-hosted solution that requires integrations with Telegram, Kie.ai, Cloudinary, OpenAI, and optionally TinyPNG and Blotato. It is particularly useful for product visuals, lifestyle scenes, and content creation workflows where manual image generation and posting would be repetitive.

Updated Apr 2, 2026Est. run: 46sEst. cost: $0.0029
How Latenode estimates time and cost

Latenode bills workflow runs in credits: 1 credit = 30 seconds of processing. Minimum charge per run depends on your plan. Plug-and-Play (PnP) AI nodes are billed separately—each PnP token is $1 USD, charged pay-as-you-go at vendor cost plus a small processing fee, with no API keys required.

Full pricing — how credits work →
Video, audio & media

Workflow preview

What this template does

  • Generates AI-powered images via Telegram bot
  • Publishes images to social media platforms
  • Leverages Nano Banana PRO AI model for text-to-image, image-to-image, and multi-image fusion
  • Enhances, compresses, and generates captions for images
  • Requires integrations with Telegram, Kie.ai, Cloudinary, OpenAI, and optionally TinyPNG and Blotato

How it works

1
Trigger

Receive Telegram Commands

The workflow listens for user commands from the Telegram bot, triggering the image generation process.

2
AI

Enhance Text Prompt

The user's image generation prompt is optionally passed through an OpenAI language model to improve the quality and clarity of the request.

3
AI

Generate AI Image

The enhanced prompt is used by the Nano Banana PRO AI model to generate the requested image.

4
Action

Store Generated Image

The AI-generated image is uploaded to Cloudinary for storage and further processing.

5
Action

Compress Image

The image is optimized for file size using the TinyPNG compression service.

6
AI

Generate Social Captions

An OpenAI language model is used to create platform-optimized captions for the image.

7
Action

Publish to Social Media

The compressed image and generated captions are distributed to the user's chosen social media platforms (Facebook, Instagram, and X) using the Blotato integration.

Setup guide

1

Add Telegram Bot Credential

In the Latenode Credentials panel, add a new credential for your Telegram bot. Provide the bot token received from the BotFather.

2

Configure Kie.ai API Connection

In the Latenode Credentials panel, add a new credential for the Kie.ai API. Provide the API key and any other required connection details.

3

Set up Cloudinary Integration

In the Latenode Credentials panel, add a new credential for the Cloudinary service. Provide the cloud name, API key, and API secret.

4

Add OpenAI API Credential

In the Latenode Credentials panel, add a new credential for the OpenAI API. Provide the API key.

5

Configure Optional Integrations

If you want to use the TinyPNG compression or the Blotato social media publishing features, add the corresponding credentials in the Latenode Credentials panel.

Requirements

Telegram bot setup with the BotFather to obtain the bot token
Kie.ai API key for accessing the Nano Banana PRO AI model
Cloudinary account and cloud name for storing and optimizing generated images
OpenAI API key for generating image captions and other text-based content

FAQ

Common questions about this template

Each run uses credits on your Latenode plan. We charge for processing time (1 credit = 30 seconds). Your actual cost depends on your plan and how long the run takes. See pricing plans for plans and how credits work.

More templates

You might also like

Browse all templates →
Video, audio & media

Automatically upload YouTube videos with AI-generated metadata

This workflow automates the process of uploading videos to YouTube, including generating optimized metadata such as titles, descriptions, and tags using AI-powered analysis of video transcripts. It monitors a designated Google Drive folder for new video uploads, automatically retrieves the videos, uploads them to YouTube, and applies the generated metadata without manual intervention. The workflow is designed for content creators, marketing teams, and channel managers who want a simple, hands-off solution to upload videos and automatically generate optimized metadata.

15s$0.0009
Video, audio & media

Automate Google Drive to YouTube video publishing

This automation allows users to easily upload new videos from their Google Drive folders to their YouTube channel. It works by monitoring a specified Google Drive folder for any new video files, and then automatically uploading those files to the user's connected YouTube channel. This integration simplifies the process of sharing video content across the two platforms, saving users time and effort. The key steps involved are: 1) Detecting new video files in a Google Drive folder, and 2) Uploading those files to the user's YouTube channel with the option to customize metadata like title and description.

7s$0.0004
Video, audio & media

Automatically sync new YouTube channel videos to an RSS feed

This automation allows users to monitor a specific YouTube channel for new video uploads and automatically generate an RSS feed containing the video details. The feed can then be used in feed readers or other automation tools to stay up-to-date on the latest content from the YouTube channel. The workflow involves a 'New Video in Channel' trigger that watches for new videos, and a 'Create Item in Feed' action that generates a new feed item with the video's title, description, and source URL. This integration leverages YouTube and Zapier's RSS functionality to provide a convenient way for users to track and distribute their YouTube channel's content.

9s$0.0006