Skip to content

n8n

Visit https://xmemory.ai/integration-overview/ for comprehensive guides, API references, and integration examples.

API key: To use xmemory APIs or integrations (including n8n), you need an API key. Please register your interest at https://xmemory.ai and we will reach out to give access. Copy and securely store the key. Never share your API key publicly.

Integration with n8n-nodes-xmemory custom node

Section titled “Integration with n8n-nodes-xmemory custom node”

This chapter walks through the full integration flow using the n8n-nodes-xmemory custom node:

  1. Add xmemory node
  2. Create instance from YAML
  3. Authorize using token
  4. Write memory
  5. Read memory
  6. Run full execution

Source code of the node could be found in the n8n-nodes-xmemory repository.

  • Go to Settings -> Community Nodes in n8n.
  • Click “Install a community node”.
  • Enter n8n-nodes-xmemory and install the package.
Install n8n xmemory community node

Add the xmemory custom node in your workflow.

n8n xmemory custom node

Use the node operation that creates a new xmemory instance from a YAML schema.

Create xmemory instance from yaml in n8n

Here the following xmemory schema was used:

objects:
Contact:
description: Represents a person interested in xmemory who submitted their contact
information through the website form. Captures personal identification details
and contact information for follow-up communication.
fields:
uuid:
type: str
required: true
description: Unique identifier for the person. Used for internal tracking and
reference. Must be a non-empty string.
name:
type: str
required: false
description: Name of the person. Required for personalized communication.
email:
type: str
required: false
description: Email address of the person. Primary contact method for follow-up
communication. Must be a valid email format.
use_case:
type: str
required: false
description: Optional field to capture the specific use case or interest of the person regarding xmemory. This information can help tailor follow-up communication and provide relevant resources.
relations: {}

It represents a simple schema for a chatbot collecting contact information from website visitors interested in xmemory.

Normally, you don’t need to create instances on-the-fly. Create your instance once, store the instance_id, and reuse it in your workflow for all subsequent write and read operations.

Configure your xmemory API token in node credentials so the workflow can access your instance.

Authorize n8n xmemory node with token

Send content to xmemory with the write operation.

Write data to xmemory from n8n

Query stored memory with the read operation.

Read data from xmemory in n8n

Execute the workflow end-to-end to validate create, write, and read in one run.

Full n8n workflow execution with xmemory node

You can also connect n8n to xmemory via MCP. For full MCP documentation, see https://xmemory.ai/mcp.

Set the MCP server address to https://mcp.xmemory.ai/ and use OAuth2 authentication.

n8n MCP credentials with xmemory server address and OAuth2 auth

Configure the OAuth2 authentication via https://oauth2.xmemory.ai/ xmemory server.

n8n OAuth2 credential showing xmemory server address

Sign in on the xmemory login page (use the API key) and select the instance you want the MCP session to use.

xmemory MCP login page and instance selection

After successful auth, n8n lists all available xmemory MCP tools.

n8n MCP tools list for xmemory