Embeddr Find Collection
A lookup node that will quietly create the collection you meant to look for
- collection_id
Find Collection is the small, boring, genuinely useful node that answers one question: "what is the ID of the collection I want to put this in?" It takes a collection name (or a direct ID), finds the matching collection in your Embeddr library, and hands you back a plain string collection_id you can feed into other Embeddr nodes.
It's boring in the best way - but there's a footgun hiding in the name, so read this before you wire it up.
The one input that matters
Three inputs, two of which you'll touch:
collection_name- the name to look up. This is the one you'll usually set.collection_id- a direct collection ID that overrides the name if present (the tooltip says so). The source treats any ID longer than ~10 characters as a valid UUID and returns it untouched - no lookup, no validation.create_if_missing- defaults to true, and this is the trap. If you search by name, don't find it, and this is on, the node creates the collection for you with that name (type_name: collection:mix) and returns the new ID.
That default has burned people: you type a slightly-off collection name, the node silently creates a second near-identical collection, and your uploads scatter across two places. If you want a strict lookup, flip create_if_missing off - then a miss returns an empty string instead of a new collection. If you actually want the "create on demand" behavior, leave it on and enjoy the convenience of never having to pre-create a folder.
How the lookup works
With a name set, the node lists GET /api/v1/collections from your Embeddr server and matches case-insensitively against the collection's label (or name). Case-insensitive means "My Stuff" and "my stuff" are the same collection to it. On a match you get the ID; no match plus create_if_missing sends a POST that makes one.
The output is a single collection_id string. Wire it into the collection inputs of other Embeddr nodes (or into uploads via the options object) and you've got a workflow that organizes by name while always passing around IDs - the right pattern, since IDs don't break when you rename things.
Install & the usual caveat
Standard pack install: embeddr-cli running (embeddr serve), the pack in custom_nodes via ComfyUI Manager or a release download, restart ComfyUI. Only requests is a declared dependency.
The failure mode is the usual one for this pack: backend unreachable means the list call fails and the node returns an empty string - which, with create_if_missing on, isn't an error, it's just nothing. And remember the override rule: if collection_id is set, the name is ignored entirely, so don't leave a stale ID in that field while debugging the name lookup. The node does exactly one thing well; let it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| collection_id | STRING | Direct Collection ID (overrides Name) | |
| create_if_missing | BOOLEAN | true | Create collection if it doesn't exist (Only applies to Name) |
| collection_nameopt | STRING | Name to find (or create if missing) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| collection_id | STRING | — |