Workflow Name
Name your output files after the workflow that made them
- string
Every ComfyUI power user eventually builds the same thing by hand: a filename that includes the workflow's name, so they can tell at a glance which graph produced a given file. Workflow Name is that thing, pre-built - it outputs the current workflow's filename as a string, with optional prefix, suffix, and a date stamp. Feed it into a save node's filename field and your outputs name themselves.
How it works (and the asterisk)
The node reads the workflow filename from a small temp file that a background monitor writes whenever you save or open a workflow. That monitor is part of the pack - a watchdog-based script that watches your workflows folder and keeps current_workflow.tmp current. It works out of the box if ComfyUI is in the standard layout (ComfyUI root → custom_nodes/ComfyUI-1hewNodes), because the script auto-detects the workflows directory from its own path.
The inputs:
- prefix / suffix - text glued around the name.
- date_format - from
nonethroughyyyy-MM-dd,yyyyMMdd,yyyy-MM-dd HH:mm:ss, and a few CJK-style formats likeyyyy年MM月dd日. Defaultyyyy-MM-dd. - full_path -
false(default) gives just the filename;truegives the whole path. - strip_extension -
true(default) drops the.json; turn it off if you want the full filename.
Output: string - the assembled workflow name.
The asterisk in practice
The monitor has to actually be running and to have seen your workflow. Two ways that breaks, in the real world: you launch ComfyUI with a custom working setup and the temp file never gets written, or you're using the API/headless mode where no UI session exists to track. In both cases the node returns a "no temp file detected" message instead of a name. If you're running a stock desktop ComfyUI with this pack installed, it just works; if you've customized the layout, the monitor's directory detection is the thing to check first.
Why it's worth wiring up
Once you adopt it, the payoff compounds: every saved image, video, and text log gets the workflow name baked in, and "which workflow made this?" stops being a guessing game. It's the kind of boring node that saves you from renaming files for a year. Pair the string output with a Save Image filename or a Save Txt to make it automatic.
Installing it
ComfyUI Manager, search "ComfyUI 1hewNodes", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes
Note that this node genuinely needs watchdog, which is in the pack's requirements - so let the normal install finish rather than skipping dependencies.
Gotchas
The filename it reports is whatever was last saved or opened, not necessarily the one you're looking at if you've switched tabs without a save. And don't expect the name to update mid-run: it's captured at execution time. If you get the "start the monitoring script" message, that's the temp-file miss described above, not a bug in the node itself - restart ComfyUI so the monitor initializes, and confirm the pack's utils/workflow folder is present.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| prefix | STRING | — | |
| suffix | STRING | — | |
| date_format | COMBO | yyyy-MM-dd | 17 options: none, yyyy-MM-dd, yyyy/MM/dd, yyyyMMdd, yyyy-MM-dd HH:mm, yyyy/MM/dd HH:mm, +11 |
| full_path | BOOLEAN | false | — |
| strip_extension | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |