# Generate Telegram Images with Magic Hour

Source: https://openflow.run/en/templates/generate-telegram-images-with-magic-hour/
Content language: en
Template revision: 9018120e802d4de0a097610157c565df858c0871

Creativity

Generate an image from a Telegram text message and send it back to the same chat.

[Use in Open Flow](https://console.openflow.run/flows?importUrl=https%3A%2F%2Fraw.githubusercontent.com%2Foomol-lab%2Fawesome-workflow-templates%2F9018120e802d4de0a097610157c565df858c0871%2Fworkflows%2Fgenerate-telegram-images-with-magic-hour%2Ftemplates%2Fgenerate-telegram-images-with-magic-hour.openflow.json)

*   [Open Flow JSON](https://raw.githubusercontent.com/oomol-lab/awesome-workflow-templates/9018120e802d4de0a097610157c565df858c0871/workflows/generate-telegram-images-with-magic-hour/templates/generate-telegram-images-with-magic-hour.openflow.json)
*   [n8n JSON](https://raw.githubusercontent.com/oomol-lab/awesome-workflow-templates/9018120e802d4de0a097610157c565df858c0871/workflows/generate-telegram-images-with-magic-hour/templates/generate-telegram-images-with-magic-hour.n8n.json)

![Generate Telegram Images with Magic Hour workflow in Open Flow](https://openflow.run/_astro/preview-light.Ct2IVu7W_Z16UCdn.webp)

Generate an image from a Telegram text message and send it back to the same chat.

## Setup

Connect the same Telegram bot to the trigger and **Send the image to Telegram**, and connect Magic Hour to both image nodes. In n8n install the Magic Hour community node, connect its API credential and connect the same Telegram bot to its trigger and send node. Activate one format; Telegram allows one active webhook per bot.

## Behavior

Send the bot a text description. The workflow sends that prompt to Magic Hour, requests one 640px square image using flux-2-klein and replies with the completed image in the same chat. Magic Hour provides a temporary image URL, which Telegram must be able to fetch. Prompts and generated images are shared with Magic Hour and Telegram.

Open Flow waits 10 seconds between at most 60 checks; request time can extend the run beyond ten minutes. n8n’s community node polls for roughly ten minutes. A failed, uncertain or timed-out generation may already have created a project; inspect Magic Hour before retrying. An uncertain Telegram send may already have succeeded; inspect the chat before retrying. Non-text updates do not generate an image.

Inspiration & credits

## Changes to the source

*   Use Magic Hour image generation because the original DALL·E models were retired. Replace the positional aggregate with the original message’s chat ID so replies go to the originating chat, including groups.

Adapted from [Image Creation with OpenAI and Telegram](https://github.com/enescingoz/awesome-n8n-templates/blob/827110332c21cbe000ab13f6d292d5adb1f1f8db/Telegram/Image%20Creation%20with%20OpenAI%20and%20Telegram.json) in [enescingoz/awesome-n8n-templates](https://github.com/enescingoz/awesome-n8n-templates).

Source collection notice: © 2024–2026 Enes Cingoz, [CC BY 4.0](https://github.com/enescingoz/awesome-n8n-templates/blob/827110332c21cbe000ab13f6d292d5adb1f1f8db/LICENSE). The source export does not identify a separate template author or license. See [repository licensing](https://github.com/oomol-lab/awesome-workflow-templates/blob/9018120e802d4de0a097610157c565df858c0871/README.md#licensing) for the scope of OOMOL contributions and third-party material.

## Apps used

*   [**magichour**`magichour`](https://console.openflow.run/connections/magichour)
*   [**Telegram Bot**`telegram`](https://console.openflow.run/connections/telegram)

## What you’ll need

*   Telegram bot connection
*   Magic Hour API connection

*   telegram
*   magic hour
*   image generation

[View on GitHub](https://github.com/oomol-lab/awesome-workflow-templates/blob/9018120e802d4de0a097610157c565df858c0871/workflows/generate-telegram-images-with-magic-hour/README.md)
