Integration
n8n
This guide wires knowmind into n8n workflows. Three paths are available: the HTTP Request node against the MCP API, a Webhook receiver for knowmind events, and a Code node with the knowmind npm package. An official community node is on the roadmap.
Prerequisites
- n8n instance (Cloud or self-hosted) at version 1.50 or above
- knowmind account on Business API or Enterprise (for personal API tokens)
- API token with scope write for Store and Link; scope read alone is enough for Recall and Stats
As of 2026-05-23: no official community node yet
n8n-nodes-knowmind community node is in development and not yet published to the n8n marketplace. The three paths below work today and are the recommended approach until the community node ships.Steps
- 1
Path A: HTTP Request node against the MCP API (recommended)
The simplest and most stable path. You call the knowmind MCP API over JSON-RPC 2.0, no node installation required. First create an HTTP Header Auth credential:
textCredentials → New → HTTP Header Auth Name: knowmind Bearer Header Name: Authorization Header Value: Bearer kmt_…Then an HTTP Request node with this configuration:
textMethod: POST URL: https://knowmind.de/api/mcp/v1 Authentication: Generic Credential Type Generic Auth: HTTP Header Auth (knowmind Bearer) Send Body: yes, Body Content Type: JSON JSON Body: { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "knowmind.recall", "arguments": { "query": "{{ $json.subject }}", "k": 5 } } }Outcome: The node returns a JSON-RPC response. Hits sit under
result.content[0].textas JSON text. Add a parse node downstream to get the list of memories. - 2
Example workflow: store a memory on every new email
A typical use case — every inbound email is stored as a memory in the Memory Store:
text1. IMAP Email Trigger (n8n) → catches new emails 2. HTTP Request (POST https://knowmind.de/api/mcp/v1) Body: { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "knowmind.store_memory", "arguments": { "memory_type": "episodic", "title": "Mail from {{ $json.from }}", "content": "{{ $json.subject }}\n\n{{ $json.text }}", "source": "imap", "tags": ["mail", "{{ $json.from.replace('@', '-at-') }}"] } } } 3. Set node: save the returned memory_id for downstream stepsOutcome: Every email lands as a typed memory in the Memory Store and is recallable later.
- 3
Path B: Webhook node as a knowmind receiver
When n8n should react to events from knowmind (memory created, plan changed), drop in a webhook trigger and register its URL in your workspace's Webhooks panel.
text1. Create a webhook trigger in n8n HTTP Method: POST Path: /knowmind-events Authentication: None (HMAC verification happens inside the workflow) 2. In the knowmind dashboard, under "Webhooks": URL: https://n8n.example.com/webhook/knowmind-events Events: memory.created, memory.updated, link.created Secret: copy from the dashboard, use it for HMAC verification 3. Function node in the workflow for HMAC verification: const crypto = require('crypto'); const sig = $headers['x-knowmind-signature']; const computed = crypto .createHmac('sha256', $vars.KNOWMIND_WEBHOOK_SECRET) .update(JSON.stringify($json)) .digest('hex'); if (sig !== computed) throw new Error('Invalid signature'); return [{ json: $json }];Outcome: knowmind sends a POST request to your workflow on every configured event. The payload contains event type, memory ID and timestamps — full memory content is not sent (see data-flow path E).
- 4
Path C: Code node with the knowmind npm package (experimental)
On a self-hosted n8n with external npm modules allowed, the knowmind CLI package can act as a Code-node library. Recommended only if you already work with Code nodes.
javascript// n8n Code Node — JavaScript, mode: Run Once for All Items // Required: NODE_FUNCTION_ALLOW_EXTERNAL=knowmind in the n8n environment const { KnowmindClient } = require('knowmind'); const client = new KnowmindClient({ baseUrl: 'https://knowmind.de', token: $vars.KNOWMIND_TOKEN, }); const hits = await client.recall({ query: $input.first().json.subject, k: 5, hops: 2, }); return hits.results.map((hit) => ({ json: hit }));Outcome: The package abstracts JSON-RPC calls and PKCE handling. Updates flow in through
npm update knowmindin the n8n container. - 5
Plan for rate limits and retries
Workflows that call knowmind in loops (for example a bulk import of historical emails) hit the rate limit quickly: 60 requests per minute on Business API, 600 on Enterprise. The HTTP Request node has a built-in retry under Retry On Fail — enable it with
Max Tries: 3andWait Between Tries: 2000 ms. knowmind responds withRetry-Afteron HTTP 429.
Verify the result
- The HTTP Request node returns HTTP 200 with a
resultfield in the response. - A
knowmind.healthtest call responds withstatus: ok. - In the knowmind dashboard under API tokens you see the timestamp of the last use of your token.
Troubleshooting
| Error message | Cause | Resolution |
|---|---|---|
| HTTP 401 Unauthorized | Token missing from the Authorization header, or revoked in the dashboard. | Check the header format: Authorization: Bearer kmt_… with a space between Bearer and the token. Recreate the token in the dashboard if it has been revoked. |
| HTTP 403 Forbidden | Token does not carry the required scope. store_memory, link and unlink require scope write. | Create a token with both read and write scope in the dashboard. |
| HTTP 429 Too Many Requests | Rate limit exceeded. Business API allows 60 requests per minute. | Enable Retry On Fail on the HTTP Request node, or throttle the workflow with a Wait node. For sustained high volume, move to Enterprise (600 requests per minute). |
| Webhook never reaches n8n | n8n Cloud uses different webhook URLs for the test and the production path; hosted n8n stores them separately. | Activate the production path in the webhook trigger and register that URL in the knowmind dashboard — not the test URL. |
| Signature verification fails (HMAC mismatch) | The webhook secret in your n8n workflow no longer matches the current secret in the knowmind dashboard, or a node modifies the body before verification runs. | Rotate the secret in the dashboard, update the n8n environment variable, run the HMAC check as the first node after the webhook. |
Roadmap: official community node
An official n8n-nodes-knowmind community node is in preparation. Planned operations: Recall, Store, Link, Unlink, List Relations, Stats, Health. Once it ships, the recommendation on this page moves from path A to the community node and the guide will be updated. As of 2026-05-23: in planning, no fixed release date.