Edit Message Video 🔽
Replace the video in a Telegram message after it's already sent
- bot
- video
- trigger
- message
- message_id
- trigger
Video workflows are slow, so the "send it, spot a glitch, re-run, resend" cycle gets old fast. This node lets you edit a video message in place - replace the clip while keeping the message, its caption, and its spot in the chat. Your chat reads like a versioned render instead of three separate "here, take 2" posts.
It belongs to the ComfyUI Telegram Suite edit family (with Edit Message Image, Audio, and Caption), and like them it works off a message_id produced by an earlier send node.
How it works
The video input is VHS_FILENAMES - the exact type that comes out of the Filenames output of Video Helper Suite's Video Combine node. The node reads the file path from that tuple, grabs the bytes, and calls Telegram's editMessageMedia, swapping in the new clip.
The send_as dropdown decides how the replacement is delivered:
- Animation → sent as an
animation(the GIF-style player). - Video → a regular
videomessage. - File →
document, i.e. a raw file attachment with no Telegram transcoding.
Watch the type of the message you're editing: editing a video message into an animation message works, but the media type in send_as should generally match what you originally sent, or the edit can be rejected.
Two rules govern all edits here: the bot can only edit its own messages, and media edits via editMessageMedia only work within 48 hours of sending. Long video renders that sit in a queue past that window can't be edited - resend instead.
Inputs and outputs that matter
bot,chat_id- from a Telegram Bot 🔽 node.message_id- the message to edit; feed it themessage_idoutput from your Send Video node.video-VHS_FILENAMESfrom Video Helper Suite.caption,parse_mode- replacement caption text (None/HTML/Markdown/MarkdownV2).show_caption_above_media- caption placement.send_as- Animation / Video / File, above.
Outputs: message (DICT), message_id (INT, stable across the edit), and trigger passthrough.
Installation
Pack-wide install:
cd ComfyUI/custom_nodes
git clone https://github.com/SwissCore92/comfyui-telegram-suite.git
cd comfyui-telegram-suite
pip install -r requirements.txt
or via ComfyUI Manager, search "ComfyUI Telegram Suite", install, restart. Put bot tokens and chat IDs in ComfyUI/user/default/telegram-suite/config.json, restart again. No model downloads. Note you'll also want Video Helper Suite installed if you don't have it, since this node expects its VHS_FILENAMES output.
Troubleshooting
- No
videoinput matching - you need aVHS_FILENAMESoutput (Video Helper Suite's Video Combine), not a generic file path or an IMAGE. - "message to edit not found" - the message must belong to this bot and this chat, and the
message_idmust come from there. - Edits fail on old messages - the 48-hour media-edit window. If the render finished days ago, you're resending.
- File missing on disk - the video path from VHS must still exist; if you cleaned your temp/output directory since the workflow ran, the node can't read it.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| bot | TELEGRAM_BOT | Telegram bot instance | |
| chat_id | INT | Unique identifier for the target chat | |
| message_id | INT | Unique Identifier of the message to edit | |
| video | VHS_FILENAMES | the video to send (VHS) | |
| 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 |
| send_as | COMBO | How to send the video | |
| triggeropt | * | Optional trigger to enforce execution order |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| message | DICT | — |
| message_id | INT | — |
| trigger | * | — |