{"id":43455,"library":"node-red-contrib-mongoql","title":"MongoQL Node-RED","description":"Node-RED node package (v0.9.7) that provides a custom node ('mongoql') for building MongoDB queries within Node-RED flows. Allows users to construct MongoDB query objects via a visual interface or JSON, reducing syntax errors. Low release cadence (last update 2020); suitable for Node-RED users who need to query MongoDB without writing raw queries. Supports MongoDB operators like $regex, $gte, $in. No TypeScript types provided.","status":"active","version":"0.9.7","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","node-red","mongodb","query"],"install":[{"cmd":"npm install node-red-contrib-mongoql","lang":"bash","label":"npm"},{"cmd":"yarn add node-red-contrib-mongoql","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-red-contrib-mongoql","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required to provide Node-RED runtime environment.","package":"node-red","optional":false}],"imports":[{"note":"This is a Node-RED node, not a library. Install via Manage Palette or npm, then use the node in the editor.","wrong":"const MongoQL = require('node-red-contrib-mongoql')","symbol":"MongoQL node","correct":"Install as a Node-RED palette and use the 'mongoql' node in flows."}],"quickstart":{"code":"// No programmatic usage; install via Node-RED palette manager.\n// 1. In Node-RED, go to Manage Palette > Install.\n// 2. Search 'node-red-contrib-mongoql' and install.\n// 3. Drag 'mongoql' node onto canvas.\n// 4. Configure query in the node's edit dialog (e.g., { \"field\": { \"$regex\": \"pattern\" } }).\n// 5. Wire to a MongoDB output node (e.g., using 'node-red-node-mongodb').","lang":"javascript","description":"Shows installation and basic usage in Node-RED environment."},"warnings":[{"fix":"Connect the mongoql node to a MongoDB node (e.g., node-red-node-mongodb) that executes the query.","message":"The mongoql node outputs a msg.payload containing the MongoDB query object, not the query results. Users often expect it to execute the query.","severity":"gotcha","affected_versions":"*"},{"fix":"Check MongoDB driver version and consider alternatives if using modern MongoDB features.","message":"Relies on MongoDB Node.js driver v2.x internally; newer Node-RED and MongoDB drivers may cause compatibility issues.","severity":"deprecated","affected_versions":">=0.9.0"},{"fix":"For advanced queries, use a full MongoDB client node or custom function node.","message":"Only supports a subset of MongoDB operators; complex aggregations or update operations are not available.","severity":"gotcha","affected_versions":"*"},{"fix":"Refer to MongoDB documentation for query syntax and test in a function node first.","message":"Documentation is sparse; no examples for nested queries or $elemMatch operator.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'2020':47 'allow':26 'build':18 'cadenc':44 'construct':29 'custom':14 'error':41 'flow':25 'gte':68 'interfac':36 'javascript':74 'json':38 'last':45 'like':66 'low':42 'mongodb':19,30,58,64,78 'mongoql':1,16 'need':55 'node':3,6,8,15,23,51,76 'node-r':2,5,22,50,75 'object':32 'oper':65 'packag':9 'provid':12,73 'queri':20,31,57,62,79 'raw':61 'red':4,7,24,52,77 'reduc':39 'regex':67 'releas':43 'suitabl':48 'support':63 'syntax':40 'type':72 'typescript':71 'updat':46 'user':27,53 'v0.9.7':10 'via':33 'visual':35 'within':21 'without':59 'write':60","created_at":"2026-06-05T16:59:53.005445+00:00","updated_at":"2026-06-05T16:59:53.005445+00:00","problems":[{"fix":"Ensure the mongoql node is connected to a separate MongoDB output node that receives the query object.","cause":"MongoQL node output is a query object, not a MongoDB collection. User tries to call .find() on msg.payload.","error":"TypeError: Cannot read property 'find' of undefined"},{"fix":"Restart Node-RED after installation. If still missing, run 'npm install --save node-red-contrib-mongoql' in the user data directory.","cause":"Node-RED cannot locate the mongoql node after installation.","error":"Node not found"},{"fix":"In the mongoql node edit dialog, enter valid JSON (e.g., {\"field\": \"value\"}) without enclosing quotes for keys.","cause":"Incorrect configuration syntax in the mongoql node editor; query must be JSON object.","error":"msg.payload is not a plain object"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"node-red-contrib-mongoql","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}