Nodes/comfy-workflow-api/Workflow API Send
ComfyUI Node

Workflow API Send

Send Your Results Back to a Callback URL — the Node That Closes the Loop

By isala404·Created 8 months ago·Updated 7 months ago· 2
Workflow API Send
  • webhook_context
  • field_1
  • field_2
  • field_3
  • field_4
  • field_5
    field_1_nameoutput_1
    field_2_nameoutput_2
    field_3_nameoutput_3
    field_4_nameoutput_4
    field_5_nameoutput_5
    debugfalse

    WebhookSend is the node that closes the loop. WebhookReceiver opened the door, WebhookTransformer pulled your inputs out of the request, and this node is how the finished image, video, or audio gets back to the server that asked for it. Wire it up as the last node in the graph and your ComfyUI workflow becomes a proper request/response API - the pack's whole pitch.

    It's an output node: no outputs of its own, five input slots for whatever you want to return. Everything you plug in gets encoded, wrapped in a gzip-compressed multipart payload, and POSTed to the callback_url your client supplied.

    How it works

    Each field you connect is encoded to a sensible format automatically: IMAGE → PNG, AUDIO → FLAC, VIDEO → MP4, MESH → GLB, LATENT → safetensors. Batched image tensors are a nice touch - a batch of four comes out as four named parts (output_0, output_1, …) instead of one blob. Alongside the files goes a metadata JSON part carrying the request_id, prompt_id, timestamp, and a list of what was sent.

    Two details worth knowing up front. The payload is always gzip-compressed, so your receiving server has to decompress before parsing - more on that below. And delivery has real retry logic: exponential backoff with jitter, retrying only on the transient status codes (408, 429, 5xx). A 404 from a wrong path on your callback fails immediately, which is how you'll find out your URL is wrong.

    Inputs that matter

    • webhook_context - from WebhookReceiver. Required.
    • field_1 through field_5 - wildcard inputs; plug in any ComfyUI type.
    • field_1_name through field_5_name - what each part is called on the wire. Defaults to output_1output_5; if your server expects image, set the name.
    • debug - logs exactly what got encoded and sent, and whether delivery succeeded.

    Installation

    Same pack as the other two:

    cd ComfyUI/custom_nodes
    git clone https://github.com/isala404/comfy-workflow-api
    pip install -r comfy-workflow-api/requirements.txt
    

    Restart ComfyUI (or install via ComfyUI Manager, searching "comfy-workflow-api"). Only aiohttp is a hard dependency; video and audio encoding want av (PyAV). No models to download.

    Common issues

    The failure mode people actually hit first: no callback URL. If the request didn't include one and the receiver's default_callback_url is empty, WebhookSend quietly logs a warning and returns - your image gets generated, and then it goes nowhere. If outputs mysteriously vanish, check the receiver's fallback first.

    Everything is gzip. Your receiving server must decompress the multipart body before parsing - the README flags this explicitly, and it's easy to spend a while staring at binary before remembering. If you see a stream of retries instead of a clean delivery, your endpoint is returning a retryable status - check it's actually up and returning 2xx; a 404 fails fast, not quietly.

    And this node needs the whole pipeline: no WebhookReceiver means no context, and with no context it returns immediately. Wire the trio together, submit through /api/webhook, and the results land at your callback.

    Categorywebhook

    Inputs (12)

    NameTypeDefaultDescription
    webhook_contextWEBHOOK_CONTEXT
    field_1opt*First output (any type)
    field_1_nameoptSTRINGoutput_1Field name for first output
    field_2opt*Second output (any type)
    field_2_nameoptSTRINGoutput_2Field name for second output
    field_3opt*Third output (any type)
    field_3_nameoptSTRINGoutput_3Field name for third output
    field_4opt*Fourth output (any type)
    field_4_nameoptSTRINGoutput_4Field name for fourth output
    field_5opt*Fifth output (any type)
    field_5_nameoptSTRINGoutput_5Field name for fifth output
    debugoptBOOLEANfalseEnable debug logging

    Outputs (0)

    No outputs