Nodes/ComfyUI Webhook Notifier/Webhook Image Saver
ComfyUI Node

Webhook Image Saver

Make ComfyUI Ping You (and Ship the Image) When a Render Finishes

By pawelmal0101·Created about a year ago·Updated 12 months ago· 1
Webhook Image Saver
  • images
    filename_prefixComfyUI
    webhook_url
    metadata
    external_uid

    The Webhook Image Saver is the node for when a folder on your disk isn't enough. It's a terminal node - same spot in the graph where you'd drop ComfyUI's built-in Save Image - but instead of quietly writing a file and moving on, it writes the file and fires a POST to a URL of your choosing, with the image attached. Built-in image savers are part of the ecosystem; this one saves your render and notifies something. Think: your own backend, a Discord or Telegram bot, a job queue, an automation script that triggers when a generation completes. You wire your VAE decode output into it and walk away; the image comes to you.

    How it works

    Peek under the hood and it's refreshingly small - the whole pack is one __init__.py. Two jobs, in order:

    1. Save the images to ComfyUI's normal output/ directory, under your filename_prefix. The README's example payload shows PNGs, but the source outranks the README here: it actually writes JPEG at quality 85. The git history even shows the format getting swapped from webp to jpeg, so the author is actively chasing faster, smaller saves.
    2. If webhook_url is set, it POSTs a multipart request to that URL with the metadata and external_uid fields plus a JSON string of the saved file list, and attaches the last image in the batch as an uploaded file.

    The POST is fire-and-forget: if your endpoint returns a non-2xx status, it just prints a line to the console. The workflow doesn't error, nothing retries. That's a feature if you don't want a flaky endpoint to kill your batch, a bug if you need guaranteed delivery.

    The inputs that matter

    • webhook_url - the only one you actually have to think about. Empty string is fine; it just becomes a plain save node.
    • filename_prefix - prefix for saved files, default ComfyUI. Same deal as the built-in Save Image.
    • metadata and external_uid - optional strings echoed back to you in the POST. external_uid is the useful one: pass a job/session ID and you can correlate a webhook hit with the generation that caused it. Hook that up to a queue and you have yourself a poor man's job tracker.
    • images - the IMAGE tensor, wired from your VAE decode. It's an output node, so there are no outputs; it's a dead end in the graph, on purpose.

    Installing it

    Easiest route: ComfyUI Manager → search "ComfyUI Webhook Notifier" (or "ComfyUI-Webhook") → install → restart. Manual, for the masochistic:

    cd ComfyUI/custom_nodes
    git clone https://github.com/pawelmal0101/ComfyUI-Webhook
    pip install -r requirements.txt
    # restart ComfyUI
    

    One trap: the README's own clone URL is a placeholder (yourusername/comfyui-webhook-http), so copy-pasting it grabs the wrong repo. Use the URL above. The requirements.txt only lists Pillow and numpy, both already in ComfyUI; the code also imports requests, which ComfyUI's environment almost always has - if you somehow get an ImportError, pip install requests fixes it.

    Where people get burned

    • It re-encodes to JPEG. If you need lossless PNGs for archival, this node will silently eat quality. Run the built-in Save Image alongside it, or keep this node for notification only.
    • Only the last image in a batch is uploaded. All of them save to disk; the webhook only carries one.
    • It's young and tiny - a single commit, no community footprint, no install base. For a serious production pipeline you might prefer posting from the ComfyUI API layer, where you control retries and auth. For "ping me when the render's done and hand me the image," this works today.
    • Like every custom node, it's arbitrary code running with your permissions. It's also holding your webhook URL - use https:// endpoints and don't paste keys in there. Not a red flag, just the ecosystem's default state.
    Categoryimage/Save Image & Notify

    Inputs (5)

    NameTypeDefaultDescription
    imagesIMAGE
    filename_prefixSTRINGComfyUI
    webhook_urlSTRING
    metadataoptSTRING
    external_uidoptSTRING

    Outputs (0)

    No outputs