Nodes/ComfyUI Telegram Suite/Send Image(s) πŸ”½
ComfyUI Node

Send Image(s) πŸ”½

Push your finished renders to Telegram β€” no more babysitting the queue

By SwissCore92Β·Created about a year agoΒ·Updated 2 months agoΒ· 9
Send Image(s) πŸ”½
  • bot
  • IMAGE
  • trigger
  • message
  • message_id
  • trigger
β—„chat_idβ€”β–Ί
β—„captionβ–Ί
β—„parse_modeβ–Ύβ–Ί
β—„show_caption_above_mediafalseβ–Ί
β—„has_spoilerfalseβ–Ί
β—„disable_notificationtrueβ–Ί
β—„protect_contentfalseβ–Ί
β—„grouptrueβ–Ί
β—„send_as_filefalseβ–Ί
β—„file_nameimageβ–Ί
β—„formatβ–Ύβ–Ί
β—„message_thread_id-1β–Ί

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 sendPhoto call (or sendDocument if send_as_file is True, which skips Telegram's compression).
  • Batch + group True β†’ one media group, i.e. a scrollable album in the chat.
  • Batch + group False β†’ 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_mode supports None, HTML, Markdown, MarkdownV2.
  • has_spoiler - blur the preview until tapped. Optional but fun.
  • message_thread_id - target a specific forum topic (-1 means 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_id you put in config. Group chats use negative IDs; if you got 0 from the template, that's the placeholder, not a real chat.
  • Sends are silent - disable_notification defaults to True, 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.
CategoryTelegram Suite πŸ”½

Inputs (15)

NameTypeDefaultDescription
botTELEGRAM_BOTTelegram bot instance
chat_idINTUnique identifier for the target chat
IMAGEIMAGEthe image(s) to send
captionSTRINGMedia caption, 0-1024 characters after entities parsing
parse_modeCOMBOMode for parsing entities in the photo caption. See https://core.telegram.org/bots/api#formatting-options for more details.
show_caption_above_mediaBOOLEANfalsePass True, if the caption must be shown above the message media
has_spoilerBOOLEANfalsePass True if the media needs to be covered with a spoiler animation
disable_notificationBOOLEANtrueSends the message silently. Users will receive a notification with no sound.
protect_contentBOOLEANfalseProtects the contents of the sent message from forwarding and saving
groupBOOLEANtruePass True to send multiple media as media group
send_as_fileBOOLEANfalsePass True to send the media as file without compression
file_nameSTRINGimagethe file name for this media
formatCOMBOimage format
message_thread_idINT-1-1–9223372036854776000Unique identifier for the target message thread of the forum topic (-1 = None)
triggeropt*Optional trigger to enforce execution order

Outputs (3)

NameTypeDescription
messageDICTβ€”
message_idINTβ€”
trigger*β€”