n8n-nodes-entity-enricher 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +137 -0
  3. package/dist/credentials/EntityEnricherApi.credentials.d.ts +10 -0
  4. package/dist/credentials/EntityEnricherApi.credentials.d.ts.map +1 -0
  5. package/dist/credentials/EntityEnricherApi.credentials.js +46 -0
  6. package/dist/credentials/EntityEnricherApi.credentials.js.map +1 -0
  7. package/dist/nodes/EntityEnricher/EntityEnricher.node.d.ts +15 -0
  8. package/dist/nodes/EntityEnricher/EntityEnricher.node.d.ts.map +1 -0
  9. package/dist/nodes/EntityEnricher/EntityEnricher.node.js +576 -0
  10. package/dist/nodes/EntityEnricher/EntityEnricher.node.js.map +1 -0
  11. package/dist/nodes/EntityEnricher/entity-enricher.svg +77 -0
  12. package/dist/nodes/EntityEnricher/helpers/api.d.ts +19 -0
  13. package/dist/nodes/EntityEnricher/helpers/api.d.ts.map +1 -0
  14. package/dist/nodes/EntityEnricher/helpers/api.js +49 -0
  15. package/dist/nodes/EntityEnricher/helpers/api.js.map +1 -0
  16. package/dist/nodes/EntityEnricher/helpers/sse.d.ts +14 -0
  17. package/dist/nodes/EntityEnricher/helpers/sse.d.ts.map +1 -0
  18. package/dist/nodes/EntityEnricher/helpers/sse.js +133 -0
  19. package/dist/nodes/EntityEnricher/helpers/sse.js.map +1 -0
  20. package/dist/nodes/EntityEnricher/helpers/types.d.ts +134 -0
  21. package/dist/nodes/EntityEnricher/helpers/types.d.ts.map +1 -0
  22. package/dist/nodes/EntityEnricher/helpers/types.js +3 -0
  23. package/dist/nodes/EntityEnricher/helpers/types.js.map +1 -0
  24. package/dist/nodes/EntityEnricher/helpers/validation.d.ts +24 -0
  25. package/dist/nodes/EntityEnricher/helpers/validation.d.ts.map +1 -0
  26. package/dist/nodes/EntityEnricher/helpers/validation.js +76 -0
  27. package/dist/nodes/EntityEnricher/helpers/validation.js.map +1 -0
  28. package/dist/nodes/EntityEnricher/operations/batchEnrich.d.ts +15 -0
  29. package/dist/nodes/EntityEnricher/operations/batchEnrich.d.ts.map +1 -0
  30. package/dist/nodes/EntityEnricher/operations/batchEnrich.js +140 -0
  31. package/dist/nodes/EntityEnricher/operations/batchEnrich.js.map +1 -0
  32. package/dist/nodes/EntityEnricher/operations/enrichEntity.d.ts +11 -0
  33. package/dist/nodes/EntityEnricher/operations/enrichEntity.d.ts.map +1 -0
  34. package/dist/nodes/EntityEnricher/operations/enrichEntity.js +172 -0
  35. package/dist/nodes/EntityEnricher/operations/enrichEntity.js.map +1 -0
  36. package/dist/nodes/EntityEnricher/operations/getOptions.d.ts +3 -0
  37. package/dist/nodes/EntityEnricher/operations/getOptions.d.ts.map +1 -0
  38. package/dist/nodes/EntityEnricher/operations/getOptions.js +9 -0
  39. package/dist/nodes/EntityEnricher/operations/getOptions.js.map +1 -0
  40. package/dist/nodes/EntityEnricher/operations/getRecord.d.ts +3 -0
  41. package/dist/nodes/EntityEnricher/operations/getRecord.d.ts.map +1 -0
  42. package/dist/nodes/EntityEnricher/operations/getRecord.js +14 -0
  43. package/dist/nodes/EntityEnricher/operations/getRecord.js.map +1 -0
  44. package/dist/nodes/EntityEnricher/operations/getSchemaDetails.d.ts +9 -0
  45. package/dist/nodes/EntityEnricher/operations/getSchemaDetails.d.ts.map +1 -0
  46. package/dist/nodes/EntityEnricher/operations/getSchemaDetails.js +33 -0
  47. package/dist/nodes/EntityEnricher/operations/getSchemaDetails.js.map +1 -0
  48. package/dist/nodes/EntityEnricher/operations/listRecords.d.ts +9 -0
  49. package/dist/nodes/EntityEnricher/operations/listRecords.d.ts.map +1 -0
  50. package/dist/nodes/EntityEnricher/operations/listRecords.js +27 -0
  51. package/dist/nodes/EntityEnricher/operations/listRecords.js.map +1 -0
  52. package/dist/nodes/EntityEnricher/operations/listSchemas.d.ts +3 -0
  53. package/dist/nodes/EntityEnricher/operations/listSchemas.d.ts.map +1 -0
  54. package/dist/nodes/EntityEnricher/operations/listSchemas.js +12 -0
  55. package/dist/nodes/EntityEnricher/operations/listSchemas.js.map +1 -0
  56. package/dist/nodes/EntityEnricher/operations/mergeResults.d.ts +8 -0
  57. package/dist/nodes/EntityEnricher/operations/mergeResults.d.ts.map +1 -0
  58. package/dist/nodes/EntityEnricher/operations/mergeResults.js +58 -0
  59. package/dist/nodes/EntityEnricher/operations/mergeResults.js.map +1 -0
  60. package/package.json +57 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 TOT Concept
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,137 @@
1
+ # n8n-nodes-entity-enricher
2
+
3
+ [![npm version](https://img.shields.io/npm/v/n8n-nodes-entity-enricher.svg)](https://www.npmjs.com/package/n8n-nodes-entity-enricher)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5
+
6
+ An [n8n](https://n8n.io/) community node that integrates with [Entity Enricher](https://entityenricher.ai) — a multi-model LLM enrichment platform with schema-driven structured output, multilingual support, and automated fusion.
7
+
8
+ ![Single entity enrichment workflow](https://entityenricher.ai/docs/N8NSingleEntity.png)
9
+
10
+ ## Installation
11
+
12
+ ### From the n8n UI
13
+
14
+ 1. Go to **Settings > Community Nodes**
15
+ 2. Click **Install a community node**
16
+ 3. Enter `n8n-nodes-entity-enricher`
17
+ 4. Click **Install**
18
+
19
+ ### From the command line
20
+
21
+ ```bash
22
+ npm install n8n-nodes-entity-enricher
23
+ ```
24
+
25
+ ## Prerequisites
26
+
27
+ 1. An Entity Enricher instance (cloud or self-hosted)
28
+ 2. An API key (create one in **API Keys > App Access Keys**)
29
+
30
+ ### Credential Setup
31
+
32
+ 1. In n8n, go to **Credentials > New Credential**
33
+ 2. Search for **Entity Enricher API**
34
+ 3. Enter your API key (format: `ent_XXXXXXXXXXXX`)
35
+ 4. Set the Base URL (default: `https://entityenricher.ai`)
36
+
37
+ The credential is verified against the API on save.
38
+
39
+ ## Operations
40
+
41
+ | Category | Operation | Description |
42
+ |----------|-----------|-------------|
43
+ | **Enrichment** | Enrich Entity | Enrich a single entity using one or more LLM models with SSE streaming |
44
+ | **Enrichment** | Batch Enrich | Enrich all input items as a single batch with parallel execution |
45
+ | **Schema** | List Schemas | List available saved schemas |
46
+ | **Schema** | Get Schema Details | Get full schema content with extracted search key properties |
47
+ | **Record** | List Records | Query enrichment records with pagination and filters |
48
+ | **Record** | Get Record | Retrieve a specific enrichment result by ID |
49
+ | **Fusion** | Merge Results | Merge multiple model results with optional LLM arbitration |
50
+ | **Configuration** | Get Options | Get available models, languages, and strategies |
51
+
52
+ ## Single Entity Enrichment
53
+
54
+ Enrich a single entity against a schema with one or more LLM models.
55
+
56
+ **Configuration:**
57
+
58
+ ![Node configuration for single enrichment](https://entityenricher.ai/docs/N8NConnectorEnrichment.png)
59
+
60
+ - **Schema**: Select from saved schemas (dynamic dropdown, pinned schemas shown first)
61
+ - **Models**: Choose one or more models (pricing displayed per model)
62
+ - **Languages**: Output languages (English always included)
63
+ - **Strategy**: `multi_expertise` (parallel per-domain) or `single_pass`
64
+ - **Classification Model** *(optional)*: Pre-flight entity type verification to prevent hallucination
65
+ - **Arbitration Model** *(optional)*: LLM-based conflict resolution when using multiple models
66
+ - **Timeout**: Max wait time (default: 5 minutes)
67
+
68
+ **Output:**
69
+
70
+ ```json
71
+ {
72
+ "result": { "company_name": "Pfizer", "headquarters": "New York", "..." : "..." },
73
+ "record_id": "uuid",
74
+ "success": true,
75
+ "is_fused": true,
76
+ "cost_usd": 0.0042,
77
+ "input_tokens": 1250,
78
+ "output_tokens": 890,
79
+ "processing_time_ms": 3200,
80
+ "fusion": { "agreed_fields": 18, "conflicted_fields": 2, "total_fields": 20 },
81
+ "source_models": ["anthropic::claude-sonnet-4-5", "openai::gpt-4o"]
82
+ }
83
+ ```
84
+
85
+ Toggle **Include Per-Model Results** to also output individual model results alongside the fused output.
86
+
87
+ ## Batch Enrichment
88
+
89
+ Enrich all input items in a single batch with parallel execution and per-provider rate limiting.
90
+
91
+ ![Batch enrichment workflow](https://entityenricher.ai/docs/N8NBatchEntities.png)
92
+
93
+ Each input item is treated as one entity. The node outputs one item per entity with the enrichment result, making it easy to chain with database upserts or further processing.
94
+
95
+ ![Batch enrichment configuration](https://entityenricher.ai/docs/N8NConnectorBatchEnrich.png)
96
+
97
+ ## Key Features
98
+
99
+ - **Dynamic dropdowns** — Schemas, models, languages, and strategies are loaded from the API at configuration time
100
+ - **SSE streaming** — Uses server-sent events internally to wait for job completion with automatic lifecycle management (pause/continue/cancel)
101
+ - **Auto-continue** — Automatically continues past classification mismatch pauses (non-interactive)
102
+ - **Search key validation** — Validates that input entities contain the required search keys from the schema
103
+ - **Multi-model fusion** — When using 2+ models, results are automatically merged with field-level conflict detection. Conflicts are resolved via **rule-based merging** (majority vote, median, union) by default, or via **LLM arbitration** when an arbitration model is selected. Fusion can also be triggered manually on existing records with the **Merge Results** operation
104
+ - **Inactivity timeout** — The timeout resets on each progress event, so large batches won't time out as long as entities keep completing. The job is automatically cancelled if no event arrives within the configured period (default: 5 minutes)
105
+
106
+ ## Workflow Ideas
107
+
108
+ | Pattern | Description |
109
+ |---------|-------------|
110
+ | **CRM Enrichment** | Webhook trigger > Extract company > Enrich > Upsert to CRM |
111
+ | **Spreadsheet Pipeline** | Read CSV/Google Sheet > Batch Enrich > Write enriched data back |
112
+ | **Waterfall Enrichment** | Enrich with cheap model > Check quality > Re-enrich failures with premium model |
113
+ | **Scheduled Refresh** | Cron trigger > Fetch stale records > Batch re-enrich > Update database |
114
+ | **Webhook-Driven** | HTTP webhook > Validate input > Enrich > Return result in response |
115
+
116
+ ## Documentation
117
+
118
+ - [n8n Connector Guide](https://entityenricher.ai/docs/integrations/n8n) — Full setup and usage documentation
119
+ - [API Integration Guide](https://entityenricher.ai/docs/api) — REST API reference and code examples
120
+ - [API Keys](https://entityenricher.ai/docs/platform/api-keys) — Creating and managing API keys
121
+
122
+ ## Development
123
+
124
+ ```bash
125
+ # Install dependencies
126
+ npm install
127
+
128
+ # Build
129
+ npm run build
130
+
131
+ # Lint (type check)
132
+ npm run lint
133
+ ```
134
+
135
+ ## License
136
+
137
+ [MIT](LICENSE)
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class EntityEnricherApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
10
+ //# sourceMappingURL=EntityEnricherApi.credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityEnricherApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/EntityEnricherApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,MAAM,cAAc,CAAC;AAEtB,qBAAa,iBAAkB,YAAW,eAAe;IACxD,IAAI,SAAuB;IAC3B,WAAW,SAAyB;IACpC,gBAAgB,SAAoC;IAEpD,UAAU,EAAE,eAAe,EAAE,CAoB3B;IAEF,YAAY,EAAE,oBAAoB,CAOhC;IAEF,IAAI,EAAE,sBAAsB,CAM1B;CACF"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityEnricherApi = void 0;
4
+ class EntityEnricherApi {
5
+ name = 'entityEnricherApi';
6
+ displayName = 'Entity Enricher API';
7
+ documentationUrl = 'https://entityenricher.ai/docs';
8
+ properties = [
9
+ {
10
+ displayName: 'API Key',
11
+ name: 'apiKey',
12
+ type: 'string',
13
+ typeOptions: { password: true },
14
+ required: true,
15
+ default: '',
16
+ placeholder: 'ent_...',
17
+ description: 'Organization access key from Entity Enricher (API Keys page)',
18
+ },
19
+ {
20
+ displayName: 'Base URL',
21
+ name: 'baseUrl',
22
+ type: 'string',
23
+ required: true,
24
+ default: 'https://entityenricher.ai',
25
+ placeholder: 'https://entityenricher.ai',
26
+ description: 'Base URL of your Entity Enricher instance',
27
+ },
28
+ ];
29
+ authenticate = {
30
+ type: 'generic',
31
+ properties: {
32
+ headers: {
33
+ 'X-API-Key': '={{$credentials.apiKey}}',
34
+ },
35
+ },
36
+ };
37
+ test = {
38
+ request: {
39
+ baseURL: '={{$credentials.baseUrl}}',
40
+ url: '/api/enrichment/options',
41
+ method: 'GET',
42
+ },
43
+ };
44
+ }
45
+ exports.EntityEnricherApi = EntityEnricherApi;
46
+ //# sourceMappingURL=EntityEnricherApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityEnricherApi.credentials.js","sourceRoot":"","sources":["../../credentials/EntityEnricherApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,iBAAiB;IAC7B,IAAI,GAAG,mBAAmB,CAAC;IAC3B,WAAW,GAAG,qBAAqB,CAAC;IACpC,gBAAgB,GAAG,gCAAgC,CAAC;IAEpD,UAAU,GAAsB;QAC/B;YACC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC/B,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,8DAA8D;SAC3E;QACD;YACC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,2BAA2B;YACpC,WAAW,EAAE,2BAA2B;YACxC,WAAW,EAAE,2CAA2C;SACxD;KACD,CAAC;IAEF,YAAY,GAAyB;QACpC,IAAI,EAAE,SAAS;QACf,UAAU,EAAE;YACX,OAAO,EAAE;gBACR,WAAW,EAAE,0BAA0B;aACvC;SACD;KACD,CAAC;IAEF,IAAI,GAA2B;QAC9B,OAAO,EAAE;YACR,OAAO,EAAE,2BAA2B;YACpC,GAAG,EAAE,yBAAyB;YAC9B,MAAM,EAAE,KAAK;SACb;KACD,CAAC;CACF;AA3CD,8CA2CC"}
@@ -0,0 +1,15 @@
1
+ import type { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class EntityEnricher implements INodeType {
3
+ description: INodeTypeDescription;
4
+ methods: {
5
+ loadOptions: {
6
+ getSchemas(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
7
+ getModels(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
8
+ getModelsOptional(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
9
+ getLanguages(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
10
+ getStrategies(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
11
+ };
12
+ };
13
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
14
+ }
15
+ //# sourceMappingURL=EntityEnricher.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityEnricher.node.d.ts","sourceRoot":"","sources":["../../../nodes/EntityEnricher/EntityEnricher.node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,MAAM,cAAc,CAAC;AAetB,qBAAa,cAAe,YAAW,SAAS;IAC/C,WAAW,EAAE,oBAAoB,CAiZ/B;IAEF,OAAO;;6BAEkB,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;4BAqBxD,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;oCA2BtE,qBAAqB,GACzB,OAAO,CAAC,oBAAoB,EAAE,CAAC;+BAiB3B,qBAAqB,GACzB,OAAO,CAAC,oBAAoB,EAAE,CAAC;gCAY3B,qBAAqB,GACzB,OAAO,CAAC,oBAAoB,EAAE,CAAC;;MAYlC;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CA+EvE"}