Nodes/comfy-audio-tagger/Send Audio to Telegram ✈️
ComfyUI Node

Send Audio to Telegram ✈️

Push Your Finished Track Straight Into Telegram ✈️

By lakeconstance78·Created 7 days ago·Updated 2 days ago· 0
Send Audio to Telegram ✈️
      bot_tokenYOUR_BOT_TOKEN
      chat_idYOUR_CHAT_ID
      send_modeaudio
      file_path
      topic_id
      caption🎵 New track generated!

      Every ComfyUI user has the same reflex after a good generation: save it, then get it onto the phone where you'll actually listen. Send Audio to Telegram ✈️ from the comfy-audio-tagger pack cuts out the middleman - it posts your finished track directly to a Telegram chat through the bot API. No scp, no Dropbox, no fishing a file out of output/ on the server. Run the workflow and the song is on your phone before the next batch starts.

      The setup cost

      This is the one node in the pack that isn't plug-and-play, because it needs a bot to talk to. You create one once with Telegram's BotFather (say /newbot, get a token like 123456:ABC-...), and you need your chat_id - the numeric ID of the chat or channel you want the track to land in. Send a message to your bot first, then a tool like @userinfobot can reveal the ID, or use a common trick: query the getUpdates API endpoint once. Both go into the node as plain string inputs.

      There's a real gotcha hiding in those inputs, and it's security, not setup: your bot_token is a widget value on the node, which means it lives inside the workflow JSON. Save the workflow and share it - to a forum, a friend, a bug report - and anyone who opens the file has your bot token. Treat workflows containing this node like you'd treat a file with an API key in it. It's an easy thing to miss because nothing about the node looks secret.

      How it works

      Wire the file_path output of a Save node (any of them - Save MP3 with Tags 🎵, Save FLAC with Tags 🎶, whatever you used) into this node's file_path input, and the node posts it. Under the hood it's a plain HTTPS POST to api.telegram.org/bot<token>/<method> - sendAudio by default - with the file uploaded as multipart. A couple of choices worth knowing:

      • send_mode - a dropdown with eight options: audio, voice, document, photo, video, animation, video_note, and message. The audio modes matter for your purpose; message is the odd one - it ignores the file entirely and just sends the caption as plain text, which makes a decent "batch done" notifier.
      • caption - free text that rides along as the message text. Default is "🎵 New track generated!".
      • topic_id - only for Telegram groups with forum topics enabled; it maps to the message thread. Leave it empty for a normal chat.

      There are no outputs - it's a terminal node, the end of the line. And the node itself won't fail your run if something goes wrong; it logs the API response to the console and keeps going.

      Two honest warnings

      If the bot isn't set up right, you'll get silence, not an error you'll necessarily notice. The node prints [Telegram Error] lines to the console when a post fails, so check there first if "it didn't send." And this node only sends - it can't save the file for you, so it must come after a save node in your workflow. If you pipe audio into it directly with no file_path, it politely does nothing. The correct pattern is always: generate → Save → Send.

      Install

      cd ComfyUI/custom_nodes
      git clone https://github.com/lakeconstance78/comfy-audio-tagger
      cd comfy-audio-tagger
      pip install -r requirements.txt   # Windows portable: ..\..\..\python_embeded\python.exe -m pip install -r requirements.txt
      

      or search "ComfyUI Audio Tagger" in ComfyUI Manager, then restart. The node uses requests, which ComfyUI already ships, so the pack's only added dependency is mutagen.

      Worth it? If you generate audio on a remote box and listen on your phone, this removes the single most annoying step in the loop. Just keep that token out of shared workflows.

      CategoryAudio Tagger

      Inputs (6)

      NameTypeDefaultDescription
      bot_tokenSTRINGYOUR_BOT_TOKEN
      chat_idSTRINGYOUR_CHAT_ID
      send_modeCOMBOaudio8 options: audio, voice, document, photo, video, animation, +2
      file_pathoptSTRING
      topic_idoptSTRING
      captionoptSTRING🎵 New track generated!

      Outputs (0)

      No outputs