Skip to main content

MongoDB Component

Interact with documents in a MongoDB database

Component key: mongo

Description#

MongoDB 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 Connection#

Create a new MongoDB connection and enter the connection string for your MongoDB server.

InputNotesExample
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 Index#

Creates an index on the specified field in a collection | key: createIndex

InputDefaultNotes
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 Many#

Remove documents from a collection | key: deleteMany

InputNotesExample
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 All#

Retrieve all documents in a collection | key: findAll

InputDefaultNotes
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 Many#

Insert new documents into a collection | key: insertMany

InputNotes
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 One#

Update a single document in a collection | key: updateOne

InputNotesExample
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  }}