Nodes/ComfyUI-ZMongo/09 ZMongo Content Pack Load
ComfyUI Node

09 ZMongo Content Pack Load

Pull a saved content pack back out of the database

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
09 ZMongo Content Pack Load
  • session
  • content_pack
  • json
  • manifest_json
  • summary
  • document_id
  • aliases
  • data_types
  • indexed
  • success
source_collectiontext_agent_context_packs
content_pack_name
project_name
document_id
fallback_to_latestfalse
refresh_token

This is the reading side of the content-pack loop. Save V3 writes packs into a database; Load V3 brings them back out and hands you a live ZMONGO_CONTENT_PACK you can feed into any Get node, the Manifest Preview, or an exporter. It's how you get the "same parameters on every rig" workflow: build once, save once, load everywhere.

Because it reads from storage, it needs a session - the ZMONGO_API_SESSION from 00 API Key Session or 00 Local File Store Session - and it can't work offline.

How you find the pack

You don't have to fill everything in; the inputs are a filter you compose:

  • source_collection - required, defaults to text_agent_context_packs. Match whatever you saved to.
  • content_pack_name - add it to target one named pack.
  • project_name - narrows further.
  • document_id - skip the filters and load one specific document by id.
  • fallback_to_latest - when false (default) and nothing matches your filter, you get success: false and an empty pack. Flip this on and it grabs the most recently updated pack in the collection instead. That's a handy safety net while you're still naming things consistently, and a trap if you leave it on for production - you can silently load the wrong pack.

The search logic behind the curtain: it queries with schema_kind: zmongo_content_pack plus your filters, sorts by updated_at_unix descending, and picks the best matching document. So if you saved three versions of the same name, you get the freshest.

Outputs

content_pack is the one that matters - wire it to the Get nodes. json and manifest_json are the full doc and manifest for inspection, summary is a one-line human description, document_id tells you exactly what you loaded, and the parallel aliases / data_types lists feed selection-style nodes. indexed is a formatted text dump of alias [type] pairs - great for a quick paste into a text viewer to remind yourself what the pack contains. success tells you whether the filter hit.

Gotchas

fallback_to_latest is the sharp edge here - understand it before you enable it. And remember the load is only as good as the name you saved with: if Save used project_name: default and you load with a different project name, you'll get nothing (or the fallback). Match the collection and the names and this node is boring in the best way - it just works.

CategoryZMongo/09 Content Packs

Inputs (7)

NameTypeDefaultDescription
sessionZMONGO_API_SESSION
source_collectionSTRINGtext_agent_context_packs
content_pack_nameoptSTRING
project_nameoptSTRING
document_idoptSTRING
fallback_to_latestoptBOOLEANfalse
refresh_tokenoptSTRING

Outputs (9)

NameTypeDescription
content_packZMONGO_CONTENT_PACK
jsonSTRING
manifest_jsonSTRING
summarySTRING
document_idSTRING
aliases*
data_types*
indexedSTRING
successBOOLEAN