09 ZMongo Content Pack Export JSON File
Export a content pack to a file you can drag back into ComfyUI
- content_pack
- session
- json
- file_path
- filename
- success
- refresh
Databases are great for sharing packs between your own rigs. But when you want to hand a content pack to someone else - or stash it somewhere a database can't reach - you need a file. Export JSON File serializes a ZMONGO_CONTENT_PACK to disk in a portable format, and in its default mode it wraps that JSON in a normal ComfyUI workflow file. Meaning the person on the other end doesn't need ZMongo's database at all to look at it.
Where it writes
The file lands in your ComfyUI output directory under a subfolder (default content_packs), named <prefix>_<timestamp>.json. So something like ComfyUI/output/content_packs/content_pack_20260816_103015.json. You get the absolute path back on the file_path output, which is handy for a subsequent file-loading node.
The export modes - this is the real decision
workflow_json(default) - wraps the pack in a LiteGraph workflow JSON so it opens in ComfyUI like any workflow. The loaded file contains a content-pack loader node with the data embedded; drop it on the canvas and it rehydrates.portable_inline- a bare portable content-pack envelope, values inline, no workflow wrapper.asset_refs- keeps image fields as asset references instead of inlining pixels. Smaller file, but the images can only be resolved against a live session, so the pack isn't truly self-contained.manifest_only- just the manifest metadata: aliases, types, field summaries. No values. Great for documenting what a pack should contain without shipping data.
include_images toggles whether image data is inlined (off for asset_refs, generally), include_metadata controls the pack metadata, pretty_json keeps the file human-readable (leave it on). The optional session and master_key_hex matter when you're exporting asset_refs and need to resolve live asset pointers.
Outputs
json (STRING) is the serialized export, file_path and filename are where it went, success is your flag, and refresh is the standard dirty token for forcing downstream re-execution. is_output_node is false here, so wire it however you like.
Gotchas
The default mode's promise - "opens as a ComfyUI workflow" - only fully works if the person opening it has the pack installed, because the embedded node is a ZMongo loader. It's a portable format, not a no-install format. Also note that the file is written by ComfyUI's process: if you've got your output folder on a different drive or a custom path via folder_paths, that's where it goes - check the file_path output rather than assuming.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| content_pack | ZMONGO_CONTENT_PACK | — | |
| filename_prefix | STRING | content_pack | — |
| export_mode | COMBO | workflow_json | 4 options: workflow_json, portable_inline, asset_refs, manifest_only |
| include_images | BOOLEAN | true | — |
| include_metadata | BOOLEAN | true | — |
| pretty_json | BOOLEAN | true | — |
| sessionopt | ZMONGO_API_SESSION | — | |
| output_subfolderopt | STRING | content_packs | — |
| master_key_hexopt | STRING | — | |
| refresh_tokenopt | STRING | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| json | STRING | — |
| file_path | STRING | — |
| filename | STRING | — |
| success | BOOLEAN | — |
| refresh | STRING | — |