Use Discord Webhook
Post Your Generations to a Discord Channel Right From the Graph
- image
- IMAGE
You've got a workflow that churns out images, and you want them to land in a Discord channel the moment they finish - no bot account, no token, no API key. That's the job of Use Discord Webhook (DiscordPostViaWebhook), the workhorse of Dayuppy's two-node pack. Drop it on the end of any generation, wire your image in, and it fires the result to whatever channel your webhook URL points at.
It's a delivery node, not a rendering one. It generates nothing itself - it takes an IMAGE tensor and ships it out of ComfyUI as a PNG attachment. The author's own description is "a very simple Discord webhook integration," and that's the honest pitch: one job, done in about a hundred lines.
How it works
The mechanism is pleasantly simple. The node reads a webhook URL from a plaintext file called discord_webhook_url.txt in ComfyUI's working directory - the same file the pack's Set node writes. That's why the two nodes are a pair: Set first, then Use. From there it converts the incoming tensor to PNG with PIL and hands it to the discord_webhook[async] library to do the actual HTTP POST.
Three Discord platform limits are handled for you:
- 4 attachments per message. Discord caps webhook messages at four files, so a big batch gets chunked into groups of four and sent as multiple messages.
- 2000-character messages. Your caption text gets sliced to fit.
- Oversized files. Anything that would trip Discord's upload cap gets halved in resolution and re-saved at higher compression.
You also get the same image back out the IMAGE output, untouched - so you can keep your chain running (save it, preview it) after the send fires.
The inputs that actually matter
- image (required) - the IMAGE you want posted. Wire up your VAE Decode output.
- send_Image - boolean, defaults to true. Flip it off and the node posts text only.
- send_Message - boolean, defaults to false. A fresh node sends no caption, just the image; turn this on to include
message(withprepend_messagestuck on top of it).
That's the whole surface: one image in, four optional toggles/strings, one image out.
Installing it
Same story as its sibling in the pack - no models, no weights, nothing to download except one small Python package:
cd ComfyUI/custom_nodes
git clone https://github.com/Dayuppy/ComfyUI-DiscordWebhook
then restart ComfyUI. Or skip the manual step and use ComfyUI Manager: search Discord Webhook and install from there. The only real dependency is discord_webhook[async], which Manager normally pulls automatically; if you're on a Windows standalone build and it didn't, run:
.\python_embeded\python.exe -s -m pip install --upgrade discord_webhook[async]
No checkpoints, no safetensors, no heavy install. This is about the lightest custom node you'll ever add.
Gotchas
The one that bites people: the URL file is written to ComfyUI's working directory, so Set and Use must run from the same launch folder. And treat that URL like a password - anyone holding it can post to your channel, which is exactly why the README tells you to delete the Set node after configuring it so the URL never gets baked into your saved workflow or PNG metadata. Given that Discord-webhook exfiltration is a known malware pattern in this ecosystem (the LLMVISION incident shipped stolen browser credentials to a Discord server), this isn't paranoia.
If nothing arrives, check the obvious order: Set ran once, Use runs after it, send_Image is on. That covers nearly every failure mode for a node this small.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| send_Messageopt | BOOLEAN | false | — |
| send_Imageopt | BOOLEAN | true | — |
| messageopt | STRING | — | |
| prepend_messageopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |