Nodes/ComfyUI-ZMongo/02 Delete Collection
ComfyUI Node

02 Delete Collection

The one with the safety word

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
02 Delete Collection
  • session
  • json
  • refresh
collection_name
confirm_collection_name

02 Delete Collection drops an entire collection - and everything in it - from your ZMongo store. It's the destructor node, and unlike its sibling Create Collection, it comes with a confirmation guardrail because deleting is irreversible.

If you're building a cleanup or reset step into a pipeline (wipe the test bucket before a fresh run, clear a staging collection), this is the node. If you're just tidying up manually, you could equally do it from the backend console - but having it in the graph means you can automate teardown the same way you automate setup.

The safety word: confirm_collection_name

Three required inputs:

  • session - from the API Key Session node.
  • collection_name - the collection you want gone.
  • confirm_collection_name - must be a character-for-character match of collection_name, or the node refuses.

That's the whole safety mechanism, and it's a good one. The source is explicit: deletion requires matching collection_name and confirm_collection_name, otherwise you get a 400-style error payload. No confirm, no delete. It won't stop a determined mistake - confirming the wrong-but-matching name still nukes it - but it stops the accidental one-character typo from torching a collection you care about.

Outputs are the standard pair:

  • json - backend result: success flag, message, status code.
  • refresh - dirty token to force downstream nodes to re-pull data after the deletion.

Gotchas

  • Feed both name fields from the same upstream value (a text input or a node output) rather than typing them twice - then they can't drift apart.
  • There's no "confirm" for the whole-collection blast radius. If your collection holds generated images or hard-won prompts, make sure the delete only fires when you actually want it gone. A common pattern is a boolean gate upstream that only feeds the node in cleanup mode.
  • In Local File Store mode this deletes the on-disk directory for that collection. Gone means gone there too.

Install

ComfyUI Manager → search ComfyUI-ZMongo → install → restart, or clone manually:

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

Note the pack's real requirements.txt is heavy (langchain, sentence-transformers, pymilvus, etc.) even though this node only touches the API session - first import after install is slower than most packs.

CategoryZMongo/01 Collections

Inputs (3)

NameTypeDefaultDescription
sessionZMONGO_API_SESSION
collection_nameSTRING
confirm_collection_nameSTRING

Outputs (2)

NameTypeDescription
jsonSTRING
refreshSTRING