The Couchbase Search Vector Store node is an n8n community node contained within the n8n-nodes-couchbase package. It lets you use Couchbase Search Vector Store in your n8n workflows.
Couchbase Search Vector Store is an implementation of Vector Search using the Couchbase Search Service.
Installation
Operations
Credentials
Compatibility
Usage
Resources
Follow the installation guide in the n8n community nodes documentation.
This Vector Store node has five modes: Get Many, Update Documents, Insert Documents, Retrieve Documents (As Vector Store for Chain/Tool), and Retrieve Documents (As Tool for AI Agent). The mode you select determines the operations you can perform with the node and what inputs and outputs are available.
-
Get Many: In this mode, you can retrieve multiple documents from your vector database by providing a prompt. The prompt will be embedded and used for similarity search. The node will return the documents that are most similar to the prompt with their similarity score. This is useful if you want to retrieve a list of similar documents and pass them to an agent as additional context.
-
Update Documents: Use Update Documents mode to update a document in your vector database by ID.
-
Insert Documents: Use Insert Documents mode to insert new documents into your vector database.
-
Retrieve Documents (As Vector Store for Chain/Tool): Use Retrieve Documents (As Vector Store for Chain/Tool) mode with a vector-store retriever to retrieve documents from a vector database and provide them to the retriever connected to a chain. In this mode you must connect the node to a retriever node or root node.
-
Retrieve Documents (As Tool for AI Agent): Use Retrieve Documents (As Tool for AI Agent) mode to use the vector store as a tool resource when answering queries. When formulating responses, the agent uses the vector store when the vector store name and description match the question details.
To use the Couchbase Search Vector Store node, you'll need to set up Couchbase credentials in n8n:
-
Prerequisites:
- A running Couchbase cluster (using Couchbase Capella in the cloud, or Couchbase Server)
- Database credentials with appropriate permissions for the operations you want to perform
- Allow IP address for your n8n instance
-
Credential Parameters:
- Connection String: The connection string to your Couchbase server (e.g.,
couchbase://localhost) - Username: Database access username
- Password: Database access password
- Connection String: The connection string to your Couchbase server (e.g.,
This node has been tested with n8n version 1.123.4.
**Note: ** in version 1.2.0 of n8n-nodes-couchbase, the versioning for the Couchbase Search Vector Store node was adjusted to use integers (e.g., 1, 2) instead of decimal versions (e.g., 1.0, 1.1) to align with n8n's versioning conventions for community nodes. This means that some workflows using earlier versions of the node may require updates to work with the latest version. Simply re-select the affected node(s) from the node panel and replace them in your workflow to ensure compatibility.
Each node requires some specific details about your Couchbase Cluster:
- Select your Couchbase credentials.
- Specify the Bucket Name, Scope Name, and Collection Name.
- Toggle Use Scoped Index if your index is defined at the scope level.
- Select a Vector Index configured in Couchbase Search.
- Specify the Text Field Key (field containing the document text) and Embedding Field Key (field containing the vector embeddings).
This operation retrieves documents from your Couchbase collection based on their similarity to a given query.
- Set the Operation Mode to
Get Many. - Connect an Embeddings node (e.g., OpenAI Embeddings) to the input.
- Configure the Couchbase Details (described above).
- Enter your search Query in the Prompt field.
- Optionally, set the Limit to limit the retrieved documents.
- Optionally, define Metadata Filters to narrow down the search based on document metadata.
- Execute the node. It will output the top K documents most similar to your query, along with their similarity scores.
This operation allows you to update existing documents in your Couchbase collection. The input data should contain the document IDs and the updated content or metadata.
- Set the Operation Mode to
Update Documents. - Connect an Embeddings node (e.g., OpenAI Embeddings). If the document content (
pageContent) is updated, it will be re-embedded. - Connect an input node providing a document content to update. A single document per item is expected. A Split Out node can be used to ensure only one document is being passed in.
- Configure the Couchbase Details (described above).
- Specify the ID which corresponds to the existing document you'd like to update content for.
- Execute the node. It will attempt to update the specified documents in Couchbase.
This operation adds new documents to your Couchbase collection.
- Set the Operation Mode to
Insert Documents. - Connect an Embeddings node.
- Connect a Document Loader node (e.g., Default Data Loader with Recursive Character Text Splitter) to the 'Documents' input.
- Configure the Couchbase Details (described above).
- Optionally, under Options, you can configure Add Vector Options:
- IDs: Provide a comma-separated list of custom IDs for the documents being inserted. They will be applied in the order of insertion.
- Metadata: Provide a JSON array representing metadata (in order of document insertion, as with the IDs above) to be added to documents being inserted in this batch.
- Execute the node. The input documents will be embedded and inserted into the specified Couchbase collection.
This operation makes the configured Couchbase Vector Store available for use with other AI nodes like Retrievers or Chains (e.g., Retrieval QA Chain).
- Set the Operation Mode to
Retrieve Documents (As Vector Store for Chain/Tool). - Connect an Embeddings node.
- Configure the Couchbase Details (described above).
- Optionally, set default retrieval parameters under Options:
- Number of Results (K): Default number of documents to retrieve.
- Metadata Filters or Search Filter JSON: Default filters to apply during retrieval.
- Connect the output (Vector Store) of this node to the 'Vector Store' input of a compatible AI node (e.g., Vector Store Retriever, which in turn is connected to a Question and Answer Chain). The connected node (Q&A Chain, in this case) will trigger the actual document retrieval when it executes.
This operation configures the Couchbase Vector Store as a Tool that an AI Agent can use to answer questions.
- Set the Operation Mode to
Retrieve Documents (As Tool for AI Agent). - Connect an Embeddings node.
- Configure the Couchbase Details (described above).
- Provide a Tool Name (e.g.,
couchbase_document_search). - Provide a Tool Description that clearly explains what the tool does and when the agent should use it (e.g., "Use this tool to search for relevant documents in the Couchbase knowledge base about topic X").
- Optionally, define Metadata Filters to narrow down the search based on document metadata.
- Connect the output (AI Tool) of this node to the 'Tools' input of an Agent node (e.g., AI Agent). The agent will decide when to use this tool based on the user's query and the tool description.