Skip to main content

n8n

Kapa has a native community node for n8n, @kapaai/n8n-nodes-kapa-ai, that gives your workflows and AI Agents access to Kapa's retrieval over the knowledge sources in your Kapa project. It offers the same functionality as the hosted MCP server and the HTTP API, and it is the most native way to use Kapa's retrieval inside n8n.

For a full walkthrough of installing the node and using it in an AI Agent, see Give your n8n agent access to your knowledge.

Requirements​

  • n8n Cloud or a self-hosted instance running n8n 2.9.0 or later.
  • An n8n owner or admin user to install the node.

Operations​

n8n nodes organize their actions by resource and operation. A resource is the kind of object the node works on, and an operation is the action the node takes on that resource. The Kapa AI node has one resource, Knowledge Base, which is the knowledge base of your Kapa project, with two operations: Search and Get Many Documents.

This operation:

  • Searches all knowledge sources connected to your Kapa project for a given Query.
  • Returns the most relevant chunks, best match first.
  • Each chunk is a short, self-contained snippet of text taken from a single page or item (for example, part of a documentation page).

Results are returned as a list of items with:

  • source_url: the URL of the original source.
  • content: the chunk content in Markdown.

This operation is Kapa's retrieval, the same one the HTTP API exposes as the Retrieval endpoint. It runs in one of two retrieval modes, default or deep, chosen with Mode. Choose a retrieval mode helps you pick.

The node lets you set the same options as the Retrieval endpoint. See the Retrieval endpoint reference for all of them.

Get Many Documents​

This operation:

  • Fetches full documents from your knowledge sources by their exact source URL or document ID.
  • Returns the full content of each matched document in Markdown; source URLs or document IDs that do not match exactly are omitted, so results may be empty.
  • Limits the number of results with Limit, unless Return All is on, and truncates documents longer than Max Characters per Document.
  • Is meant for looking up the content of one or more specific documents, for example when the agent needs the complete page rather than the short chunks Search returns.

Results are returned as a list of items with:

  • source_url: the URL of the document.
  • title: the title of the document.
  • content: the document content in Markdown, or null when the text is unavailable, such as for PDFs.
  • truncated: whether the content was shortened to Max Characters per Document.

The node lets you set the same options as the Documents endpoint. See the Documents endpoint reference for all of them.

AI Agent tools​

Both operations work as tools for an AI Agent. To add one, select Kapa AI Tool from the agent's Tool connector. It uses Search by default.

The agent sees each tool as a name and a description:

  • Name: taken from the node's name on the canvas, by default Search the knowledge base in Kapa AI. Renaming the node renames the tool.
  • Description: with Tool Description on Set Automatically, n8n generates it from the operation. Choose Set Manually and write your own in Description to tell the agent what your knowledge base covers and when to search it.

Rate limits​

The node shares the rate limits of the Retrieval and Documents endpoints, which apply per team across all projects and integrations.