06 Document WhoAmI
Find out which database silo you're actually writing to
- session
- json
- username
- silo_db_name
- success
- refresh
- selectable_items
- indexed_items
- item_count
Ever saved a document to "the database" and then spent twenty minutes hunting for it? This node is the answer to that specific pain. "06 Document WhoAmI" asks your session one question - who am I, and which silo am I in? - and prints the answer. It's the identity-check companion to the Health node: Health tells you the backend is alive, this one tells you whose data you're about to read and write.
How it works
It calls the /api/whoami endpoint on the document backend your session points at. The backend responds with your username and your silo_db_name - in ZMongo's model, each user gets an isolated "silo" database, which is how two people can share a hosted backend without stepping on each other's documents. This is genuinely useful to see explicitly, because if you connect a workflow to the wrong API key, you'll be saving documents into a silo you never look at.
In Local File Store mode (zero-config, no hosted backend) the answer is deterministic: username is local, silo is local_file_store. So this node doubles as a quick "am I on the hosted backend or the local disk fallback?" check - the json output shows which session type answered.
Outputs: json (full response), username (STRING), silo_db_name (STRING), success (BOOLEAN), refresh (STRING, the re-run token), plus the standard selectable_items / indexed_items / item_count tail. For a beginner, only username and silo_db_name matter - wire them into a "Show Text" style node if you want them visible on the canvas.
Install
Same pack as everything else here:
cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
Restart ComfyUI, or search "ComfyUI-ZMongo" in ComfyUI Manager and click Install.
Where people get burned
The usual trap with this family of nodes: it needs a real session input. If you left the session socket empty, there's no identity to report and the node returns failure. Wire a "00 API Key Session" (hosted, needs your ZMongo API key) or "00 Local File Store Session" (no key at all) into it first.
Second, remember that "which silo am I in" is not the same as "where is my document." The silo is your user-scoped database on the backend - if you created a document under one API key and then swap to a different session, that document isn't there anymore. If you're seeing empty lists and you're sure you saved data, check the session that's feeding the list node. This WhoAmI node is the fastest way to confirm you're pointed at the silo you think you are.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| session | ZMONGO_API_SESSION | — | |
| document_prefix | STRING | /documents | — |
| refresh_tokenopt | STRING | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| json | STRING | — |
| username | STRING | — |
| silo_db_name | STRING | — |
| success | BOOLEAN | — |
| refresh | STRING | — |
| selectable_items | * | — |
| indexed_items | STRING | — |
| item_count | INT | — |