Skip to content
MoveWorkflows

Pipedream MongoDB steps in n8n

Updated 2026-10-21 · 3 min read · n8n: MongoDB (Native n8n node)

MongoDB steps in Pipedream store webhook payloads, enrich events with lookups and poll collections for new documents. n8n has a native MongoDB node built on the MongoDB Node driver, covering documents, aggregation and Atlas Search indexes.

The n8n side

MongoDB node (n8n-nodes-base.mongoDb):

Resource Operations
Document Aggregate, Delete, Find, Find And Replace, Find And Update, Insert, Update
Search Index Create, Drop, List, Update

Find takes a JSON query plus options (limit, skip, sort, projection). Update and Find And Update match on a key field you name. There is no MongoDB trigger node.

What maps where

Pipedream (app mongodb) In n8n Status
Create New Document Document → Insert manual
Find Document, Search Documents Document → Find manual
Find Document by Id Document → Find with {"_id": "<24-hex id>"} (the node converts it to an ObjectId) manual
Update a Document, Update Documents Document → Update / Find And Update manual
Delete a Document Document → Delete manual
Execute Aggregation Document → Aggregate manual
New Document (polling) Schedule Trigger + Find + Remove Duplicates manual
New Collection, New Database, New Field in Document (polling) Schedule Trigger + Code node with the driver, or skip manual

The converter has no MongoDB mapping yet. Each step arrives as a placeholder with its props (database, collection, filter, document) in a comment.

MongoDB credentials in n8n

Two ways to fill the MongoDB credential:

  • Connection string: paste the mongodb+srv://… URI from Atlas (with database user and password).
  • Values: host, database, user, password, port, for self-hosted servers.

Both support TLS options and x.509 client certificates. For Atlas, add n8n's IPs to the project's IP Access List; n8n Cloud publishes its outgoing addresses in its docs.

Typical migration: webhook payloads to MongoDB

Pipedream: HTTP trigger → MongoDB Create New Document (events). n8n: Webhook → MongoDB → Document → Insert (collection events, Fields: the keys you want, or all with a preceding Edit Fields node). Insert writes the listed fields from each item, so shape the item first.

Replacing New Document

  1. Schedule Trigger every minute.
  2. Find with query {"createdAt": {"$gt": "{{ $now.minus({minutes: 1}).toISO() }}"}} (adjust to your field and type).
  3. Remove Duplicates on _id to cover overlaps.

MongoDB migration pitfalls

  • IP access list. The most common "connection timed out" on Atlas is a missing IP entry.
  • ObjectId and dates. Queries are plain JSON, not extended JSON, so $oid and $date are not converted. A string _id is turned into an ObjectId by Find and Aggregate; for date comparisons store ISO strings or query in a Code node with the driver.
  • Insert fields. Insert and Update write the fields you list; nested objects need dot notation or a prepared item.
  • No transactions across several node calls; use a Code node with the driver if you need them.

How to move your MongoDB workflows

  1. Export from Pipedream.
  2. Upload on /convert; the free report lists every MongoDB step and its props.
  3. Get the n8n JSON: 1 workflow is free; full export: $3 per workflow, $19 minimum — coming soon.

Code steps using the mongodb package can be checked in the code step checker. Related: MySQL, PostgreSQL, Firebase.

FAQ

Is there a MongoDB trigger in n8n?
No. Pipedream's New Document source polls; in n8n use a Schedule Trigger plus Find with a query on _id or a timestamp greater than the last run.
How do I connect to MongoDB Atlas?
Use the connection string credential and add n8n's outgoing IP addresses to the Atlas IP Access List. Atlas refuses connections from addresses that are not on the list.
Can I run aggregation pipelines?
Yes. The Document resource has an Aggregate operation that takes the pipeline as JSON, so Pipedream's Execute Aggregation maps one to one.
Do MongoDB steps convert automatically?
No. They arrive as placeholders with their props (collection, filter, document).

Related

Sources