NodesDatabase Nodes
Edit Page on GitHubMongoDB - Check Collection
Check if a collection exists and get its metadata
mongodbdatabasecheckmetadatacollectionMedium3
Env
MongoDB - Check Collection
3Flow
exists
documentCount
collectionSize
indexes
options
sampleDocument
Tool
Flow
Not connectedFlow
Collection
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 checkTextOutputs
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 LLMsToolFields
The configurable fields this node provides:
NameDescriptionTypeCollectionName of the collection to checkValue:usersTextMONGODB_CONNECTION_STRINGMongoDB connection stringDefaultValue: mongodb://localhost:27017/dbnameenvLast updated on