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-better-mongodb

v1.0.0

Published

n8n MongoDB nodes: full CRUD, aggregation, bulk writes, transactions, indexes, Atlas/vector search, GridFS, BSON types (ObjectId, Date, Decimal128, ...) and a change stream trigger

Downloads

356

Readme

n8n-nodes-better-mongodb

Two n8n nodes for MongoDB, built on the official mongodb driver. They reuse n8n's built-in MongoDB credential (mongoDb); there is no separate credential type. Self-hosted n8n only.

Better MongoDB (action node)

| Resource | Operations | |---|---| | Document | find, findOne, insertOne/Many, updateOne/Many (operators or pipeline updates), replaceOne, deleteOne/Many, findOneAndUpdate/Replace/Delete, count, estimatedCount, distinct | | Aggregation | aggregate (any stage is passed through: $merge, $out, $lookup, $setWindowFields, $vectorSearch, $scoreFusion, $serializeEJSON, $function, ...) | | Bulk Write | bulkWrite (mixed ops, ordered/unordered), bulk upsert from input items by key fields | | Collection | create (capped, time series, validators incl. 9.0 constraint level, clustered, pre/post images), create view, drop, rename, collMod, $collStats | | Index | create (unique, TTL, partial, sparse, wildcard, hidden, collation), createMany, drop, dropAll, list, $indexStats | | Search | Atlas Search $search, $vectorSearch, create/update/drop/list search indexes | | GridFS | upload, download, list, delete, rename | | Database & Admin | list databases/collections, drop database, runCommand, ping, buildInfo, database-level aggregate ($currentOp, ...), $queryStats, multi-collection client bulk write (server 8.0+) |

Extras: explain, collation, hint, let, maxTimeMS, read/write concern, read preference, and Run in Transaction (all items in one multi-document transaction, rolled back on any error).

BSON types

  • Input accepts Extended JSON anywhere: {"$oid": "..."}, {"$date": "..."}, {"$numberDecimal": "..."}, {"$numberLong": "..."}, {"$binary": {...}}, {"$uuid": "..."}, {"$regularExpression": {...}}, $timestamp, $minKey, $maxKey.
  • Convert ObjectId Fields (default _id) turns 24-hex strings into ObjectId for the listed field names at any depth, including inside $in. Convert Date Fields does the same for ISO strings to Date.
  • Output Format: Simplified (ObjectId, Date, Decimal128, Long as strings), Extended JSON Relaxed, or Extended JSON Canonical (lossless, type-preserving). Relaxed mode loses precision on integers beyond 2^53.

Better MongoDB Trigger

Change stream trigger for a collection, a database or the entire cluster (replica set or sharded cluster required). Filter by event type, add $match/$project stages, choose full-document lookup, pre-images (changeStreamPreAndPostImages), and expanded DDL events. The resume token is stored in workflow static data, so events are not lost across restarts or n8n downtime (as long as the oplog still covers the gap).

Not included

Queryable Encryption and client-side field-level encryption need native libmongocrypt and are not supported. Use runCommand or the aggregation passthrough for anything else.

Development

npm install
npm run lint
npm run build
npm run dev   # runs a local n8n with the nodes loaded