npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-mongodb-query-pro

v1.2.0

Published

MongoDB Query Pro nodes for n8n with full ISO date and ObjectId support. Includes both regular node and AI agent tool.

Readme

n8n-nodes-mongodb-query-pro

MongoDB Query nodes for n8n with full ISO date support. Solves the problem of querying MongoDB databases with ISO date formats that the official n8n MongoDB node doesn't handle correctly.

n8n MongoDB npm version

🎯 Problem Solved

The official n8n MongoDB node cannot properly filter dates in ISODATE format. When working with MongoDB databases that store dates in ISO format, queries using $date syntax don't return results.

This package provides nodes that correctly handle MongoDB's date formats:

{
  "created_at": {
    "$gte": { "$date": "2025-09-11T00:00:00.000Z" },
    "$lte": { "$date": "2025-09-11T23:59:59.999Z" }
  }
}

📦 Installation

In n8n (Recommended)

  1. Go to Settings > Community Nodes
  2. Click Install
  3. Enter n8n-nodes-mongodb-query-pro
  4. Click Install

Manual Installation

npm install -g n8n-nodes-mongodb-query-pro

Then restart your n8n instance.

🚀 Features

Exactly Two Nodes Included

This package provides EXACTLY 2 nodes (no more, no less):

  1. MongoDB Query Pro - Regular node for standard n8n workflows

    • For building regular workflows
    • Direct MongoDB query execution
    • Full control over query parameters
  2. MongoDB Query Pro Tool - Automatically generated tool version for AI Agents

    • Created automatically by n8n when usableAsTool: true is set
    • For use with n8n AI Agent nodes
    • Same functionality, optimized for AI context

⚠️ IMPORTANT: There is only ONE source file (MongoDbQueryPro.node.ts) that generates both nodes. The Tool version is created automatically by n8n, not by a separate file.

Key Features

  • ISO Date Support: Properly handles MongoDB $date syntax
  • Multiple Operations: Find, FindOne, and Aggregate
  • AI Agent Compatible: Use with n8n AI agents
  • Error Handling: Comprehensive error handling with continue on fail option
  • Flexible Connection: Supports connection string or separate credentials

📊 Supported Operations

Find

Retrieve multiple documents from a collection with optional filtering.

Find One

Retrieve a single document from a collection.

Aggregate

Execute MongoDB aggregation pipelines for complex data operations.

🔍 Query Examples

JSON Query with ISO Dates

{
  "created_at": {
    "$gte": { "$date": "2024-01-01T00:00:00.000Z" }
  },
  "status": "active"
}

🔧 Configuration

Credentials

Create MongoDB credentials with:

  • Connection String: Full MongoDB connection URI
  • Database (Optional): Override database from connection string

Node Parameters

  • Collection: MongoDB collection name
  • Operation: Find, FindOne, or Aggregate
  • Query: MongoDB query in JSON format
  • Max Results: Limit number of returned documents

🤖 AI Agent Usage

The MongoDB Query Pro Tool node can be used with n8n AI agents for intelligent database queries. The agent can:

  • Generate and execute MongoDB queries
  • Process results and provide summaries
  • Handle complex aggregation pipelines

🛡️ Security

  • No credentials or sensitive data are included in the published package
  • All database connections use secure MongoDB drivers
  • Connection strings are handled through n8n's credential system

🐛 Known Issues

  • Custom nodes may require N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true environment variable for AI tool usage
  • Some n8n versions may have restrictions on community node AI tools

📄 License

MIT - See LICENSE file for details

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

🆘 Support

For issues and feature requests, please use the GitHub Issues page.

🏷️ Keywords

n8n, mongodb, mongo, query, database, iso-date, ai-agent, tool, n8n-community-node-package


Made with ❤️ for the n8n community