Use CortexDB as a memory node in n8n workflow automations.
n8n Integration
CortexDB provides a custom n8n community node that lets you add long-term memory to any n8n workflow. Store data from any trigger, recall context for AI processing, and search your memory from within n8n's visual workflow builder.
Installation
Install the community node package in your n8n instance:
npm install n8n-nodes-cortexdb
Or install from the n8n UI: Settings > Community Nodes > search for n8n-nodes-cortexdb.
Setup
- After installation, go to Credentials in n8n
- Click Add Credential and select CortexDB API
- Enter your CortexDB server URL and API key
- Click Save
Operations
The CortexDB node supports four operations:
Remember
Store content in CortexDB's long-term memory:
- Content: The text to store
- Tenant ID: Tenant identifier (default:
"default")
Recall
Retrieve relevant context using natural language:
- Query: Natural language query
- Tenant ID: Tenant identifier
- Max Tokens: Maximum response size (default:
4096) - Min Confidence: Minimum confidence threshold (default:
0)
Forget
Remove memories from CortexDB:
- Query: Query to match memories for deletion
- Reason: Reason for the operation (useful for audit trails)
- Tenant ID: Tenant identifier
Search
Search for matching episodes with filters:
- Query: Search query
- Tenant ID: Tenant identifier
- Limit: Maximum results (default:
20) - Offset: Pagination offset
- Namespace: Optional namespace filter
Example Workflows
AI Agent with Memory
- Webhook trigger receives a user message
- CortexDB Recall retrieves relevant past context
- OpenAI Chat generates a response using the context
- CortexDB Remember stores the conversation
- Respond to Webhook returns the response
Slack-to-Memory Pipeline
- Slack Trigger fires on new messages in a channel
- CortexDB Remember stores the message content with metadata
- Use CortexDB Search in other workflows to find Slack context
Scheduled Knowledge Sync
- Schedule Trigger runs daily
- HTTP Request fetches data from your internal API
- CortexDB Remember stores the latest data
- CortexDB Forget cleans up stale entries
Error Handling
The node supports n8n's Continue on Fail option. When enabled, failed operations return an error object instead of stopping the workflow:
{
"error": "Connection refused: http://localhost:3141"
}