Nodes/ComfyUI-Slack/Slack Thread Start
ComfyUI Node

Slack Thread Start

One Slack thread to hold everything a single workflow produces

By claussteinmassl·Created 4 months ago·Updated 3 months ago· 1
Slack Thread Start
    • thread_ts
    channel
    mode
    headerYour ComfyUI generations are here!

    Drop a batch of send nodes into one workflow and Slack stops being a delivery channel and starts being a mess: three messages scattered across the channel root, the image here, the caption ten minutes later. Slack Thread Start is the pack's tidy-up node. It posts a root message - by default the admirably on-the-nose "Your ComfyUI generations are here!" - and hands you back a thread_ts, which you wire into the thread_ts input of any Send Image/Video/Text/Audio node. Everything then lands as replies in that same thread, grouped the way you'd actually want to read it.

    It's the one node in this pack that isn't a dead end: while every send node has no outputs, this one's whole job is to produce a STRING - the thread timestamp - that fans out to however many send nodes you have.

    How it works

    Mechanically it's a small, well-made piece of plumbing. The node posts the header message via the Slack API and outputs the returned thread timestamp. Wire that into a send node's thread_ts and two things happen: the send node replies in that thread instead of the channel root, and the dependency forces it to run after the thread exists - so the root is always there before the first upload lands.

    Two details are worth knowing. First, the mode widget controls caching through ComfyUI's IS_CHANGED hook: in New thread each run mode the node returns NaN (which is never equal to itself), so ComfyUI re-executes it on every queue and posts a fresh root each time. In Reuse existing thread mode it returns a stable key, so re-running the workflow is cached and appends to the same thread. The reuse memory is per ComfyUI session - restart, or change the channel/header, and you start a new thread. Second, the thread carries its channel with it: once you connect thread_ts, the send node's own channel widget is disabled and the thread's channel wins, so you set the destination once, here.

    The inputs that matter

    • channel - where the thread lives, using the pack's usual syntax: #general, @alice, or a raw ID.
    • mode - New thread each run (fresh thread every execution) or Reuse existing thread (keep appending within the session).
    • header - the root message that opens the thread; Markdown is translated to Slack formatting like the text node. Leave it and you get the default string.

    Install

    Same pack, same steps as every other node here: ComfyUI Manager (search "ComfyUI-Slack"), or

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

    Light dependencies, no models. And the same Slack-app setup: create the app from the README's manifest, install it, set SLACK_BOT_TOKEN in the environment that launches ComfyUI, and /invite @ComfyUI to the channel.

    Troubleshooting

    The failure modes are the pack's shared ones - missing token, not_in_channel (you skipped the invite), private channels not resolving until the bot is a member. The one this node adds is confusion about state: if you expect a new thread on every run and instead see results piling into one, you've got Reuse existing thread selected. And if you connect thread_ts but the messages still hit the channel root, check the wire is actually connected - an unconnected thread_ts posts to the channel root by design, which is also the pack's escape hatch when you want a mix of threaded and unthreaded output.

    CategorySlack

    Inputs (3)

    NameTypeDefaultDescription
    channelSTRINGChannel or user: #general, @alice, or a raw ID. A user (@name or U…) starts the thread in a direct message. Names resolve automatically; the bot must be a member of private channels.
    modeCOMBO'New thread each run' posts a fresh root every execution. 'Reuse existing thread' keeps the same thread across re-runs (within this ComfyUI session) so new results append to it.
    headeroptSTRINGYour ComfyUI generations are here!Text of the root message that opens the thread. Standard Markdown is translated to Slack formatting.

    Outputs (1)

    NameTypeDescription
    thread_tsSTRING