Resources · n8n integration

n8n MongoDB Atlas Vector Store nodeConfigure MongoDB Atlas Vector Store in n8n.

Your embeddings already live in MongoDB Atlas, and the n8n MongoDB Atlas Vector Store node is how a workflow talks to them. It exposes 5 parameters, 5 operation modes, and runs on every incoming item like any action node. Built for teams putting a knowledge base behind an assistant.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the n8n MongoDB Atlas Vector Store node actually do?

The node reads and writes vector embeddings in a MongoDB Atlas collection from inside a workflow. An embedding is a list of numbers that represents a piece of text, so that two texts about the same thing end up close together. MongoDB Atlas Vector Search stores those lists and ranks them against a query. The node plugs that search into n8n: insert documents, get ranked matches back, or hand the whole collection to an AI node as a searchable resource.

First scenario, building the knowledge base. A document lands in the workflow, gets split into chunks, gets embedded, and the node in insert mode writes each chunk into the collection named in MongoDB Collection. The vector goes into the field named in Embedding, the readable text into the field named in Metadata Field. Run it once per batch of source files and the collection is ready to answer questions.

Second scenario, answering a question directly. In load mode the node takes a search prompt and returns the top matches, ranked by similarity. No agent involved. That is the pattern when a workflow already knows the question, for example a support message arriving from Slack that needs the three closest procedure excerpts pasted back into the thread.

Third scenario, the assistant. In retrieve-as-tool mode the node becomes a tool the AI Agent can call on its own, with Name and Description telling the model what it will find inside. The description is the part people underestimate: a vague one and the agent never calls the tool, a specific one and it calls it at the right moment. The model itself comes from a chat model sub-node, a node that only runs when it is plugged into a root node like the agent, typically OpenAI or Anthropic.

When to reach for something else. This node assumes an Atlas cluster and a Vector Search index that already exists, created from the Atlas dashboard with a dimension count matching the embedding model, 1536 for OpenAI's text-embedding-small-3 for example. If the index is not there, nothing in n8n will create it. If the goal is a quick prototype with no database at all, another vector store fits better, and if the workflow only needs to summarize what the collection holds rather than read raw chunks, the Vector Store Question Answer Tool sits between the agent and this node.

Known limits worth checking before building on it. The node is at version 1, and an older workflow may show fewer options than what is described here. Filtering is limited to Metadata Filter in Options, so anything more elaborate belongs in the query side of MongoDB. And the node covers 5 parameters, not the whole Atlas API: index management, cluster settings and collection administration stay outside it. If n8n is new to the team, the n8n training covers the workflow basics this page assumes.

Connect

What do you need in place before the node runs?

  1. 01

    Create the Vector Search index in Atlas

    Log in to the MongoDB Atlas dashboard, pick the organization and the project, then open the Search and Vector Search section. Select the cluster, click Go to search, then Create Search Index and choose Vector Search mode. Describe the field in the visual or the JSON editor, set numDimensions to the size your embedding model produces, name the index and create it.

  2. 02

    Note the values the node panel asks for

    Four values come straight from what you just created, and n8n will not guess any of them. The collection name goes into MongoDB Collection, the index name into Vector Index Name. Then the field holding the embedding array goes into Embedding, and the field holding the raw text into Metadata Field. Copy them exactly as Atlas spells them.

  3. 03

    Save the MongoDB credential in n8n

    The node reaches the cluster through a MongoDB credential, created once from the Credentials menu and reused by every workflow touching the same database. The node panel has no Authentication selector, so there is a single credential to pick at the top and it covers all 5 operation modes. The n8n credential page for MongoDB lists the exact fields it expects.

Parameters

What are the parameters of the MongoDB Atlas Vector Store node?

The MongoDB Atlas Vector Store node has 5 parameters. For each one: the node as you configure it in n8n, what the parameter changes, and our field notes.

01

Operation Mode

mode

What you see in n8n

Notes & use cases

This selector decides what the node does with the collection, and every other field on the panel depends on it.

Key parameters

  • Operation Mode (mode): load (Get Many) returns ranked documents for a query, insert (Insert Documents) writes documents in, retrieve (Retrieve Documents (As Vector Store for Chain/Tool)) exposes the store to AI nodes, retrieve-as-tool (Retrieve Documents (As Tool for AI Agent)) exposes it as a tool, update (Update Documents) rewrites documents by ID.
  • Prompt: the search text used for ranking, often {{ $json.question }} from the previous node.
  • ID: the identifier of an existing embedding entry, required when rewriting one.
Use cases
one workflow indexes files with insert, a second answers questions with load, both pointing at the same collection.
02

MongoDB Collection

mongoCollection

What you see in n8n

Notes & use cases

Names the Atlas collection the node reads from or writes to. It is a resource locator, so the value is either picked from the list or typed in, and the same collection has to be the one the Vector Search index was built on.

Key parameters

  • MongoDB Collection (mongoCollection): required, the collection name noted down when the index was created in the Atlas dashboard.
Use cases
keeping one collection per source, product docs in one and support tickets in another, lets an assistant answer from only the right one instead of mixing the two.
03

Embedding

embedding

What you see in n8n

Notes & use cases

Tells the node which field of each Atlas document holds the embedding array, the list of numbers the vector search compares against. Get this wrong and the search returns nothing rather than an error.

Key parameters

  • Embedding (embedding): required, the field with the embedding array, and it has to match the path declared in the Vector Search index.
Use cases
a collection that already carries product descriptions gets a second field for the vector, so the original documents stay readable while the search runs on the numbers.
04

Metadata Field

metadata_field

What you see in n8n

Notes & use cases

Points at the field holding the raw text behind each vector. That text is what comes back in the results, so it is the part a model or a human actually reads.

Key parameters

  • Metadata Field (metadata_field): required, the text field of the raw data, filled at insert time with the chunk that was embedded.
Use cases
storing the chunk plus its source file name here means an answer can cite where it came from, which is what turns a plausible reply into a checkable one.
05

Vector Index Name

vectorIndexName

What you see in n8n

Notes & use cases

Identifies the Vector Search index the query runs through. MongoDB Atlas does not search vectors without one, and it is created from the Atlas dashboard before the workflow ever runs.

Key parameters

  • Vector Index Name (vectorIndexName): required, the name given to the index in the Search and Vector Search section of the cluster.
Use cases
two indexes on the same collection, one per embedding model, let a team test a new model on a copy of the data by switching this single value.
Need help

Need help automating MongoDB Atlas Vector Store with n8n?

A person reads every message.

FAQ

MongoDB Atlas Vector Store and n8n, common questions

01Is the MongoDB Atlas Vector Store node included in n8n?
Yes. It ships in the n8n AI package, @n8n/n8n-nodes-langchain, which comes with n8n itself. There is nothing to install and n8n charges nothing extra for it, on n8n Cloud, the hosted offer run by n8n, and on a self-hosted instance under the Community Edition and its Sustainable Use license. A workflow behaves the same way in both. What does have a cost is outside n8n: the MongoDB Atlas cluster holding the collection, and the model provider behind the embeddings, since OpenAI, Anthropic, Google or Mistral bill their own API calls under their own terms.
02What credentials does the node need to run?
One MongoDB credential, saved once in n8n and picked at the top of the node panel. There is no Authentication selector here, so that credential is the only thing to authenticate on the node side, and the n8n credential page for MongoDB lists the exact fields it expects. Nothing else on the node holds a provider key: embedding values arrive as plain data, and a model key travels with its own sub-node, a node that never runs on its own. Beyond the credential, the node expects a Vector Search index created beforehand in the Atlas dashboard, plus the collection name, the index name and the two field names copied into the panel.
03What are the limits of the n8n MongoDB Atlas Vector Store node?
It reads and writes vectors, and that is all. Creating the Vector Search index is a job for the Atlas dashboard, where the dimension count has to match the embedding model, 1536 for OpenAI's text-embedding-small-3 for example. Filtering is limited to the Metadata Filter entry under Options. The panel exposes 5 parameters and 5 operation modes, so cluster administration, user management and schema work all stay in MongoDB. The node is at version 1, and a workflow built earlier may display fewer options than the current panel.
04What do you need to plug in to make it work?
An embeddings sub-node at minimum, since the node stores and compares vectors but does not produce them. Sub-nodes are the small blocks that attach to a root node's ports and never execute alone. From there it depends on the mode: in insert mode a text splitter and a data loader feed it document chunks, in retrieve-as-tool mode an AI Agent calls it as a tool and brings its own chat model. To start, wire one embeddings node and one insert run, check in Atlas that documents appear with a populated vector field, then add the agent.
05n8n or Make for a MongoDB Atlas vector store?
It depends on where the data has to sit. Make is hosted, with no self-hosting option, and bills per operation, which suits a team that wants nothing to run. n8n can be self-hosted with Docker or npm, so embeddings and documents stay on infrastructure the team controls, which often decides it when the source documents are internal. The visual logic differs too: n8n builds AI workflows as a root node with sub-nodes attached to its ports, and that shape maps closely to how a vector store, an embeddings model and an agent fit together.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.