Send Image(s) π½
Push your finished renders to Telegram β no more babysitting the queue
- bot
- IMAGE
- trigger
- message
- message_id
- trigger
The whole appeal of wiring Telegram into ComfyUI is being able to walk away from the machine and still know when a job is done. This is the node that makes that real: it takes whatever IMAGE tensor your graph produced and drops it into a Telegram chat, so you can leave a long batch running and check your phone instead of your screen.
It's an output node from the ComfyUI Telegram Suite pack - the same one that gives you Send Audio, Send Video, and the message-edit nodes. It's the node most people install the pack for.
How it works
The node converts your image tensor to bytes with Pillow (choosing the format from the format dropdown - PNG, WEBP, or JPG), then calls Telegram's sendPhoto, sendMediaGroup, or sendDocument API over HTTP. The choice depends on two things: whether the input IMAGE holds one frame or a batch, and how you've set group and send_as_file.
- Single image β one
sendPhotocall (orsendDocumentifsend_as_fileis True, which skips Telegram's compression). - Batch +
groupTrue β one media group, i.e. a scrollable album in the chat. - Batch +
groupFalse β each image sent as its own message.
One real constraint: Telegram caps media groups at 10 items. Feed it an 11-frame batch with group on and the API will reject it - keep batches at 10 or under, or set group False.
Inputs and outputs that matter
You'll set surprisingly few of these. bot and chat_id come from a Telegram Bot π½ node (that's your token and target chat, configured once in the pack's config.json). After that:
IMAGE- the render. Wire it straight from a VAE Decode or your last preview node.group(default True) - album vs. separate messages for batches.send_as_file(default False) - send as a raw file instead of an inline photo. Handy if Telegram's photo compression is eating your details.format- PNG/WEBP/JPG for the bytes.caption,parse_mode- text under the image;parse_modesupportsNone,HTML,Markdown,MarkdownV2.has_spoiler- blur the preview until tapped. Optional but fun.message_thread_id- target a specific forum topic (-1means the main chat).
Outputs: message (the raw API response as a DICT), message_id (an INT you can feed into an edit node later), and a trigger passthrough. One gotcha the README calls out: with a batch, only the last image's message_id is returned.
Installation
Everything in this pack installs together. Easiest: ComfyUI Manager β search "ComfyUI Telegram Suite" β install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/SwissCore92/comfyui-telegram-suite.git
cd comfyui-telegram-suite
pip install -r requirements.txt
Then the part people skip: open ComfyUI/user/default/telegram-suite/config.json and add your bot tokens under "bots" and chat IDs under "chats", then restart again. There are no model downloads - dependencies are just httpx, colorama, plus numpy/pillow/torchaudio you likely already have.
Troubleshooting
- "Telegram bot token ... was not found" - the pack auto-creates the config file with placeholder values on first run. Open it, replace the placeholders, restart.
- Nothing arrives / lands in the wrong place - double-check the
chat_idyou put in config. Group chats use negative IDs; if you got0from the template, that's the placeholder, not a real chat. - Sends are silent -
disable_notificationdefaults toTrue, so you won't get pinged. Flip it if "check my phone" is the whole point. - The bot token sits in plaintext in
config.json- treat it like a password, and don't commit it anywhere.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| bot | TELEGRAM_BOT | Telegram bot instance | |
| chat_id | INT | Unique identifier for the target chat | |
| IMAGE | IMAGE | the image(s) to send | |
| caption | STRING | Media caption, 0-1024 characters after entities parsing | |
| parse_mode | COMBO | Mode for parsing entities in the photo caption. See https://core.telegram.org/bots/api#formatting-options for more details. | |
| show_caption_above_media | BOOLEAN | false | Pass True, if the caption must be shown above the message media |
| has_spoiler | BOOLEAN | false | Pass True if the media needs to be covered with a spoiler animation |
| disable_notification | BOOLEAN | true | Sends the message silently. Users will receive a notification with no sound. |
| protect_content | BOOLEAN | false | Protects the contents of the sent message from forwarding and saving |
| group | BOOLEAN | true | Pass True to send multiple media as media group |
| send_as_file | BOOLEAN | false | Pass True to send the media as file without compression |
| file_name | STRING | image | the file name for this media |
| format | COMBO | image format | |
| message_thread_id | INT | -1-1β9223372036854776000 | Unique identifier for the target message thread of the forum topic (-1 = None) |
| triggeropt | * | Optional trigger to enforce execution order |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| message | DICT | β |
| message_id | INT | β |
| trigger | * | β |