Nodes/ComfyUI-Slack/Send Audio to Slack
ComfyUI Node

Send Audio to Slack

When your ComfyUI makes sound, Slack gets the file

By claussteinmassl·Created 4 months ago·Updated 3 months ago· 1
Send Audio to Slack
  • audio
    channel
    filename_prefixComfyUI
    save_outputfalse
    save_location
    output_folder
    format
    quality85
    title
    message
    thread_ts
    user_id

    Audio is the forgotten stepchild of the ComfyUI ecosystem - the image side gets all the press, but there's a real (if younger) crop of music and voice model nodes around, and they all end the same way: with an AUDIO tensor sitting in your graph and no obvious "then what." Send Audio to Slack is the "then what." Feed it an AUDIO input, pick a format, and the node encodes it through the bundled FFmpeg and uploads it to your channel as a playable audio file the moment the workflow finishes.

    How it works

    Structurally it's the audio twin of Send Image to Slack: an output node (Slack category, OUTPUT_NODE = True, no outputs to wire onward). At run time it takes the AUDIO tensor, encodes it to your chosen format by piping the waveform through imageio-ffmpeg - the same bundled binary the video node uses, so there's no separate FFmpeg to install - and uploads the result via the Slack SDK.

    The channel logic is identical to the rest of the pack: #general, a bare name, @alice, or a raw ID, all resolving automatically at send time, with a user getting a DM instead of a channel post.

    The inputs that matter

    • audio - the AUDIO tensor you want to ship. If you don't have an AUDIO-producing node in your graph, nothing else on this node matters; that's the only required input that carries content.
    • format - mp3, m4a, opus, flac, or wav. For Slack, mp3/m4a are the safe defaults; opus is a great pick for voice and tends to be smaller. flac and wav are lossless, which means bigger uploads for no audible win on a chat-app file.
    • quality - 1–100, default 85. For the lossy formats it maps to a bitrate (32–320 kbps, so 100 ≈ 320 kbps); it's ignored for flac/wav, which are lossless regardless.

    channel, filename_prefix, and the save trio (save_output, save_location, output_folder) work exactly like the other send nodes - saving a local copy is additive and happens before the upload, so the file persists even if Slack rejects the send. Optional title, message, thread_ts, and user_id decorate the upload, group it into a thread, or add an @-mention.

    Install

    It's the same pack as the others, so install is the familiar dance: ComfyUI Manager (search "ComfyUI-Slack") or

    cd ComfyUI/custom_nodes
    git clone https://github.com/claussteinmassl/ComfyUI-Slack
    pip install -r requirements.txt
    

    Dependencies are light (slack-sdk, Pillow, imageio-ffmpeg), no model downloads. The setup that takes real minutes is the Slack app itself - create one from the README's manifest, install it to your workspace, copy the xoxb-… bot token into SLACK_BOT_TOKEN in the environment you launch ComfyUI from, and /invite @ComfyUI to the channel. The token is read from the environment at send time; it's never typed into the node.

    Troubleshooting

    This node is one API call plus an FFmpeg encode, so failures are mostly the shared pack gotchas: a missing SLACK_BOT_TOKEN errors at run time, not_in_channel means the bot isn't invited, and a private channel won't resolve by name until the bot is a member. If the encode itself errors, check that your AUDIO input is actually a batch of samples the format can represent - a silently-empty tensor produces a useless file, and lossless flac/wav on garbage in gives you a big garbage file out.

    CategorySlack

    Inputs (12)

    NameTypeDefaultDescription
    audioAUDIO
    channelSTRINGChannel or user: #general, @alice, or a raw ID. A user (@name or U…) is sent as a direct message. Names resolve automatically; the bot must be a member of private channels.
    filename_prefixSTRINGComfyUI
    save_outputBOOLEANfalseAlso write the audio to disk in addition to sending it to Slack.
    save_locationCOMBOWhere the saved copy is written. 'ComfyUI output folder' uses ComfyUI's output directory with an auto-incrementing counter; 'Absolute path' writes into the folder set below.
    output_folderSTRINGBase folder for the saved copy. Used only when save_location is 'Absolute path'; combined with filename_prefix.
    formatCOMBO5 options: mp3, m4a, opus, flac, wav
    qualityINT851–100Bitrate for lossy formats (mp3/m4a/opus): higher = better. Ignored for lossless (flac/wav).
    titleoptSTRING
    messageoptSTRING
    thread_tsoptSTRINGSlack thread to reply under. Connect a Slack Thread Start node here to post into the same thread as other send nodes. Leave unconnected to post to the channel root. Also auto-filled by the Slack listener.
    user_idoptSTRINGSlack user ID to @-mention in the result message. Auto-filled by the Slack listener.

    Outputs (0)

    No outputs