ComfyUI Node

Save to Telegram

Ping your phone the moment ComfyUI finishes a job

By AKharytonchyk·Created about a year ago·Updated about a year ago· 5
Save to Telegram
    • status
    bot_token
    chat_id
    message

    The best ComfyUI trick isn't a fancier sampler - it's walking away from the render and getting a text on your phone when it's done. That's what Save to Telegram is for: one node that shoves any text string into a Telegram chat, and the only dependency is a free bot token. No API keys, no cloud account, no model downloads. It's the outbound half of a two-node pack; its sibling, Telegram Listener, covers the inbound side so you can build a two-way conversation with your own GPU.

    The pitch is simple and it's worth stating plainly: if your box is rendering something that takes twenty minutes, you don't want to babysit it. Wire this node at the end of the graph, give it your bot token and your chat ID, and ComfyUI texts you when the queue finally gets there. People run these as "job done" notifiers, as delivery channels for generated prompts, and - paired with the listener - as the reply half of a "text your machine" setup.

    How it works

    Under the hood it's the python-telegram-bot library doing a plain send_message call. The node builds an Application per bot token the first time it sees it and caches it, so repeated runs don't reconnect from scratch. Your chat_id gets converted to an integer (that's what Telegram's API wants) and the message goes out. The one status output comes back as a string - "Message sent successfully to chat 123456789" when it works, or a readable error when it doesn't.

    The inputs that matter

    There are exactly three, and you'll set all of them:

    • bot_token - the token you get from @BotFather when you create a bot. It looks like 123456789:AA... and it's a secret.
    • chat_id - the ID of the chat you're sending to. Grab it from the Telegram Listener node's output, or get it manually: message your bot, then hit https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates and read the chat.id field.
    • message - whatever text you want delivered. Multiline, so you can build multi-line reports from other text nodes.

    The status output is the only one, and since the node is an output node it shows in the UI. Feed the status into a text display or just let it sit there.

    Install

    The pack is tiny and installs like any custom node. In ComfyUI Manager, search "Telegram Bot" and install; or manually:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/AKharytonchyk/ComfyUI-telegram-bot-node
    cd ComfyUI-telegram-bot-node
    ./install.sh        # Windows: install.bat
    

    Then restart ComfyUI. The install.sh script just runs pip install -r requirements.txt, which is a single pin: python-telegram-bot==20.7. No models, no weights, nothing heavy.

    Where people get burned

    • It's text-only. If you want to send the actual generated image, this node won't do it - there are other Telegram sender packs that handle photos, but this one sends strings and nothing else.
    • Don't share the workflow with the token in it. The README hammers this, and it's worth repeating: a workflow JSON embeds your bot token, and you will eventually drag-drop a shared workflow that exposes someone's token. Blank it before saving.
    • The pinned library is old. python-telegram-bot==20.7 dates from 2024 and drags in httpx. In ComfyUI's shared Python environment, if another node pins a conflicting httpx, pip can get grumpy. If the node errors on import with a missing-dependency message, pip install python-telegram-bot==20.7 fixes it.
    • Errors come back as strings, not popups. A wrong chat ID won't crash the graph; it'll silently hand you "Error: Invalid chat ID format" on the status output. Check the output if nothing arrives.

    For a "notify me when it's done" job, this is the node I'd reach for: one dependency, no accounts beyond a free bot, and it just works. Just keep the token out of the workflow you share.

    Categorytelegram

    Inputs (3)

    NameTypeDefaultDescription
    bot_tokenSTRING
    chat_idSTRING
    messageSTRING

    Outputs (1)

    NameTypeDescription
    statusSTRING