Get Job ID
Get Job ID hands you a run ID — but know which one it's actually reading
- job_id
GetJobID is the one node in the S3 Connector pack that never touches S3. It's a tiny utility that claims to hand you the unique ID of whatever ComfyUI run is currently executing, so you can organize uploads, name files, or log runs without inventing an ID yourself. There are no visible inputs at all - just one job_id STRING output. The README's example use case is wiring that string into the file name of an S3 Upload node, so each queue spits out files under a per-run key. That's genuinely handy if you run a batch box and want every output identifiable.
How it actually finds the ID
It cheats with ComfyUI's hidden context. When ComfyUI executes a graph it passes two extra dictionaries to nodes that ask for them: the prompt dict (what was queued) and extra_pnginfo (the metadata blob). GetJobID declares both as hidden inputs and then works through three sources in order:
prompt.extra_data.batch_id- populated only if you queue with a batch id inextra_data(which API-driven and batch-queue setups do).extra_pnginfo.prompt_id- the metadata dict ComfyUI attaches to output nodes.- A final fallback that pokes
server.PromptServer.instance.last_prompt_id.
Here's the catch worth knowing: stock ComfyUI's PromptServer does not set a last_prompt_id attribute (I checked against the current server source - it's not there). So on a plain install that fallback just returns the literal string No ID Found. The node also marks itself with IS_CHANGED returning NaN, which is the deliberate trick that makes ComfyUI re-run it on every queue instead of caching a stale value - so you'll never get yesterday's ID, you'll just sometimes get "No ID Found".
Using it
Drop it anywhere in your graph. Connect job_id to a file_name or full_path string on the S3 upload nodes and every run's output lands under its own key. It also works fine as a general per-run identifier for logging nodes.
Installing and configuring
It ships with the whole S3 Connector pack. Easiest route is ComfyUI Manager (search "S3 Connector"); manually:
cd ComfyUI/custom_nodes
git clone https://github.com/haranesh/comfyui-s3-connector
cd comfyui-s3-connector
pip install -r requirements.txt
Restart ComfyUI. The pack's dependencies are light - boto3, python-dotenv, Pillow - no model downloads, nothing heavy. GetJobID itself needs no credentials; the .env setup matters only for the S3 nodes (see those articles for the full config).
Where people get burned
Treat it as a convenience, not a canonical run ID. Whether you get a real value depends on how you queue: if something sets a batch_id in extra_data, you get a proper ID; otherwise you're at the mercy of whatever the metadata dict happens to carry, and the stock-ComfyUI fallback gives you "No ID Found". Test it once in your own setup before building anything important on it. For organizing S3 uploads it's free and re-runs fresh every queue - which is exactly the use it was built for.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| job_id | STRING | — |