Nodes/ComfyUI-ZMongo/06 Document API Health
ComfyUI Node

06 Document API Health

The 2-second sanity check before you blame your database node

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
06 Document API Health
  • session
  • json
  • success
  • refresh
  • selectable_items
  • indexed_items
  • item_count
document_prefix/documents
refresh_token

So a ZMongo workflow just silently spat nothing at you, and you're not sure if the problem is your session, your backend, or the node itself. This is the node you drop in to answer that question in about two seconds. "06 Document API Health" just pings the document backend your session points at and tells you whether it's actually there and talking. It's not glamorous, it's not clever, and that's exactly the point - it's the first thing you add when things stop working.

How it works

It makes a single request to the health endpoint under whatever document_prefix your session is configured with (default /documents), using the session input that flows out of a "00" auth node. Here's the nice part: this is one of the few nodes where "hosted or local" genuinely doesn't matter. If you're running the zero-config Local File Store Session, health() resolves against your local disk store instead of an HTTP endpoint. Either way, you get a clean yes/no instead of a crash.

The output you actually care about is success (a BOOLEAN) - true means the backend responded and the payload reports success. json has the full raw response if you want to inspect it, and refresh is just a token you can wire downstream to force dependent nodes to re-run when health flips. The tail outputs (selectable_items, indexed_items, item_count) are the standard ZMongo list plumbing - here they just carry the health message, so you can ignore them unless a downstream node needs something to index against.

Install

It ships with ComfyUI-ZMongo. In ComfyUI Manager, search "ComfyUI-ZMongo" and install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo

Then restart ComfyUI. The README's minimal dependency set is pymupdf python-docx requests python-dotenv; for a health check you technically need none of them, but let Manager do its full requirements.txt install anyway if you plan to use the document nodes for real (see below).

Where people get burned

Two things worth knowing. First, an empty session - if you haven't wired a "00 API Key Session" or "00 Local File Store Session" node into it, there's nothing to ping and the node reports failure. That's not a bug, that's the node correctly telling you the graph is miswired.

Second, the full requirements.txt for this pack is heavy - think langchain, sentence-transformers, pymilvus, transformers, FlagEmbedding. That's a big install for what is, at its core, a persistence layer. It's all in one venv with everything else in ComfyUI (the classic shared-environment problem), so if you're only using the document suite, it's worth knowing Manager is pulling a lot of packages whether you want them or not. Don't let a failed health check send you down the dependency rabbit hole first - check the session wiring before reinstalling anything.

For the record, this is the node to reach for when a "Get Document" or "List Documents" node returns garbage or nothing: wire Health in, confirm success is true, and you've ruled out half the failure modes before you start reading JSON.

CategoryZMongo/03 Documents

Inputs (3)

NameTypeDefaultDescription
sessionZMONGO_API_SESSION
document_prefixSTRING/documents
refresh_tokenoptSTRING

Outputs (6)

NameTypeDescription
jsonSTRING
successBOOLEAN
refreshSTRING
selectable_items*
indexed_itemsSTRING
item_countINT