Package Information
Available Nodes
Documentation
n8n-nodes-mongo-bulk
This is an n8n community node for MongoDB bulk and many operations. It provides efficient ways to perform bulk operations on MongoDB collections.
n8n is a fair-code licensed workflow automation platform.
Installation
Follow the installation guide in the n8n community nodes documentation.
Community Node Installation
- Go to Settings > Community Nodes.
- Select Install.
- Enter
@warnyin/n8n-nodes-mongo-bulkin Enter npm package name. - Agree to the risks of using community nodes and select Install.
After installing the node, you can use it like any other node. n8n displays the node in search results in the Nodes panel.
Manual Installation
To install manually:
npm install @warnyin/n8n-nodes-mongo-bulk
Operations
The MongoDB Bulk node supports the following operations:
Insert Many
Insert multiple documents into a collection in a single operation.
Parameters:
- Collection: The name of the MongoDB collection
- Documents: JSON array of documents to insert
- Options:
- Ordered: Execute inserts in order (default: true)
- Bypass Document Validation: Skip document validation (default: false)
Example:
[
{"name": "John Doe", "email": "john@example.com"},
{"name": "Jane Smith", "email": "jane@example.com"}
]
Update Many
Update multiple documents that match a filter.
Parameters:
- Collection: The name of the MongoDB collection
- Filter: Query filter to match documents
- Update: Update operations to apply
- Options:
- Upsert: Insert if no match found (default: false)
- Array Filters: Filters for array update operations
Example Filter:
{"status": "pending"}
Example Update:
{"$set": {"status": "completed", "completedAt": "2025-10-31"}}
Delete Many
Delete multiple documents that match a filter.
Parameters:
- Collection: The name of the MongoDB collection
- Filter: Query filter to match documents to delete
Example Filter:
{"status": "archived", "createdAt": {"$lt": "2024-01-01"}}
Find
Find multiple documents that match a filter.
Parameters:
- Collection: The name of the MongoDB collection
- Filter: Query filter to match documents
- Options:
- Limit: Maximum number of documents to return
- Skip: Number of documents to skip
- Sort: Sort specification
- Projection: Fields to include/exclude
Example Filter:
{"status": "active"}
Example Sort:
{"createdAt": -1}
Example Projection:
{"name": 1, "email": 1, "_id": 0}
Bulk Write
Execute multiple write operations in a single request.
Parameters:
- Collection: The name of the MongoDB collection
- Operations: Array of bulk write operations
- Options:
- Ordered: Execute operations in order (default: true)
Example Operations:
[
{
"insertOne": {
"document": {"name": "John", "status": "active"}
}
},
{
"updateOne": {
"filter": {"name": "Jane"},
"update": {"$set": {"status": "inactive"}}
}
},
{
"deleteOne": {
"filter": {"name": "Old User"}
}
},
{
"updateMany": {
"filter": {"status": "pending"},
"update": {"$set": {"status": "processed"}}
}
},
{
"replaceOne": {
"filter": {"_id": "507f1f77bcf86cd799439011"},
"replacement": {"name": "New Name", "status": "active"}
}
}
]
Credentials
Important: This node uses n8n's standard MongoDB credentials (mongoDb), which means:
✅ Share credentials with the standard MongoDB node
✅ No duplicate credentials needed
✅ Full TLS certificate support (CA, client cert, key, passphrase)
Configuration Methods
The MongoDB credentials can be configured in two ways:
Connection String
Provide a complete MongoDB connection string:
mongodb://username:password@host:port/database
For MongoDB Atlas:
mongodb+srv://username:password@cluster.mongodb.net/database
With authentication source:
mongodb://admin:password@localhost:27017/myDatabase?authSource=admin
Individual Values
Configure connection details separately:
- Host: MongoDB server hostname
- Port: MongoDB server port (default: 27017)
- Database: Database name
- User: Username for authentication
- Password: Password for authentication
- Use TLS: Enable TLS/SSL connection
- MongoDB Server Version: Select compatibility mode
- 4.2 or Higher: For MongoDB 4.2+ (default)
- 4.0 or Lower: For MongoDB 3.6, 4.0, and older versions
Advanced TLS Options
When TLS is enabled:
- CA Certificate: Certificate authority certificate
- Public Client Certificate: Client certificate for authentication
- Private Client Key: Private key for client certificate
- Passphrase: Passphrase for encrypted private key
Features
- Efficient Bulk Operations: Perform multiple operations in a single database round-trip
- Flexible Filtering: Support for complex MongoDB query filters
- ObjectId Conversion: Automatic conversion of string IDs to MongoDB ObjectId
- Error Handling: Continue on fail option for fault-tolerant workflows
- Multiple Operation Types: Support for insert, update, delete, find, and mixed bulk operations
Use Cases
- Batch Data Import: Import large datasets efficiently
- Bulk Updates: Update multiple records based on conditions
- Data Cleanup: Delete multiple records in one operation
- Complex Workflows: Execute multiple different operations in sequence
- Data Migration: Migrate data between collections or databases
Compatibility
- Requires n8n version 0.187.0 or higher
- Compatible with MongoDB 3.6 and higher
- MongoDB 4.2+: Default mode, full feature support
- MongoDB 4.0 and older: Legacy mode available (select "4.0 or Lower" in credentials)
- Supports MongoDB Atlas cloud databases
MongoDB Version Support
If you encounter the error:
Server reports maximum wire version 7, but this version requires at least 8
Simply configure your credentials with:
- Set MongoDB Server Version to "4.0 or Lower"
- This enables compatibility mode for MongoDB 3.6, 4.0, and similar versions
