AI Video and Image Generator from Telegram Input - n8n Workflow

Use this comprehensive n8n workflow to automatically generate high-quality AI images (Nano Banana) and Veo-3 videos directly from text or voice messages sent via Telegram. Leverage n8n templates and OpenAI for transcription and prompt engineering.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Creators and developers looking to deploy a seamless, chat-based AI media generation service.

  • Users who need advanced prompt engineering tools integrated into their messaging applications.

  • Anyone seeking ready-to-use n8n templates for complex multi-step AI automation.

  • Technical users wanting to integrate external APIs like Kie AI (Nano Banana/Veo-3) into a single n8n node.

Overview

This advanced n8n workflow solves the problem of needing a multi-step, sophisticated pipeline for generating visual AI content on demand. Instead of manually interacting with several APIs, users simply send a message (text or audio) to a Telegram bot. The core value of this n8n template lies in its complexity handling: it first transcribes audio using OpenAI, then utilizes a powerful AI Agent to structure the input into two specific prompts (one for image, one for video). It then runs concurrent image and video generation processes, complete with polling loops using the n8n node functionality, ensuring that both media types are generated, downloaded, and delivered back to the user via Telegram. This entire process is orchestrated seamlessly within a single, robust n8n workflow.

How it Works

The automated process begins with the n8n trigger:


  1. Initiation: The n8n workflow starts when the Telegram Trigger node receives a new message.

  2. Input Classification: A Switch n8n node determines if the input is an audio recording (voice message) or plain text.

  3. Preprocessing (Audio): If audio is detected, the Download Audio1 Telegram n8n node fetches the file. The Transcribe a recording (OpenAI) n8n node converts the voice note into text. This text is then standardized by a Set n8n node.

  4. Preprocessing (Text): If text is detected, it is standardized directly by a Set n8n node.

  5. Prompt Engineering: The standardized text feeds into the AI Agent n8n node, powered by an OpenAI Chat Model and Structured Output Parser. This crucial step transforms the single user input into two distinct, high-quality prompts: promptImage and promptVideo.

  6. Image Generation (Nano Banana): The promptImage is sent to the Kie AI endpoint via an HTTP Request n8n node (Image Gen (Nano Banana)). The workflow enters a polling loop using the Wait1 and Get Image nodes until the image is confirmed by the Image created condition.

  7. Thumbnail & Notification: Once the image is ready, the Download Image n8n node retrieves the binary file. The Telegram: Send Photo node sends this thumbnail to the user, confirming the prompt success and signaling that the video rendering has begun.

  8. Video Generation (Veo-3): The Generate Video n8n node (HTTP Request) uses the promptVideo to initiate the Veo-3 generation. A longer polling loop is established using the Wait (120s) and Get Video nodes.

  9. Video Delivery: Once the Video created condition is met, the Download Video n8n node fetches the final video file. Finally, the Telegram: Send Video n8n node delivers the result, completing the n8n workflow.

Installation Guide

To deploy this powerful n8n workflow, follow these setup steps:


  1. Import: Copy the provided JSON data and paste it into your n8n instance via the 'Import Workflow' function.

  2. Credentials: You will need to configure the following credentials:

Telegram API: Set up your Telegram Bot credentials for the Telegram Trigger and all Telegram action nodes.
OpenAI API: Configure your OpenAI credentials for the transcription and the prompt generation AI Agent n8n node.
* Kie AI API: Update the Image Gen (Nano Banana), Get Image, Generate Video, and Get Video HTTP Request nodes with your required API keys (Authorization Bearer tokens).

  1. Webhooks: Ensure the Telegram Trigger webhook is properly exposed and linked to your bot.

  2. Chat IDs: Update the hardcoded Chat IDs in the Telegram: Send Photo and Telegram: Send Video n8n nodes to ensure messages are sent to the correct recipient (or dynamically retrieve the sender's ID from the initial trigger data).

Node Details


  • Telegram Trigger (n8n trigger): Starts the n8n workflow upon receiving a message (text or voice) from the configured Telegram Bot.

  • Switch: A core logic n8n node used to branch the workflow based on whether the incoming message contains voice data or text data.

  • Download Audio1 (Telegram n8n node): Downloads the voice recording file from Telegram.

  • Transcribe a recording (OpenAI n8n node): Converts the downloaded audio file into text using OpenAI's transcription service.

  • AI Agent (LangChain n8n node): Takes the resulting text and, guided by the system message and connected OpenAI Chat Model, generates structured JSON output containing separate promptImage and promptVideo fields. This ensures optimal input for the next generation steps.

  • Image Gen (Nano Banana): An HTTP Request n8n node that calls the Kie AI API to start the image generation process using the generated promptImage.

  • Wait1 & Get Image: Part of the polling mechanism. Wait1 pauses the n8n workflow, and Get Image checks the status of the generation task.

  • Image created (If n8n node): Checks if the image generation task has completed successfully (HTTP code 200).

  • Download Image: Retrieves the binary data of the generated image.

  • Telegram: Send Photo: Sends the generated image thumbnail back to the user, providing immediate feedback.

  • Generate Video: An HTTP Request n8n node that initiates the Veo-3 video generation using the promptVideo.

  • Wait & Get Video: The video generation polling mechanism. The Wait n8n node pauses the execution for 120 seconds before Get Video checks the status.

  • Download Video: Retrieves the final Veo-3 video file.

  • Telegram: Send Video: The final action n8n node, sending the video to the user.

Related n8n Workflows

Paid

Nodes: 12 Nodes
Updated: December 26 2025
View all
Created by

👋 Hi, I’m Sulieman – Founder of aufCopilot.de . I build custom n8n workflows, automations & AI integrations to help businesses save time and scale smarter. I share templates, answer questions and love exploring creative use cases – from lead generation to data workflows and AI-powered automations. 🚀 Always happy to connect, learn and contribute to the community. Although my profile is in English, I am a native German speaker and happy to work in both German and English projects.

Featured*