NodesDatabase Nodes
Edit Page on GitHubMongoDB - Insert Document(s)
Insert one or more documents into a MongoDB collection
mongodbdatabaseinsertwriteHard5

Description
MongoDB - Insert Document(s) node allows you to insert one or more documents into a specified MongoDB collection.
Common Use Cases
- Store user data collected from an AI agent
- Log events or actions taken by an AI agent
- Maintain a history of interactions for analysis or auditing
Inputs
The input connections this node accepts:
NameDescriptionTypeFlowThe flow of the workflowFlowCollectionName of the collection to insert intoTextDocumentsA document object or an array of document objects to insertJSON[]OptionsInsert options (ordered, writeConcern, etc.)JSONOutputs
The output connections this node provides:
NameDescriptionTypeinsertedIdsThe IDs of the inserted documentsJSONinsertedCountThe number of documents that were successfully insertedNumberToolThe tool version of this node, to be used by LLMsToolFields
The configurable fields this node provides:
NameDescriptionTypeCollectionName of the collection to insert intoValue:logsTextDocumentsA document object or an array of document objects to insertValue: [{"level": "info", "message": "process started"}]JSON[]OptionsInsert options (ordered, writeConcern, etc.)Value: {}MapMONGODB_CONNECTION_STRINGMongoDB connection stringDefaultValue: mongodb://localhost:27017/dbnameenvLast updated on