Nodes/ComfyUI Telegram Suite/Edit Message Video 🔽
ComfyUI Node

Edit Message Video 🔽

Replace the video in a Telegram message after it's already sent

By SwissCore92·Created about a year ago·Updated 2 months ago· 9
Edit Message Video 🔽
  • bot
  • video
  • trigger
  • message
  • message_id
  • trigger
chat_id
message_id
caption
parse_mode
show_caption_above_mediafalse
send_as

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 video message.
  • Filedocument, 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 the message_id output from your Send Video node.
  • video - VHS_FILENAMES from 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 video input matching - you need a VHS_FILENAMES output (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_id must 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.
CategoryTelegram Suite 🔽/edit

Inputs (9)

NameTypeDefaultDescription
botTELEGRAM_BOTTelegram bot instance
chat_idINTUnique identifier for the target chat
message_idINTUnique Identifier of the message to edit
videoVHS_FILENAMESthe video to send (VHS)
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
send_asCOMBOHow to send the video
triggeropt*Optional trigger to enforce execution order

Outputs (3)

NameTypeDescription
messageDICT
message_idINT
trigger*