MongoDB Component

Interact with documents in a MongoDB database
Component key: mongo#
DescriptionMongoDB is a NoSQL database program that uses JSON-like documents with optional schemas. This component allows you to create, read, update, and delete documents inside a MongoDB collection.
#
MongoDB Connections#
Mongo ConnectionCreate a new MongoDB connection and enter the connection string for your MongoDB server.
Input | Notes | Example |
---|---|---|
Input Collection string / Required | Notes Provide the name of your desired collection. | Example Customers |
Input Connection String string / Required | Notes Provide Connection String to use for connecting to Mongo. Refer to https://www.mongodb.com/docs/manual/reference/connection-string/ for details on format and configuration options. | Example mongodb://<username>:<password>@<host>:<port> |
Input Database string / Required | Notes The database name in your MongoDB server. | Example admin |
#
Actions#
Create IndexCreates an index on the specified field in a collection | key: createIndex
Input | Default | Notes |
---|---|---|
Input Connection connection / Required | Default | Notes |
Input Query string Key Value List | Default a:3 | Notes Provide a key and value pair that matches your desired document. |
#
Output Example Payload{ "data": ""}
#
Delete ManyRemove documents from a collection | key: deleteMany
Input | Notes | Example |
---|---|---|
Input Value data / Required Key Value List | Notes Provide key and value pairs that make up the body of your document. | Example value |
Input Connection connection / Required | Notes | Example |
#
Output Example Payload{ "data": { "acknowledged": true, "deletedCount": 1 }}
#
Find AllRetrieve all documents in a collection | key: findAll
Input | Default | Notes |
---|---|---|
Input Connection connection / Required | Default | Notes |
Input Query string Key Value List | Default a:3 | Notes Provide a key and value pair that matches your desired document. |
#
Output Example Payload{ "data": [ { "_id": "610ae111774d8aaef3b5d2eb", "exampleKey": "exampleValue" } ]}
#
Insert ManyInsert new documents into a collection | key: insertMany
Input | Notes |
---|---|
Input Documents List data / Required Value List | Notes For each item, provide a document ( Javascript Object ) to be inserted into the collection. |
Input Connection connection / Required | Notes |
#
Output Example Payload{ "data": { "acknowledged": true, "insertedCount": 3, "insertedIds": {} }}
#
Update OneUpdate a single document in a collection | key: updateOne
Input | Notes | Example |
---|---|---|
Input Value data / Required Key Value List | Notes Provide key and value pairs that make up the body of your document. | Example value |
Input Update Fields data Key Value List | Notes Provide key and value pairs to be inserted/updated in your document. | Example { b: 3 } |
Input Connection connection / Required | Notes | Example |
#
Output Example Payload{ "data": { "acknowledged": true, "modifiedCount": 1, "upsertedId": null, "upsertedCount": 0, "matchedCount": 1 }}