💬 Auto-MSG-Telegram-Bot
The Telegram-bot node that pings your phone
- trigger_any_type
- trigger_append_image
- output-original-input
- output-original-input-IMAGE
- 🌀output-text-LINE
- 🌀output-text-Telegram
- 🌀output-text-Discord
The name is the honest part. Wire Auto-MSG-Telegram-Bot into the end of a workflow and it posts your generated image - caption included - to a Telegram chat of your choosing. No cloud server, no webhook, no API key of your own: your ComfyUI instance is the sender, and Telegram does the rest.
This is one node out of xlinx's auto-messaging pack, from the Taiwanese dev behind the slightly more famous ComfyUI-decadetw-auto-prompt-llm. The pack's whole pitch is "check your results at the gym" - kick off a 40-image batch, walk away, and let the render come to you instead of the other way around. If that's your life, this is the node you reach for.
How it works
When the node runs, it converts the incoming IMAGE tensor to a PNG, then POSTs it to Telegram's sendPhoto endpoint using your bot token. It also appends ▣prompt: plus a JSON dump of the workflow's prompt (truncated to 500 characters) to the message caption, so the text you get tells you what was actually generated.
The pack is one shared core function wearing four hats - Telegram, LINE, Discord, and "all of the above." This node just exposes only the Telegram fields in the UI and keeps the others off.
The inputs that matter
Only a handful are worth your attention:
im_telegram_token_botid- the bot token from @BotFatherim_telegram_token_chatid- your chat ID, found via thegetUpdatesAPIenable_im_telegram- the on/off switchtrigger_append_image(optionalIMAGE) - the image to send; feed it your VAE-decoded outputtrigger_any_type(optional, any type) - a pass-through so you can inline the node without breaking your graphim_telegram_msg_header- the caption above the image
About those three msg_png_info_enabled / msg_pos_prompt_enabled / msg_neg_prompt_enabled booleans: in the code as shipped, they're accepted but never actually branch anything. The prompt gets appended regardless. Don't lose sleep over which combination you pick.
Outputs are the pass-throughs (output-original-input, output-original-input-IMAGE) plus three STRING outputs - one per service. The 🌀output-text-Telegram one holds the API's JSON response, and that's your entire debugging story, so wire it to a text/console node.
Getting the token and chat ID
Follow the README and it's a ten-minute job:
- Message @BotFather, run
/newbot, pick a name and a username ending in_bot, and copy the token it gives you. - Add your new bot as a friend.
- Hit
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdatesand readchat.idfrom the JSON - that number goes inim_telegram_token_chatid.
Install
ComfyUI Manager: search "ComfyUI-decadetw-auto-messaging-realtime". Or the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/xlinx/ComfyUI-decadetw-auto-messaging-realtime
Restart ComfyUI. There's no requirements.txt and nothing to download - the pack only leans on requests and Pillow, both of which ship with ComfyUI already.
Common issues
- No message arrives? Read the
🌀output-text-Telegramoutput. Telegram returns"ok": trueon success, or a clear error like400 chat not found. That output tells you whether it's a bad token, a bad chat ID, or a network problem. - "Caption too long" text message: the code truncates captions to 800 characters and then sends the full text as a separate message. Intentional, not a bug.
- You shared a workflow and your bot got hijacked: the token is a plaintext widget in the workflow JSON. Scrub it before sharing - that's the classic way people get their Telegram bots taken over. Custom nodes also run arbitrary Python with full access to your machine, so only install packs you trust.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| enable_im_telegram | COMBO | 2 options: true, false | |
| msg_png_info_enabled | COMBO | 2 options: true, false | |
| msg_pos_prompt_enabled | COMBO | 2 options: true, false | |
| msg_neg_prompt_enabled | COMBO | 2 options: true, false | |
| im_telegram_token_botid | STRING | xxxxxxxxxxxxxxxxxxxxxxxxxxx | — |
| im_telegram_token_chatid | STRING | 1967680189 | — |
| im_telegram_msg_header | STRING | [from-ComfyUI-telegram] | — |
| trigger_any_typeopt | * | — | |
| trigger_append_imageopt | IMAGE | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| output-original-input | * | — |
| output-original-input-IMAGE | IMAGE | — |
| 🌀output-text-LINE | STRING | — |
| 🌀output-text-Telegram | STRING | — |
| 🌀output-text-Discord | STRING | — |