Nodes/ComfyUI-ZMongo/09 ZMongo Content Pack Get String
ComfyUI Node

09 ZMongo Content Pack Get String

Pull a string out of a content pack, without digging through JSON

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
09 ZMongo Content Pack Get String
  • content_pack
  • value
  • field_info_json
  • found
field_alias
strict_typetrue
default_value

The whole idea behind content packs is that you stop hardcoding prompts, seeds, and settings into your graph - you store them as named fields and look them up by alias. Get String is the lookup node for text fields: give it a content pack and an alias, and it hands you the string, ready to wire into a CLIP text encode, a caption, or anything else that eats text.

Mechanically it's simple. content_pack is the pack (from Build, Load, or any loader), field_alias is the name of the field. The node finds the field - by alias first, then falling back to source path, label, or numeric index - checks that its stored comfy_type is STRING, and returns the value. strict_type (default true) enforces that check; turn it off and a JSON field will be serialized to text rather than rejected, which is occasionally exactly what you want.

The few inputs that matter

  • field_alias - the only thing you'll actually type most of the time.
  • default_value - what comes back when the field isn't found. This is the quiet hero of the Get family: wire your workflow so a missing optional field degrades gracefully instead of exploding.
  • strict_type - described above; leave it on unless you have a reason.

Outputs

  • value (STRING) - the text, wired to wherever strings go.
  • field_info_json - the full field record (alias, source path, type, storage, summary) as JSON. Debugging gold when a Get returns nothing.
  • found (BOOLEAN) - false when the alias is missing or the type didn't match. It's the signal that lets downstream logic know "we're on the fallback path now."

No session needed, no credentials, no network - this node works purely on the in-memory pack object. Which is the nice part of the V3 design: building a pack and reading strings from it runs entirely offline, and only Save/Load touch the database. If you're new to the pack, this is the node to learn first alongside Build - the round trip of build → get string → preview is the fastest way to feel out how aliases work.

CategoryZMongo/09 Content Packs/Get

Inputs (4)

NameTypeDefaultDescription
content_packZMONGO_CONTENT_PACK
field_aliasSTRING
strict_typeBOOLEANtrue
default_valueoptSTRING

Outputs (3)

NameTypeDescription
valueSTRING
field_info_jsonSTRING
foundBOOLEAN