Top 200 ReposEXPLORER
Browse agents, categories and pages
Back to results
Planned, not doneThe source describes an intention, not a finished result.

Route Generated Media to Dedicated Telegram Channels

Overview

Build an n8n workflow that takes a request sent to your Telegram bot, generates an image or a spoken audio clip with the OpenAI node, and posts each kind of result to its own Telegram channel.

Problem or Objective

More in Content and Media

AI Agents and Models

Tools and Integrations

Tools
n8n · Telegram · OpenAI
Prerequisites
An n8n instance, a Telegram bot added to the target channels, Telegram credentials, and an OpenAI API key or n8n Cloud Gateway credits.

How It Works

Create a Telegram bot, add it to two channels you control (one for images, one for audio) and connect it to n8n with Telegram credentials. Start the workflow with the Telegram Trigger so it runs when you message the bot, for example image: a lighthouse at dusk, or voice: a 20-second welcome message. Add an OpenAI chat step that reads the request and returns the type and a cleaned-up prompt or script. Route on the type with a branching node (check n8n's Switch or If node docs for the options): one branch runs the OpenAI node's Generate an Image operation and then Telegram Send Photo to the image channel, the other runs Generate Audio and then Send Audio to the audio channel. If anyone other than you can read a channel, first send the result to your private chat with the bot and post it on only after you reply to approve it.

Implementation Workflow

Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.

  1. Choose the agentSet up n8n.
  2. Connect the toolsConnect the tools this workflow relies on: n8n, Telegram, OpenAI.
  3. Check the prerequisitesAn n8n instance, a Telegram bot added to the target channels, Telegram credentials, and an OpenAI API key or n8n Cloud Gateway credits.
  4. Gather your detailsCollect what the prompt asks for: Message sent to the bot, House style for images, Longest audio clip in seconds, Voice to use for audio.
  5. Run the starter promptPaste the starter prompt below into n8n and adapt it to your case.
  6. Check against the documentationCompare what you get with the documentation at docs.n8n.io before you rely on it.

Practical Starter Prompt: Sort a media request for the right channel

Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].

Preview
You receive one request sent to my Telegram bot: [Message sent to the bot]. Decide whether it asks for an image or for spoken audio. Return JSON with type set to image or audio, and either an image prompt in the style [House style for images] or a speech script of at most [Longest audio clip in seconds] seconds read in the voice [Voice to use for audio]. If the request is unclear, unsafe or asks for a real person's likeness or voice, return type set to reject with a short reason. Do not post anything yourself; the workflow sends results to my private chat first, and I approve before anything goes to a shared channel.

Use this in the OpenAI chat step before the branching node. Send rejects back to your private chat. For shared channels, keep the approve-before-posting step: the result goes to your private chat, and only your approving reply sends it on.

Expected Results and Benefits

This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.

This is a suggested workflow, not a reported outcome. The n8n Telegram node page lists Send Photo, Send Audio and other message operations and says the bot must be added to a channel to send to it. The OpenAI node page lists Generate an Image and Generate Audio. The AI Agent page covers tool-using chat steps. None of the cited pages documents the routing node, and none says anything about error handling or moderation, so test both branches with harmless requests first.

Limitations and Considerations

Each image and audio generation is billed by OpenAI unless you use n8n Cloud Gateway credits, which the OpenAI node page says can replace your own API key on n8n Cloud; check prices before running it often. Restrict the Telegram Trigger to your own chat so strangers cannot spend your credits, and keep the approval step for any channel others can read. Label synthetic voices as generated where your audience or local rules expect it, and follow OpenAI's usage policies for what you generate. Results depend on your setup and were not independently reproduced by Top 200 Repos.

GitHub Repositories

AI Agent Repository

Source code of the agent that does the work.

Official Website

The official site of the main tool or project in this use case.

Visit Website (opens in a new tab)n8n.io

Related Videos

About n8n-io/n8n

About n8n-io/n8n

Independent creators. Listing a video implies no endorsement, sponsorship or partnership.

Sources

  1. Telegram | Nodes | n8n Docs (opens in a new tab)

    Project documentation · docs.n8n.io · Undated · Source checked 27 Nov 2026, 07:07 UTC

    What this source supports
    • Send Audio file to the chat and display it in the music player.
    • To use most of the Message operations, you must add your bot to a channel so that it can send messages to that channel.
    • n8n provides a trigger node for Telegram.
  2. OpenAI | Nodes | n8n Docs (opens in a new tab)

    Project documentation · docs.n8n.io · Undated · Source checked 27 Nov 2026, 07:07 UTC

    What this source supports
    • n8n has built-in support for a wide range of OpenAI features, including creating images and assistants, as well as chatting with models.
    • On n8n Cloud, you can use the OpenAI node with Gateway credits instead of your own OpenAI API key.
Report a problem

More with n8n

Planned, not done

Support Customers Through Telegram Messages

An n8n workflow turns new customer emails and contact-form messages into tasks with draft replies, and sends each draft to the owner in Telegram with Approve and Decline buttons before anything goes out.

docs.n8n.ion8n-io/n8n
Planned, not done

Expand an Editorial Outline into an SEO-Ready Long Article

An n8n workflow passes an editor's outline through two Basic LLM Chain nodes: one writes a long draft section by section, the other returns structured search metadata for the editor to review.

docs.n8n.ion8n-io/n8n
Planned, not done

Combine Daily News, Mail, Calendar, and Weather Into One Digest

Build an n8n workflow that runs each morning, gathers headlines from RSS feeds, recent Gmail messages, today's Google Calendar events and the weather, and emails you one short digest.

docs.n8n.ion8n-io/n8n

View all: n8n