Nodes/ComfyUI-ZMongo/02 List Collections
ComfyUI Node

02 List Collections

Show me my tables — ZMongo 02 List Collections

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
02 List Collections
  • session
  • json
  • collections
  • indexed
refresh_token

02 List Collections is the "show me my tables" node for ComfyUI-ZMongo. Feed it a session and it returns every collection in your database - think of a collection as a table in a spreadsheet, and a document as one row. If you've ever stood in front of an unfamiliar database wondering what's actually in it, this is the node that answers first.

ZMongo's model is simple: you store structured data - prompts, generation parameters, image metadata - as documents inside named collections. This node is the starting point for exploring what's already stored, and it's often the first thing you wire up when you inherit a workflow that uses a collection you've never heard of (this pack's example workflows use collections like succubi for images and prompts for prompt documents, which tells you how free-form the naming gets).

How it works

The node calls session.list_collections(), extracts the collection names from the response, and hands them back in three shapes so you can use whatever downstream node wants:

  • json - the full raw response.
  • collections - the names as an actual list, ready to feed into iteration or selection nodes.
  • indexed - the same list rendered as "0: name" text, which is handy for a text preview so you can see the ordering at a glance.

If no session is wired in, you get an error payload, an empty list, and an empty indexed string instead of a crash - the pack's standard defensive behavior.

The inputs and outputs that matter

Inputs are minimal: just session (required) and refresh_token (optional, the pack-wide cache-busting field you can ignore at first). Everything useful comes out:

  • collections (list) - feed this into 99 Select Nth Item to pick one name, then into any node that takes a collection_name.
  • json - wire to a text preview if you want the full response with any metadata the backend attaches.
  • success isn't exposed here - unlike Health and Who Am I, this node signals problems through empty lists plus an error payload in json.

Install

Standard pack install: ComfyUI Manager → search "ComfyUI-ZMongo" → install → restart, or manually:

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

The heavy requirements (sentence-transformers, transformers, pymilvus, pandas, …) are for the pack's advanced embedding and vector-search features; this node only needs the session to work.

Troubleshooting

  • Empty collections list - two likely causes. Either the session is broken (check Health/Who Am I first) or the store genuinely has no collections yet. Remember ZMongo's dual backend: if you never created collections via a hosted API, the local file store on your disk starts empty.
  • Collection names aren't what you expect - you may be looking at a different silo than the one you usually write to. Run 00 Who Am I and confirm db_name.
  • Local store location - with 00 Local File Store Session on a blank root, collections live as folders under custom_nodes/ComfyUI-ZMongo/nodes/local_store/collections. If the node reports empty, check that folder.

List Collections won't change the world by itself, but it's the map you need before you can navigate the rest of the 02/03 document nodes.

CategoryZMongo/01 Collections

Inputs (2)

NameTypeDefaultDescription
sessionZMONGO_API_SESSION
refresh_tokenoptSTRING

Outputs (3)

NameTypeDescription
jsonSTRING
collections*
indexedSTRING