Nodes/OmniNodes/Endpoint Poller ⏳
ComfyUI Node

Endpoint Poller ⏳

The OmniNodes poll loop

By TensorVizion·Created 3 months ago·Updated about 8 hours ago· 0
Endpoint Poller ⏳
    • final_response
    • timed_out
    • attempts
    • elapsed_seconds
    • summary
    urlhttps://httpbin.org/get
    success_field_path
    success_valuecompleted
    interval_seconds2.0
    max_wait_seconds60
    headers{}

    A lot of real APIs don't answer immediately. You submit an image-gen or video-render job and get a job ID, then you have to keep checking a status endpoint until it flips to "completed." An HTTP Request node only fires once - useless for that pattern. Endpoint Poller is the loop: it GETs a URL repeatedly, watches for a JSON field to hit an expected value, and reports back when it does (or when it gives up).

    The core flow: url is polled every interval_seconds (default 2) until either the field at success_field_path equals success_value, or max_wait_seconds (default 60) elapses and it returns timed_out=True. The dot-path syntax is the same as the pack's JSON Field Extractor - data.job.status style, with numeric segments for arrays. Leave success_field_path blank and it switches modes: any 2xx response counts as success, which suits endpoints that return 202 while pending and 200 when done. An optional headers JSON string handles auth headers or content types.

    Outputs: final_response (the last JSON body), timed_out (boolean - the thing you'll gate on), attempts, elapsed_seconds, and a summary describing what happened.

    It's designed to sit after an HTTP Request that submitted the job: submit → grab job ID → point the poller at the status URL → wire timed_out into a conditional gate or a fallback so a hung job fails the workflow cleanly instead of stalling it forever. That "times out cleanly" behavior is the feature - the node never hangs your queue indefinitely, it just reports the timeout and moves on.

    Two caveats worth knowing before you build on it. First, it needs the requests library, which ComfyUI does not bundle by default. The pack's requirements.txt exists for exactly this: pip install -r requirements.txt from the pack folder, or pip install requests into ComfyUI's Python environment. If it's missing, the node returns a clear error in summary rather than crashing - readable, but you'll want to install it. Second, polling is blocking: the whole workflow thread sits in the poll loop, so don't set interval_seconds lower than your API can handle, and keep max_wait_seconds sane. This is a waiting node, not a background job.

    The most common failure is also the most boring: a typo'd success_field_path. The path never resolves, the value never matches, and the poller runs out the clock and reports timed_out=True. Check the actual shape of your endpoint's JSON before you trust the path. If there's no status field at all, use the blank-field 2xx mode instead.

    And one security note that applies to everything in this pack's Web API corner: this node carries your headers (possibly an auth token) and makes outbound calls by design. Don't paste secrets into a workflow you then share - treat the workflow file like you'd treat a config file.

    Install

    Part of OmniNodes:

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

    Restart ComfyUI (or install "OmniNodes" via ComfyUI Manager and run the same pip install requests).

    Troubleshooting

    • Always times out - verify success_field_path matches the JSON shape, or leave it blank for 2xx-mode.
    • ModuleNotFoundError: requests - the dependency isn't installed. See above.
    • Node never runs downstream work until too late - that's the blocking design. Lower interval_seconds, and gate on timed_out so a timeout doesn't look like success.
    CategoryTensorVizion/Web API

    Inputs (6)

    NameTypeDefaultDescription
    urlSTRINGhttps://httpbin.org/get
    success_field_pathSTRING
    success_valueSTRINGcompleted
    interval_secondsFLOAT2.00.5–60
    max_wait_secondsFLOAT601–600
    headersoptSTRING{}

    Outputs (5)

    NameTypeDescription
    final_responseJSON
    timed_outBOOLEAN
    attemptsINT
    elapsed_secondsFLOAT
    summarySTRING