Overview
A dedicated Trix community node for N8N is planned but not yet available. Currently, you can integrate Trix with N8N using the built-in HTTP Request node and webhook triggers as described below.
N8N is an open-source workflow automation tool. The Trix integration enables bidirectional workflows: trigger N8N workflows from Trix events, and manage memories from N8N workflows.
- Memory created
- Memory updated
- Memory deleted
- Search performed
- Cluster detected
- Create memory
- Update memory
- Delete memory
- Search memories
- Get memory by ID
Setting Up N8N
1. Set Up the Trix Integration
The Trix N8N integration uses HTTP requests and webhooks — no community node package is needed. You can use N8N's built-in HTTP Request node to call the Trix API directly.
2. Configure Credentials
Add your Trix API key in N8N:
- Go to Credentials in N8N
- Click Add Credential
- Search for Trix API
- Enter your API key and base URL
{
"apiKey": "gdb_abc123...",
"baseUrl": "https://api.trixdb.com/v1"
}Webhook Triggers
Trix can send webhook events to N8N when memories change. Configure webhooks in your Trix account settings or via API.
Setting Up a Trigger
# Register webhook endpoint
curl -X POST https://api.trixdb.com/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-n8n-instance.com/webhook/trix",
"events": ["memory.created", "memory.updated"],
"secret": "your_webhook_secret"
}'Webhook Payload
{
"event": "memory.created",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"memory": {
"id": "mem_abc123",
"content": "Meeting notes from Q1 planning...",
"content_type": "text",
"tags": ["meeting", "planning"],
"created_at": "2024-01-15T10:30:00Z"
}
}
}Trix signs webhook requests with HMAC-SHA256. Configure your webhook secret in N8N to verify request authenticity.
N8N Actions
Create Memory
Add memories from any N8N workflow:
{
"operation": "create",
"content": "{{ $json.text }}",
"contentType": "text",
"tags": ["n8n", "automated"],
"metadata": {
"source_workflow": "{{ $workflow.name }}",
"source_node": "{{ $node.name }}"
}
}Search Memories
Search Trix from your workflows:
{
"operation": "search",
"query": "{{ $json.searchTerm }}",
"limit": 10,
"filters": {
"tags": ["important"]
}
}Update Memory
{
"operation": "update",
"memoryId": "{{ $json.memoryId }}",
"tags": ["processed", "reviewed"],
"metadata": {
"reviewed_at": "{{ $now.toISO() }}",
"reviewed_by": "n8n_workflow"
}
}Example Workflows
Auto-tag New Memories
Automatically categorize memories based on content:
Trix Trigger (memory.created)
↓
IF Contains "meeting"
↓
Trix Update (add tag: "meeting")
↓
Slack NotificationSync from External Source
Import data from other services as memories:
Schedule Trigger (daily)
↓
HTTP Request (fetch RSS feed)
↓
Split Items
↓
Trix Create Memory (for each item)Memory-Powered Responses
Use memories to enhance automated responses:
Webhook Trigger (incoming question)
↓
Trix Search (query: question)
↓
OpenAI (generate response with context)
↓
HTTP ResponseSecurity
Webhook Signature Verification
Configure webhook signature verification to ensure requests come from Trix:
// In N8N Function node
const crypto = require('crypto');
const signature = $input.first().headers['x-trix-signature'];
const secret = $credentials.webhookSecret;
const payload = JSON.stringify($input.first().body);
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
if (signature !== `sha256=${expected}`) {
throw new Error('Invalid webhook signature');
}
return $input.all();Always verify webhook signatures in production. Set the N8N_WEBHOOK_SECRET environment variable and configure the same secret in your N8N credentials.
Direct API Usage
If you prefer not to use the Trix node, you can use N8N's HTTP Request node directly with the Trix API:
{
"method": "POST",
"url": "https://api.trixdb.com/v1/memories",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "httpHeaderAuth",
"headers": {
"Content-Type": "application/json"
},
"body": {
"content": "{{ $json.content }}",
"tags": ["n8n"]
}
}Troubleshooting
Webhook Not Triggering
- Verify the webhook URL is publicly accessible
- Check that the webhook is registered and active in Trix
- Review N8N execution logs for errors
- Ensure the webhook secret matches between Trix and N8N
Authentication Errors
- Verify your API key is correct and active
- Check that the API key has the required permissions
- Ensure the base URL is correct (no trailing slash)
Rate Limiting
If you're hitting rate limits, add delays between operations or batch multiple operations together.