A Node-RED node that provides an interface to MongoDB using the MongoDB 3.x native Node.js driver. Current stable version is 2.0.1, released in 2019. It supports CRUD operations, aggregation, and connection management via a URI string with optional authentication fields. Key differentiators: built specifically for Node-RED with a visual flow editor, supports parallelism limiting to avoid socket clogging, and allows direct access to db/collection objects. Based on the older node-red-contrib-mongodb2 but updated for driver 3.0. Low release cadence; not actively maintained.
npm install node-red-contrib-mongodb3No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates how to use the node in Node-RED: install, configure connection URI, set operation and payload.
Update flows that rely on the exact property names in msg. Check docs for new response structure.
Use either the dedicated fields OR embed credentials in the URI, but not both.
Wrap the array in another array: msg.payload = [[{_id: 1}, {_id: 2}]]Set parallelism-limit to a reasonable number (e.g., 5-10) to avoid performance issues.
Avoid calling disconnect() or close() on db/collection obtained from this node; let the node manage the connection.
Upgrade to node-red-contrib-mongodb4 (if available) or use a different Node-RED MongoDB node that supports newer drivers.
Start MongoDB service or check the URI configuration.
Verify credentials and add authSource parameter to URI, e.g., mongodb://user:pass@host:port/db?authSource=admin
Set msg.payload = [[{ ... }]] instead of [{ ... }]Ensure URI includes a database path (e.g., mongodb://localhost:27017/mydb) and the node is deployed.