NodesDatabase Nodes
Edit Page on GitHubMongoDB - Query Documents
Query MongoDB database
mongodbdatabasequerynosqlHard5

Description
MongoDB Query Documents node allows you to query documents from a MongoDB collection using specified filters and options.
Common Use Cases
- Retrieve user data based on specific criteria
- Fetch product information for e-commerce applications
- Aggregate data for reporting and analytics
Inputs
The input connections this node accepts:
NameDescriptionTypeFlowThe flow of the workflowFlowCollectionName of the collection to queryTextFilterMongoDB filter query object (e.g., {status: 'active'})JSONProjectionFields to include/exclude (e.g., {name: 1, email: 1, _id: 0})JSONSortSort order (e.g., {createdAt: -1})JSONLimitThe maximum number of documents to returnNumberSkipNumber of documents to skipNumberOutputs
The output connections this node provides:
NameDescriptionTypedocumentsThe array of documents returned by the queryJSONdocumentCountThe number of documents returnedNumberToolThe tool version of this node, to be used by LLMsToolFields
The configurable fields this node provides:
NameDescriptionTypeCollectionName of the collection to queryValue:usersTextFilterMongoDB filter query object (e.g., {status: 'active'})Value: {}JSONProjectionFields to include/exclude (e.g., {name: 1, email: 1, _id: 0})Value: {}JSONSortSort order (e.g., {createdAt: -1})Value: {}JSONLimitThe maximum number of documents to returnValue: 10NumberSkipNumber of documents to skipValue: 0NumberMONGODB_CONNECTION_STRINGMongoDB connection stringDefaultValue: mongodb://localhost:27017/dbnameenvLast updated on