Integrate workflows with MongoDB to store, retrieve, update, and manage data at scale. The component is powered by the official MongoDB driver (v7.6.0) on Node.js 24, providing full support for MongoDB Server versions 4.0 and newer.
The MongoDB component connects your integration flows directly to MongoDB databases. It supports a comprehensive range of database operations including advanced aggregations, bulk operations, and standard CRUD tasks using the official Node.js MongoDB driver.
To establish a connection, configure the following fields:
mongodb://user:password@hostname:port/database or mongodb+srv://hostname/databaseauthSource, optional): The database against which authentication credentials are verified. Defaults to admin.Please Note: Component v2.0+ uses an automatic unified driver. Manual
mongoVersionselection is no longer required.
The component has no required variables, however in some cases it would be beneficiary to use them. Here are the available variables:
MONGO_CONNECTION_TIMEOUT (optional): Maximum time in milliseconds to wait for database connection establishment. Default: 10000.EIO_REQUIRED_RAM_MB (optional): Container memory limit allocated for component execution. Recommended to increase when executing large aggregations or batch lookups.MongoDB uses 12-byte / 24-character hexadecimal identifiers for document _id fields. The component provides unified, consistent support for ObjectIds across all actions:
id property in the input message body.{ "id": "64a296786751183ae1f615ed" }
or
{ "id": "ObjectId('64a296786751183ae1f615ed')" }
') and double quotes (") are both supported.ObjectId._id or another ObjectId field inside a criteria object, aggregation pipeline, or bulkWrite operations array, wrap the 24-character hex ID with the template:
ObjectId('64a296786751183ae1f615ed')
ObjectId('...')) and double-quote (ObjectId("...")) syntax are supported.$in, $or, $eq) in Criteria:
{
"criteria": {
"$or": [
{ "_id": "ObjectId('64a296786751183ae1f615ed')" },
{ "accountId": { "$in": [
"ObjectId('64a296786751183ae1f615ee')",
"ObjectId('64a296786751183ae1f615ef')"
]}}
]
}
}
{
"pipeline": [
{
"$match": {
"companyId": "ObjectId('64a296786751183ae1f615ed')",
"status": "active"
}
},
{
"$group": {
"_id": "$department",
"total": { "$sum": 1 }
}
}
]
}
{
"operations": [
{
"updateOne": {
"filter": { "_id": "ObjectId('64a296786751183ae1f615ed')" },
"update": { "$set": { "verified": true } }
}
},
{
"deleteOne": {
"filter": { "_id": "ObjectId('64a296786751183ae1f615ee')" }
}
}
]
}
This component has no trigger functions. This means it will not be accessible to select as a first component during the integration flow design.
Please check the dedicated page for action functions. Below are the existing action functions, each linked to the section where more explanation is given.
_id)._id.v7.6.0, supporting MongoDB Server versions 4.0 and higher.Fetch All emit behavior loads all query results into container memory simultaneously before emitting. For large datasets, use Emit Batch or Emit Individually to avoid out-of-memory errors.Click here to learn more about the elastic.io iPaaS