fix(n8n): drop Add fields the v3 API does not accept, correct docs

The Add operation exposed app_id, includes, and excludes in Additional
Fields and forwarded them to POST /v3/memories/add/. None of the three
are declared on that endpoint's schema (they belong to MemoryInput, used
by POST /v1/memories/), so they were silently dropped by the server.

app_id was worse than a no-op: the entity-id guard accepted it as
satisfying "at least one entity id", so filling only App ID passed local
validation and then sent a v3 request carrying no scope v3 recognises.
The guard now requires User ID, Agent ID, or Run ID.

Docs corrections alongside it:
- Add: document Custom Instructions and Custom Categories, which the
  node has always supported but the docs never mentioned
- Get Many: document Return All, which the docs omitted entirely
- README: Infer and Wait for Completion are independent controls; the
  README claimed infer=false returns synchronously, contradicting the
  node's own field description and its actual behaviour
This commit is contained in:
kartik-mem0
2026-07-29 21:41:23 +05:30
parent aa939d00d4
commit 2a61fe1a32
3 changed files with 22 additions and 30 deletions
+11 -2
View File
@@ -40,7 +40,16 @@ Create a **Mem0 API** credential in n8n:
### Add
Extracts and stores memories from one or more messages. Provide at least one entity id (**User ID**, **Agent ID**, **Run ID**, or **App ID** in Additional Fields); the node validates this before calling the API. Additional Fields also expose **Metadata (JSON)** and **Infer** (run LLM extraction, or store verbatim).
Extracts and stores memories from one or more messages. Provide at least one entity id (**User ID**, or **Agent ID** / **Run ID** in Additional Fields); the node validates this before calling the API.
Additional Fields also expose:
| Field | Purpose |
| --- | --- |
| **Metadata (JSON)** | Arbitrary JSON attached to each extracted memory |
| **Infer** | On by default. Turn off to store messages verbatim instead of running LLM extraction |
| **Custom Instructions** | Free-text guidance steering what the extractor keeps or ignores, for this call |
| **Custom Categories** | JSON array of `{category: description}` objects, replacing the project-level catalog for this call |
Extraction is asynchronous. **Wait for Completion** (on by default) polls the event until it finishes and returns the resulting memories; turn it off to return immediately with the event ID.
@@ -50,7 +59,7 @@ Semantic search over stored memories. Provide a **Query**, a **User ID** (requir
### Get Many
Lists memories for a **User ID** with **Page** and **Page Size** controls.
Lists memories for a **User ID**. Turn on **Return All** to page through every memory automatically; leave it off to fetch a single **Page**. **Page Size** applies either way.
### Get / Update / Delete