Skip to content

Commit c1eaf71

Browse files
authored
feat(n8n): add n8n community-node package for Hindsight memory (#1364)
* feat(n8n): add n8n community-node package for Hindsight memory Adds @vectorize-io/n8n-nodes-hindsight — an n8n community node package that exposes Hindsight retain / recall / reflect as workflow operations. Drop the Hindsight node into any workflow alongside Slack, Sheets, OpenAI, etc. and you have persistent memory across runs. Package layout (n8n community-node convention): - credentials/HindsightApi.credentials.ts: credential class (apiUrl + optional apiKey, /health test, Bearer auth) - nodes/Hindsight/Hindsight.node.ts: single node with operation parameter exposing retain / recall / reflect (matches Slack-style multi-op nodes) - nodes/Hindsight/hindsight.svg: node icon - 14 unit tests (vitest) covering credential metadata, node properties, per-operation field gating, budget enums Wiring: - detect-changes filter + test-n8n-integration job in test.yml (cloned from test-opencode-integration shape) - Added n8n to VALID_INTEGRATIONS in scripts/release-integration.sh - New /sdks/integrations/n8n docs page - Entry in integrations.json so n8n appears on the listing - n8n.svg icon (placeholder; replace with brand-approved version) Verified: tsc + vitest both clean (npm run build, npm test). * feat(n8n): use Hindsight iris logo as node icon Replaces the placeholder mark with the actual brand logo (PNG). Updates copy-icons to ship any hindsight.* file with the build, and ignores npm-pack tarballs.
1 parent 7b671f0 commit c1eaf71

17 files changed

Lines changed: 3223 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
integrations-llamaindex: ${{ steps.filter.outputs.integrations-llamaindex }}
4848
integrations-paperclip: ${{ steps.filter.outputs.integrations-paperclip }}
4949
integrations-opencode: ${{ steps.filter.outputs.integrations-opencode }}
50+
integrations-n8n: ${{ steps.filter.outputs.integrations-n8n }}
5051
integrations-cloudflare-oauth-proxy: ${{ steps.filter.outputs.integrations-cloudflare-oauth-proxy }}
5152
integrations-lockfiles: ${{ steps.filter.outputs.integrations-lockfiles }}
5253
integrations-openai-agents: ${{ steps.filter.outputs.integrations-openai-agents }}
@@ -133,6 +134,8 @@ jobs:
133134
- 'hindsight-integrations/paperclip/**'
134135
integrations-opencode:
135136
- 'hindsight-integrations/opencode/**'
137+
integrations-n8n:
138+
- 'hindsight-integrations/n8n/**'
136139
integrations-cloudflare-oauth-proxy:
137140
- 'hindsight-integrations/cloudflare-oauth-proxy/**'
138141
integrations-lockfiles:
@@ -527,6 +530,37 @@ jobs:
527530
working-directory: ./hindsight-integrations/opencode
528531
run: npm run build
529532

533+
test-n8n-integration:
534+
needs: [detect-changes]
535+
if: >-
536+
github.event_name != 'pull_request_review' &&
537+
(github.event_name == 'workflow_dispatch' ||
538+
needs.detect-changes.outputs.integrations-n8n == 'true' ||
539+
needs.detect-changes.outputs.ci == 'true')
540+
runs-on: ubuntu-latest
541+
542+
steps:
543+
- uses: actions/checkout@v6
544+
with:
545+
ref: ${{ github.event.pull_request.head.sha || '' }}
546+
547+
- name: Set up Node.js
548+
uses: actions/setup-node@v6
549+
with:
550+
node-version: '22'
551+
552+
- name: Install dependencies
553+
working-directory: ./hindsight-integrations/n8n
554+
run: npm install --no-fund --no-audit
555+
556+
- name: Run tests
557+
working-directory: ./hindsight-integrations/n8n
558+
run: npm test
559+
560+
- name: Build
561+
working-directory: ./hindsight-integrations/n8n
562+
run: npm run build
563+
530564
test-hindsight-agent-sdk:
531565
needs: [detect-changes]
532566
if: >-
@@ -3562,6 +3596,7 @@ jobs:
35623596
- build-ai-sdk-integration
35633597
- test-ai-sdk-integration-deno
35643598
- test-opencode-integration
3599+
- test-n8n-integration
35653600
- test-cloudflare-oauth-proxy-integration
35663601
- build-chat-integration
35673602
- test-paperclip-integration
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
sidebar_position: 32
3+
title: "n8n Persistent Memory with Hindsight | Integration"
4+
description: "Add persistent long-term memory to any n8n workflow with Hindsight. A community node provides Retain, Recall, and Reflect operations — drop them into any workflow alongside Slack, Sheets, OpenAI, and 400+ other integrations."
5+
---
6+
7+
# n8n
8+
9+
Persistent memory for [n8n](https://n8n.io) workflows via [Hindsight](https://hindsight.vectorize.io). The `@vectorize-io/n8n-nodes-hindsight` community node package adds three operations — **Retain**, **Recall**, **Reflect** — that work alongside any other n8n node.
10+
11+
## Why this matters
12+
13+
n8n is the connective tissue of automation: triggers from Gmail, Slack, Sheets, Stripe, Notion; actions across 400+ apps. Until now it has been **stateless** — every workflow run starts fresh. With Hindsight nodes you can:
14+
15+
- **Retain** every closed support ticket, sales-call summary, or form submission into a memory bank
16+
- **Recall** relevant context before an OpenAI / Anthropic / Cohere step so the LLM sees prior history
17+
- **Reflect** to ask synthesizing questions ("What do we know about this customer?") right inside a workflow
18+
19+
## Installation
20+
21+
In your n8n instance, go to **Settings → Community Nodes → Install** and enter:
22+
23+
```
24+
@vectorize-io/n8n-nodes-hindsight
25+
```
26+
27+
Or for self-hosted n8n:
28+
29+
```bash
30+
cd ~/.n8n/custom
31+
npm install @vectorize-io/n8n-nodes-hindsight
32+
```
33+
34+
Restart n8n; the **Hindsight** node appears in the node panel.
35+
36+
## Setup
37+
38+
1. **Sign up** at [Hindsight Cloud](https://ui.hindsight.vectorize.io/signup) (free tier) or [self-host](/developer/installation)
39+
2. **Get an API key** from the Hindsight dashboard
40+
3. **In n8n**, create a new **Hindsight API** credential with your API URL (defaults to Hindsight Cloud) and the `hsk_...` key
41+
42+
## Operations
43+
44+
### Retain
45+
46+
Store content in a bank. Hindsight extracts facts asynchronously after the call returns.
47+
48+
| Field | Description |
49+
|---|---|
50+
| Bank ID | Memory bank to store in (auto-created on first use) |
51+
| Content | Free text to retain |
52+
| Tags | Comma-separated tags |
53+
54+
### Recall
55+
56+
Search a bank for memories relevant to a query. Returns a `results` array.
57+
58+
| Field | Description |
59+
|---|---|
60+
| Bank ID | Memory bank to search |
61+
| Query | Natural-language query |
62+
| Budget | `low` / `mid` / `high` |
63+
| Max Tokens | Cap on returned memory tokens |
64+
| Tags Filter | Filter by tag |
65+
66+
### Reflect
67+
68+
Get an LLM-synthesized answer over the bank. Returns `text`.
69+
70+
| Field | Description |
71+
|---|---|
72+
| Bank ID | Memory bank |
73+
| Query | Question to answer |
74+
| Budget | `low` / `mid` / `high` |
75+
76+
## Example workflows
77+
78+
**Customer-support assistant** — every closed Zendesk ticket retains the resolution. Every new ticket starts with a recall against the bank to surface similar past issues, then passes that context to OpenAI to draft the first reply.
79+
80+
**Sales-call coach** — Gong webhook → Hindsight Retain (call summary). Before each next prep call, recall on the prospect's name to pull every prior touchpoint, then format into the daily prep doc.
81+
82+
**Personal Slack bot** — Slack DM trigger → Hindsight Recall on the user's question → OpenAI for the answer → Slack reply. The bot remembers every conversation across sessions.
83+
84+
## Source
85+
86+
- npm: [`@vectorize-io/n8n-nodes-hindsight`](https://www.npmjs.com/package/@vectorize-io/n8n-nodes-hindsight)
87+
- GitHub: [`hindsight-integrations/n8n`](https://github.com/vectorize-io/hindsight/tree/main/hindsight-integrations/n8n)

hindsight-docs/src/data/integrations.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,16 @@
210210
"link": "/sdks/integrations/opencode",
211211
"icon": "/img/icons/opencode.svg"
212212
},
213+
{
214+
"id": "n8n",
215+
"name": "n8n",
216+
"description": "Persistent memory community node for n8n workflows. Retain, recall, and reflect operations drop into any workflow alongside Slack, Sheets, OpenAI, and 400+ other integrations.",
217+
"type": "official",
218+
"by": "hindsight",
219+
"category": "framework",
220+
"link": "/sdks/integrations/n8n",
221+
"icon": "/img/icons/n8n.svg"
222+
},
213223
{
214224
"id": "openai-agents",
215225
"name": "OpenAI Agents SDK",
Lines changed: 10 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
dist/
3+
*.tsbuildinfo
4+
*.tgz
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# @vectorize-io/n8n-nodes-hindsight
2+
3+
[Hindsight](https://hindsight.vectorize.io) memory nodes for [n8n](https://n8n.io) — give any n8n workflow persistent long-term memory with **retain**, **recall**, and **reflect** operations.
4+
5+
Drop a Hindsight node anywhere in a workflow to:
6+
7+
- **Retain** facts emerging from a workflow (form submissions, CRM updates, customer chat) into a memory bank
8+
- **Recall** relevant context before an LLM step so the AI sees prior history
9+
- **Reflect** to get an LLM-synthesized answer over the bank's accumulated knowledge
10+
11+
## Installation
12+
13+
In n8n, go to **Settings → Community Nodes → Install** and enter:
14+
15+
```
16+
@vectorize-io/n8n-nodes-hindsight
17+
```
18+
19+
Or install via npm in your self-hosted n8n:
20+
21+
```bash
22+
cd ~/.n8n/custom
23+
npm install @vectorize-io/n8n-nodes-hindsight
24+
```
25+
26+
Restart n8n and the **Hindsight** node appears in the node panel.
27+
28+
## Setup
29+
30+
1. **Create a Hindsight account** at [Hindsight Cloud](https://ui.hindsight.vectorize.io/signup) (free tier available) — or self-host with the [Hindsight installer](https://hindsight.vectorize.io/developer/installation)
31+
2. **Get an API key** from the Hindsight dashboard
32+
3. **In n8n**, create a new **Hindsight API** credential:
33+
- **API URL**: `https://api.hindsight.vectorize.io` (or your self-hosted URL)
34+
- **API Key**: your `hsk_...` key (leave blank for unauthenticated self-hosted)
35+
36+
## Operations
37+
38+
### Retain — store content in a bank
39+
40+
| Field | Description |
41+
|---|---|
42+
| Bank ID | The memory bank to store in (auto-created on first use) |
43+
| Content | Free text to retain. Hindsight extracts structured facts asynchronously |
44+
| Tags | Comma-separated tags applied to the stored memory |
45+
46+
### Recall — search a bank
47+
48+
| Field | Description |
49+
|---|---|
50+
| Bank ID | Memory bank to search |
51+
| Query | Natural-language query |
52+
| Budget | `low` / `mid` / `high` — controls retrieval depth |
53+
| Max Tokens | Cap on returned memory tokens |
54+
| Tags Filter | Filter memories by tag |
55+
56+
Returns: `{ results: [{ text, score, ... }, ...] }`
57+
58+
### Reflect — LLM-synthesized answer
59+
60+
| Field | Description |
61+
|---|---|
62+
| Bank ID | Memory bank to reflect on |
63+
| Query | Question to answer |
64+
| Budget | `low` / `mid` / `high` |
65+
66+
Returns: `{ text: "...", citations: [...] }`
67+
68+
## Example workflows
69+
70+
**Customer-support assistant** — every closed Zendesk ticket retains the resolution; every new ticket starts with a recall against the bank to surface similar past issues.
71+
72+
**Sales-call coach** — Gong webhook → Hindsight Retain (call summary). Before each next prep call, recall on the prospect's name to pull every prior touchpoint.
73+
74+
**Personal Slack bot** — Slack DM trigger → Hindsight Recall on the user's question, pass through to OpenAI node, reply.
75+
76+
## License
77+
78+
MIT
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import type {
2+
IAuthenticateGeneric,
3+
ICredentialTestRequest,
4+
ICredentialType,
5+
INodeProperties,
6+
} from 'n8n-workflow';
7+
8+
/**
9+
* Credentials for the Hindsight memory API.
10+
*
11+
* Defaults to Hindsight Cloud. For self-hosted instances, change the API URL
12+
* to your deployment (e.g. http://localhost:8888).
13+
*/
14+
export class HindsightApi implements ICredentialType {
15+
name = 'hindsightApi';
16+
displayName = 'Hindsight API';
17+
documentationUrl = 'https://hindsight.vectorize.io/developer/api/quickstart';
18+
properties: INodeProperties[] = [
19+
{
20+
displayName: 'API URL',
21+
name: 'apiUrl',
22+
type: 'string',
23+
default: 'https://api.hindsight.vectorize.io',
24+
description:
25+
'Base URL of the Hindsight API. Defaults to Hindsight Cloud; change for self-hosted instances.',
26+
required: true,
27+
},
28+
{
29+
displayName: 'API Key',
30+
name: 'apiKey',
31+
type: 'string',
32+
typeOptions: { password: true },
33+
default: '',
34+
description:
35+
'API key for Hindsight Cloud (begins with "hsk_"). Leave blank for unauthenticated self-hosted instances.',
36+
},
37+
];
38+
39+
authenticate: IAuthenticateGeneric = {
40+
type: 'generic',
41+
properties: {
42+
headers: {
43+
Authorization: '={{ $credentials.apiKey ? "Bearer " + $credentials.apiKey : undefined }}',
44+
},
45+
},
46+
};
47+
48+
// Test against /health — works for both Cloud and self-hosted
49+
test: ICredentialTestRequest = {
50+
request: {
51+
baseURL: '={{ $credentials.apiUrl }}',
52+
url: '/health',
53+
method: 'GET',
54+
},
55+
};
56+
}

0 commit comments

Comments
 (0)