Docs
NodesDatabase Nodes
Edit Page on GitHub

MongoDB - Check Collection

Check if a collection exists and get its metadata

mongodbdatabasecheckmetadatacollectionMedium3
MongoDB - Check Collection Node Screenshot

Description

The MongoDB - Check Collection node allows you to verify the existence of a specific collection within a MongoDB database and retrieve its metadata.

Common Use Cases

  • Validate if a collection exists before performing operations
  • Retrieve collection metadata for auditing or logging purposes
  • Ensure database integrity in workflows

Inputs

The input connections this node accepts:

NameDescriptionTypeFlowThe flow of the workflowFlowCollectionName of the collection to checkText

Outputs

The output connections this node provides:

NameDescriptionTypeexistsWhether the collection existsBooleandocumentCountNumber of documents in the collectionNumbercollectionSizeSize of the collection in bytesNumberindexesArray of indexes on the collectionJSONoptionsCollection options (capped, size, etc.)JSONsampleDocumentA sample document showing the structureJSONToolThe tool version of this node, to be used by LLMsTool

Fields

The configurable fields this node provides:

NameDescriptionTypeCollectionName of the collection to checkValue: usersTextMONGODB_CONNECTION_STRINGMongoDB connection stringDefaultValue: mongodb://localhost:27017/dbnameenv

Last updated on