TG Send Chat Action ◀️
The 'typing…' bubble that buys you 30 seconds of patience
- trigger
- True
- trigger
Every chat app has a way of saying "hold on, I'm doing something." On Telegram it's the little status line above the input box - bot is typing…, sending photo…, recording voice…. This node fires that call. It generates nothing, sends no message, and yet it's the difference between a bot that feels alive and one that feels broken while your sampler chews through 30 steps.
It's a one-liner node and the smallest thing in the pack, which is exactly why it's easy to stick in the wrong place.
Inputs
bot_token is the usual BotFather string. chat_id comes from the Listener.
action is an 11-way enum straight from Telegram's list: typing, upload_photo, record_video, upload_video, record_voice, upload_voice, upload_document, choose_sticker, find_location, record_video_note, upload_video_note. It defaults to typing and for most workflows that's the right answer. Match it loosely to what's coming - upload_photo before an image send reads better than a generic typing bubble.
message_thread_id is odd here: unlike the senders, it's a required socket, not a widget with a -1 default, and its tooltip is a copy-paste leftover from the edit nodes ("Unique Identifier of the message to edit"), which it isn't. The README is explicit - connect the Listener's message_thread_id output. That returns -1 for ordinary chats, and any value ≤ 0 is stripped from the request before it's sent, so private DMs and non-topic groups just work.
Outputs
Two, and neither is a message. True is a BOOL - it reports whether the call went through, and the README's failure table says it comes back False when the request failed rather than blocking the graph. trigger is the untyped passthrough, there so you can chain execution order through this node when you're sequencing a long reply.
There's no message_id and no message DICT, because there's no message. Nothing to edit later.
Where it goes in the graph
Put it immediately after the Listener, before the slow part. In a bot that accepts a prompt and runs an SDXL generation, the sequence you want is: Listener dequeues the message → Send Chat Action (typing) → your sampler runs → Send Image or Send Message with the result. The user sees activity instantly and then gets the picture.
Two honest caveats about what this can and can't do. First, Telegram expires the indicator after a handful of seconds. A two-minute render shows typing… at the start and then nothing; there's no setting that keeps it alive, because that refresh is the client's behaviour, not the node's. You'd need to fire the action repeatedly across runs to keep it fresh, which is possible with Run (Instant) but rarely worth the API calls. Second, this is a real request against a real rate limit - Telegram's guidance is under one message per second per chat - so spamming chat actions to stay visible will get you throttled and the pack will politely sit out whatever retry_after Telegram returns.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/CoolBreeze164/ComfyUI-Autonomous-Telegram-Bot
python -m pip install -r ComfyUI-Autonomous-Telegram-Bot/requirements.txt
python_embeded\python.exe for the pip line on Windows portable. Requirements are httpx, numpy, pillow, av>=14.2.0, all of which usually exist already. Manager search: ComfyUI Autonomous Telegram Bot. Restart ComfyUI, then look in the Autonomous Telegram Bot ◀️ category.
Common issues
- "I added it and nothing changed" - that's the expected result for a correct send. Nothing echoes to the canvas except the
Trueoutput. - Indicator never appears - usually because the node ran after the expensive part, or because the branch you wired it into got blocked upstream. If the Listener emitted silent blockers (filtered chat, idle timeout, text-only message feeding an audio branch), every node hanging off that branch is skipped, this one included.
- Nothing works in a group topic - check
message_thread_idis actually connected. It's required precisely because the alternative is guessing the topic and posting in the wrong place. - It reports
False, no error - that's a failed request after the pack's retries. Your bot carried on sending the actual reply if it could, so check whether the message you wanted arrived before debugging this node.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| bot_token | STRING | Telegram bot token from BotFather | |
| chat_id | INT | Unique identifier for the target chat | |
| action | COMBO | Type of action to broadcast. Choose one, depending on what the user is about to receive. | |
| message_thread_id | INT | Unique Identifier of the message to edit | |
| triggeropt | * | Optional trigger to enforce execution order |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| True | BOOL | — |
| trigger | * | — |