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

Send Image to Slack

Your ComfyUI gens land in Slack before you've even alt-tabbed

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

    Ever finished a 20-image batch, alt-tabbed to Slack to send a friend "the good one," and pasted the wrong file? Send Image to Slack is the fix for that specific kind of dumb. It's the flagship node of the ComfyUI-Slack pack: you wire your final IMAGE output into it, type a channel name, and every image in the batch lands in Slack as its own upload the instant the workflow finishes. No digging through ComfyUI/output, no drag-and-drop, no "wait, that's the old render."

    It's an output node (it lives in the Slack category, marked OUTPUT_NODE = True), meaning it produces nothing to wire further - it just does its thing at the end of the graph and returns. That makes it the natural last stop on any workflow whose result you want somewhere other than ComfyUI's own output tab.

    How it works

    Under the hood it's pleasantly unmagical. At execution the node takes your IMAGE tensor, converts each frame to a PIL image (clipping to 0–255 and casting to uint8), encodes it as PNG/JPEG/WEBP to a temp file, and uploads it through the Slack SDK. Channel names are resolved to real Slack IDs at send time using the scopes you granted the app - channels:read for public channels, groups:read for private ones, im:write if you're DMing a user.

    One detail worth knowing before it trips you up: the bot token is never entered in the node UI. The node reads SLACK_BOT_TOKEN from the environment when it runs. Forgot to set it? You get SLACK_BOT_TOKEN environment variable is not set the moment the workflow reaches this node.

    The inputs that matter

    There are more fields than you'll touch, and most have sensible defaults. The ones a beginner actually sets:

    • channel - #general, general, @alice, or a raw ID like C0B6SUZMHC6. A user (@alice or U…) is sent a direct message instead. Bare names resolve as a channel first, then a user - prefix with # or @ to be explicit.
    • format - PNG, JPEG, or WEBP. PNG is lossless (quality is ignored); JPEG and WEBP honor quality (1–100, default 85). JPEG auto-converts RGBA to RGB, so no alpha-channel crash.
    • filename_prefix - base name for the uploads. Each image in a batch becomes its own file named {prefix}_{index:05d}.{ext}.

    The rest are optional: title and message decorate the upload (the message attaches to the first file only), and save_output writes a local copy too - additive, not instead-of. Saving happens before the upload, so the file survives even if Slack errors. save_location picks ComfyUI output folder (same auto-incrementing naming as the built-in Save nodes) or an Absolute path you give in output_folder.

    Install and setup

    Install via ComfyUI Manager (search "ComfyUI-Slack") or manually:

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

    Dependencies are light - slack-sdk, Pillow, imageio-ffmpeg. No model files, no GPU. The one-time chore is the Slack app itself: create an app from the README's manifest, install it to your workspace, copy the xoxb-… bot token, and set it in the shell that launches ComfyUI (export SLACK_BOT_TOKEN="xoxb-…"). Then /invite @ComfyUI into the channel you're posting to - a bot that isn't a member can't post.

    Troubleshooting

    The README's got the failure modes down. not_in_channel means you forgot the invite. Slack channel "…" not found on a private channel means the bot isn't a member yet (private channels only resolve once it is, and they need the groups:read scope) - or you can just use the raw C… ID, which always works.

    One genuine caution that has nothing to do with this pack's quality: a custom node runs arbitrary Python with your user-level permissions, and this one holds a bot token that can post to your workspace. The pack's own README is refreshingly explicit that nothing routes through a third party - your token stays on your machine. Still, this is exactly the kind of install to keep to packs you actually trust.

    CategorySlack

    Inputs (12)

    NameTypeDefaultDescription
    imagesIMAGE
    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 image 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.
    formatCOMBO3 options: PNG, JPEG, WEBP
    qualityINT851–100
    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