Nodes/Discord Webhook/Set Discord Webhook
ComfyUI Node

Set Discord Webhook

The Setup Node That Holds the Keys to Your Discord Channel

By Dayuppy·Created 2 years ago·Updated about a year ago· 4
Set Discord Webhook
    • DUMMY IMAGE
    URL

    The first time you install Dayuppy's Discord Webhook pack, you'll meet a node with exactly one job: Set Discord Webhook (DiscordSetWebhook) exists to remember a URL for the pack's other node. You paste in a webhook URL, it validates it, and it writes it to a file on disk so "Use Discord Webhook" can read it later. Think keychain, not lock.

    A webhook URL is Discord's way of letting you post to a channel without running a bot: generate one under Server Settings → Integrations → Webhooks, and anyone who knows the URL can drop messages and attachments into that channel. That's the whole authentication model, which is why this node reads like a config panel instead of a real processing step. It is one.

    How it works

    The source is genuinely tiny. The node checks that your URL starts with https://discord.com/api/webhooks/ - if it doesn't, it raises a ValueError and points you at Discord's own webhook docs. Then it writes the URL to discord_webhook_url.txt in ComfyUI's working directory (the folder you launched ComfyUI from). Re-run it with a new URL and it just overwrites the file, so pointing at a different channel later is a one-node edit.

    Here's the slightly odd part: it's marked as an output node and returns a DUMMY IMAGE - a 128×128 TV test-pattern drawn in code. Why? So you can wire Set straight into the Use node's image input and trigger a test send. ComfyUI's graph needs a connection to propagate, and the dummy image gives it one. The README's setup flow is literally: add both nodes, connect them, run, and a color-bar test image lands in your channel if everything's configured right.

    Inputs and outputs

    • URL (required) - the full webhook URL from Discord. Must start with https://discord.com/api/webhooks/ or the node refuses.
    • Output: DUMMY IMAGE (an IMAGE type) - the test-pattern placeholder you can wire anywhere you want to force a send.

    That's the entire surface: one string in, one dummy image out.

    Install

    The pack installs in one step and drags no models along - the only dependency is the discord_webhook[async] Python package. From ComfyUI Manager, search Discord Webhook and install; or do it by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Dayuppy/ComfyUI-DiscordWebhook
    

    then restart ComfyUI. On Windows standalone builds, the README's pip line is:

    .\python_embeded\python.exe -s -m pip install --upgrade discord_webhook[async]
    

    The important part: delete it after use

    The README leads with a warning, and you should take it literally: delete the Set node after you've configured it. A webhook URL is a bearer secret - no password, no expiry, and anyone who has it can post to your channel. If you save the workflow with the URL still in the node, that URL ends up in the workflow JSON and, if you save with metadata, inside your PNGs. Share that PNG on a public gallery and you've handed strangers the keys. It's the same credential-exfiltration vector the LLMVISION malware abused to ship stolen browser data to a Discord server - so this isn't academic, it's just the rare case where a pack tells you to remove a node and you should actually do it.

    The file stays on disk regardless - that's how the Use node reads it - so deleting the node from the graph costs you nothing and closes the biggest leak.

    CategoryDiscord

    Inputs (1)

    NameTypeDefaultDescription
    URLSTRING

    Outputs (1)

    NameTypeDescription
    DUMMY IMAGEIMAGE