n8n-nodes-analytics 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.
- package/LICENSE +21 -0
- package/README.md +214 -0
- package/dist/credentials/N8nApi.credentials.d.ts +10 -0
- package/dist/credentials/N8nApi.credentials.d.ts.map +1 -0
- package/dist/credentials/N8nApi.credentials.js +52 -0
- package/dist/credentials/N8nApi.credentials.js.map +1 -0
- package/dist/nodes/Analytics/Analytics.node.d.ts +6 -0
- package/dist/nodes/Analytics/Analytics.node.d.ts.map +1 -0
- package/dist/nodes/Analytics/Analytics.node.js +284 -0
- package/dist/nodes/Analytics/Analytics.node.js.map +1 -0
- package/dist/nodes/Analytics/Description.d.ts +5 -0
- package/dist/nodes/Analytics/Description.d.ts.map +1 -0
- package/dist/nodes/Analytics/Description.js +296 -0
- package/dist/nodes/Analytics/Description.js.map +1 -0
- package/dist/nodes/Analytics/GenericFunctions.d.ts +8 -0
- package/dist/nodes/Analytics/GenericFunctions.d.ts.map +1 -0
- package/dist/nodes/Analytics/GenericFunctions.js +100 -0
- package/dist/nodes/Analytics/GenericFunctions.js.map +1 -0
- package/dist/nodes/Analytics/Helpers.d.ts +101 -0
- package/dist/nodes/Analytics/Helpers.d.ts.map +1 -0
- package/dist/nodes/Analytics/Helpers.js +520 -0
- package/dist/nodes/Analytics/Helpers.js.map +1 -0
- package/dist/nodes/Analytics/Transport.d.ts +3 -0
- package/dist/nodes/Analytics/Transport.d.ts.map +1 -0
- package/dist/nodes/Analytics/Transport.js +10 -0
- package/dist/nodes/Analytics/Transport.js.map +1 -0
- package/dist/nodes/Analytics/Validators.d.ts +5 -0
- package/dist/nodes/Analytics/Validators.d.ts.map +1 -0
- package/dist/nodes/Analytics/Validators.js +43 -0
- package/dist/nodes/Analytics/Validators.js.map +1 -0
- package/dist/nodes/Analytics/icon.svg +10 -0
- package/package.json +62 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 n8n-nodes-analytics
|
|
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,214 @@
|
|
|
1
|
+
# n8n-nodes-analytics
|
|
2
|
+
|
|
3
|
+
A powerful [n8n](https://n8n.io) community node that replaces complex 10–20 node analytics workflows with a **single reusable node**. It fetches execution data through the n8n API, automatically detects AI/LLM nodes, calculates token usage and cost analytics, and outputs structured results in multiple formats.
|
|
4
|
+
|
|
5
|
+
[Installation](#installation) · [Credentials](#credentials) · [Operations](#operations) · [AI Token Analytics](#ai-token-analytics) · [Cost Analytics](#cost-analytics) · [Architecture](#architecture)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- 📊 **8 operations** covering execution, workflow, node, timeline, token, model and cost analytics
|
|
12
|
+
- 🤖 **Automatic AI node detection** — no configuration needed; works with OpenAI, Anthropic, Gemini, Mistral, Groq, Ollama, OpenRouter, Cohere, DeepSeek and any LangChain LLM node
|
|
13
|
+
- 🔢 **Provider-agnostic token extraction** — normalizes `input_tokens`/`output_tokens`, `prompt_tokens`/`completion_tokens`, cached and reasoning tokens
|
|
14
|
+
- 💰 **Cost estimation** with a built-in pricing table, fuzzy model matching, custom pricing overrides and multi-currency output
|
|
15
|
+
- 📤 **Multiple export formats** — JSON, flat JSON, CSV, Markdown
|
|
16
|
+
- ⚡ **Single-pass, Map-based aggregation** — one traversal of `runData`, lazy evaluation per operation
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
### Community Nodes (recommended)
|
|
23
|
+
|
|
24
|
+
1. In n8n, go to **Settings → Community Nodes**.
|
|
25
|
+
2. Select **Install**.
|
|
26
|
+
3. Enter `n8n-nodes-analytics` and confirm.
|
|
27
|
+
|
|
28
|
+
### Manual / npm
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install n8n-nodes-analytics
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
For local development:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
git clone <this-repo>
|
|
38
|
+
cd n8n-nodes-analytics
|
|
39
|
+
npm install
|
|
40
|
+
npm run build
|
|
41
|
+
# link into your n8n custom nodes directory
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Credentials
|
|
47
|
+
|
|
48
|
+
The node authenticates against the n8n REST API using an **n8n API** credential.
|
|
49
|
+
|
|
50
|
+
1. In n8n, open **Settings → API** and create an API key.
|
|
51
|
+
2. In the credential, set:
|
|
52
|
+
- **Base URL** — your n8n instance URL, e.g. `http://localhost:5678` (no trailing slash)
|
|
53
|
+
- **API Key** — the key you just created
|
|
54
|
+
|
|
55
|
+
The credential is verified automatically against `GET /api/v1/executions`.
|
|
56
|
+
|
|
57
|
+
> The API key is sent as the `X-N8N-API-KEY` header. All requests go to `{{baseUrl}}/api/v1/...`.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Operations
|
|
62
|
+
|
|
63
|
+
Select the **Execution Analytics** resource, then one of the following operations. Every operation accepts an **Execution ID**, or enable **Use Current Execution** to analyze the running execution.
|
|
64
|
+
|
|
65
|
+
| Operation | Description | Key parameters |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| **Analyze Execution** | Fetch and analyze a single execution (summary of status, duration, node & AI counts, errors) | — |
|
|
68
|
+
| **Token Summary** | Extract AI token usage across all AI nodes | `Group By`: none / provider / model / workflow / node |
|
|
69
|
+
| **Workflow Summary** | Workflow-level metadata & stats | — |
|
|
70
|
+
| **AI Model Summary** | Per-model breakdown of AI usage | — |
|
|
71
|
+
| **Cost Summary** | Estimate costs from token usage | `Cost Source`, `Currency`, `Custom Pricing` |
|
|
72
|
+
| **Node Statistics** | Per-node execution stats | `Filter`: all / ai / failed / successful / trigger / http |
|
|
73
|
+
| **Execution Timeline** | Ordered timeline of node executions | — |
|
|
74
|
+
| **Export Analytics** | Full analytics in a chosen format | `Output Format`: json / flatJson / csv / markdown |
|
|
75
|
+
|
|
76
|
+
### Advanced Options (collection)
|
|
77
|
+
|
|
78
|
+
Toggle what appears in the output:
|
|
79
|
+
|
|
80
|
+
- Include Token Usage
|
|
81
|
+
- Include Costs
|
|
82
|
+
- Include Errors
|
|
83
|
+
- Include Node Timing
|
|
84
|
+
- Include Workflow Metadata
|
|
85
|
+
- Include AI Metadata
|
|
86
|
+
- Include Raw Execution *(attaches the full raw execution — large)*
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## AI Token Analytics
|
|
91
|
+
|
|
92
|
+
AI nodes are detected two ways, so the node keeps working as new integrations appear:
|
|
93
|
+
|
|
94
|
+
1. **Node type matching** — known LangChain / base LLM node types (`lmChatOpenAi`, `lmChatAnthropic`, `lmChatGoogleGemini`, `lmMistral`, `lmChatGroq`, `lmOllama`, `lmChatOpenRouter`, …) and any type containing `langchain`, `lm`, `ai`, `agent`, `embeddings`, or a provider name.
|
|
95
|
+
2. **Output inspection (future-proof fallback)** — any node whose output contains a `tokenUsage` / `usage` / `token_usage` object (found recursively) is treated as an AI node.
|
|
96
|
+
|
|
97
|
+
Token fields are normalized across providers:
|
|
98
|
+
|
|
99
|
+
| Provider field | Normalized to |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| `prompt_tokens`, `input_tokens` | `prompt_tokens` |
|
|
102
|
+
| `completion_tokens`, `output_tokens` | `completion_tokens` |
|
|
103
|
+
| `prompt_tokens_details.cached_tokens`, `cache_read_input_tokens` | `cached_tokens` |
|
|
104
|
+
| `completion_tokens_details.reasoning_tokens` | `reasoning_tokens` |
|
|
105
|
+
| `total_tokens` (or derived `prompt + completion`) | `total_tokens` |
|
|
106
|
+
|
|
107
|
+
### Provider support matrix
|
|
108
|
+
|
|
109
|
+
| Provider | Detected by |
|
|
110
|
+
| --- | --- |
|
|
111
|
+
| OpenAI | `openai`, `gpt`, `o1`, `o3`, `davinci` |
|
|
112
|
+
| Anthropic | `anthropic`, `claude` |
|
|
113
|
+
| Google Gemini | `google`, `gemini`, `palm`, `vertex` |
|
|
114
|
+
| Mistral | `mistral`, `mixtral` |
|
|
115
|
+
| Groq | `groq` |
|
|
116
|
+
| Ollama | `ollama` |
|
|
117
|
+
| OpenRouter | `openrouter` |
|
|
118
|
+
| Cohere | `cohere` |
|
|
119
|
+
| DeepSeek | `deepseek` |
|
|
120
|
+
| *others* | falls back to `Unknown` (tokens still counted) |
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Cost Analytics
|
|
125
|
+
|
|
126
|
+
Costs are estimated from the built-in pricing table (USD per **1M tokens**), with fuzzy prefix matching so versioned model names like `gpt-4o-2024-08-06` resolve to `gpt-4o`.
|
|
127
|
+
|
|
128
|
+
| Model | Prompt | Completion |
|
|
129
|
+
| --- | --- | --- |
|
|
130
|
+
| gpt-4o | 2.50 | 10.00 |
|
|
131
|
+
| gpt-4o-mini | 0.15 | 0.60 |
|
|
132
|
+
| gpt-4-turbo | 10.00 | 30.00 |
|
|
133
|
+
| o1 | 15.00 | 60.00 |
|
|
134
|
+
| claude-3-5-sonnet | 3.00 | 15.00 |
|
|
135
|
+
| claude-3-opus | 15.00 | 75.00 |
|
|
136
|
+
| claude-3-haiku | 0.25 | 1.25 |
|
|
137
|
+
| gemini-1.5-pro | 1.25 | 5.00 |
|
|
138
|
+
| gemini-1.5-flash | 0.075 | 0.30 |
|
|
139
|
+
| mistral-large | 2.00 | 6.00 |
|
|
140
|
+
| llama-3-70b | 0.59 | 0.79 |
|
|
141
|
+
| deepseek-chat | 0.27 | 1.10 |
|
|
142
|
+
|
|
143
|
+
*(abbreviated — see [`Helpers.ts`](nodes/Analytics/Helpers.ts) for the full table)*
|
|
144
|
+
|
|
145
|
+
- **Cached tokens** are billed at 50% of the prompt rate and excluded from the full-price prompt total.
|
|
146
|
+
- **Custom pricing** (Cost Source → *Custom Pricing*) is merged over the built-in table:
|
|
147
|
+
```json
|
|
148
|
+
{ "my-model": { "prompt": 1.0, "completion": 2.0 } }
|
|
149
|
+
```
|
|
150
|
+
- **Currency** — costs are computed in USD then converted (USD, EUR, NPR, GBP, INR) for display convenience.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Architecture
|
|
155
|
+
|
|
156
|
+
```mermaid
|
|
157
|
+
flowchart TD
|
|
158
|
+
A[Analytics.node.ts<br/>execute] --> B[GenericFunctions<br/>resolveExecutionId]
|
|
159
|
+
B --> C[Validators<br/>validateExecutionId]
|
|
160
|
+
A --> D[Transport<br/>fetchExecution]
|
|
161
|
+
D --> E[GenericFunctions<br/>n8nApiRequest] --> F[(n8n REST API)]
|
|
162
|
+
A --> G[Validators<br/>validateExecutionData]
|
|
163
|
+
A --> H{Operation router}
|
|
164
|
+
H --> I[Helpers<br/>extractNodeAnalytics]
|
|
165
|
+
H --> J[Helpers<br/>extractAiAnalytics]
|
|
166
|
+
J --> K[detectProvider / extractTokenUsage / extractModel]
|
|
167
|
+
H --> L[Helpers<br/>aggregateTokens]
|
|
168
|
+
H --> M[Helpers<br/>calculateCost + PRICING]
|
|
169
|
+
H --> N[Helpers<br/>buildTimeline / filterNodes]
|
|
170
|
+
H --> O[Helpers<br/>toFlatJson / toCsv / toMarkdown]
|
|
171
|
+
I --> P[INodeExecutionData]
|
|
172
|
+
J --> P
|
|
173
|
+
L --> P
|
|
174
|
+
M --> P
|
|
175
|
+
N --> P
|
|
176
|
+
O --> P
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
| File | Responsibility |
|
|
180
|
+
| --- | --- |
|
|
181
|
+
| [`Analytics.node.ts`](nodes/Analytics/Analytics.node.ts) | `INodeType` + `execute()`, operation routing |
|
|
182
|
+
| [`Description.ts`](nodes/Analytics/Description.ts) | UI definition (resource, operations, parameters) |
|
|
183
|
+
| [`Transport.ts`](nodes/Analytics/Transport.ts) | Fetch execution via the API |
|
|
184
|
+
| [`GenericFunctions.ts`](nodes/Analytics/GenericFunctions.ts) | API request helper, ID resolution, duration/date utils |
|
|
185
|
+
| [`Helpers.ts`](nodes/Analytics/Helpers.ts) | AI detection, token/cost engine, aggregation, formatters |
|
|
186
|
+
| [`Validators.ts`](nodes/Analytics/Validators.ts) | Input & data validation |
|
|
187
|
+
| [`credentials/N8nApi.credentials.ts`](credentials/N8nApi.credentials.ts) | n8n API credential |
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Development
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
npm install
|
|
195
|
+
npm run lint # ESLint (TypeScript)
|
|
196
|
+
npm run build # tsc + copy icons to dist
|
|
197
|
+
npm test # Jest unit tests
|
|
198
|
+
npm pack # produce the publishable tarball
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Unit tests cover token extraction across provider formats, provider detection, cost calculation (built-in + custom + currency + cached discount), aggregation by every group-by mode, export formatters, filters, timeline ordering, and end-to-end extraction over an execution fixture.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Changelog
|
|
206
|
+
|
|
207
|
+
### 1.0.0
|
|
208
|
+
- Initial release: 8 operations, automatic AI node detection, token normalization, cost estimation with custom pricing & multi-currency, and JSON/flat-JSON/CSV/Markdown export.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## License
|
|
213
|
+
|
|
214
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class N8nApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=N8nApi.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"N8nApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/N8nApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,MAAM,cAAc,CAAC;AAQtB,qBAAa,MAAO,YAAW,eAAe;IAC7C,IAAI,SAAY;IAChB,WAAW,SAAa;IACxB,gBAAgB,SAA8B;IAE9C,UAAU,EAAE,eAAe,EAAE,CAsB3B;IAEF,YAAY,EAAE,oBAAoB,CAOhC;IAEF,IAAI,EAAE,sBAAsB,CAQ1B;CACF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.N8nApi = void 0;
|
|
4
|
+
class N8nApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'n8nApi';
|
|
7
|
+
this.displayName = 'n8n API';
|
|
8
|
+
this.documentationUrl = 'https://docs.n8n.io/api/';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Base URL',
|
|
12
|
+
name: 'baseUrl',
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: 'http://localhost:5678',
|
|
15
|
+
placeholder: 'https://your-n8n-instance.com',
|
|
16
|
+
description: 'The base URL of your n8n instance (without trailing slash)',
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'API Key',
|
|
21
|
+
name: 'apiKey',
|
|
22
|
+
type: 'string',
|
|
23
|
+
typeOptions: {
|
|
24
|
+
password: true,
|
|
25
|
+
},
|
|
26
|
+
default: '',
|
|
27
|
+
placeholder: 'n8n_api_...',
|
|
28
|
+
description: 'API key generated from n8n Settings → API → Create API Key',
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
this.authenticate = {
|
|
33
|
+
type: 'generic',
|
|
34
|
+
properties: {
|
|
35
|
+
headers: {
|
|
36
|
+
'X-N8N-API-KEY': '={{$credentials.apiKey}}',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
this.test = {
|
|
41
|
+
request: {
|
|
42
|
+
baseURL: '={{$credentials.baseUrl}}',
|
|
43
|
+
url: '/api/v1/executions',
|
|
44
|
+
qs: {
|
|
45
|
+
limit: '1',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.N8nApi = N8nApi;
|
|
52
|
+
//# sourceMappingURL=N8nApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"N8nApi.credentials.js","sourceRoot":"","sources":["../../credentials/N8nApi.credentials.ts"],"names":[],"mappings":";;;AAaA,MAAa,MAAM;IAAnB;QACC,SAAI,GAAG,QAAQ,CAAC;QAChB,gBAAW,GAAG,SAAS,CAAC;QACxB,qBAAgB,GAAG,0BAA0B,CAAC;QAE9C,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,uBAAuB;gBAChC,WAAW,EAAE,+BAA+B;gBAC5C,WAAW,EAAE,4DAA4D;gBACzE,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,aAAa;gBAC1B,WAAW,EAAE,4DAA4D;gBACzE,QAAQ,EAAE,IAAI;aACd;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,eAAe,EAAE,0BAA0B;iBAC3C;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,2BAA2B;gBACpC,GAAG,EAAE,oBAAoB;gBACzB,EAAE,EAAE;oBACH,KAAK,EAAE,GAAG;iBACV;aACD;SACD,CAAC;IACH,CAAC;CAAA;AA/CD,wBA+CC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class Analytics implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=Analytics.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Analytics.node.d.ts","sourceRoot":"","sources":["../../../nodes/Analytics/Analytics.node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAEpB,MAAM,cAAc,CAAC;AAsCtB,qBAAa,SAAU,YAAW,SAAS;IAC1C,WAAW,EAAE,oBAAoB,CAqB/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAqEvE"}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Analytics = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const Description_1 = require("./Description");
|
|
6
|
+
const Transport_1 = require("./Transport");
|
|
7
|
+
const GenericFunctions_1 = require("./GenericFunctions");
|
|
8
|
+
const Validators_1 = require("./Validators");
|
|
9
|
+
const Helpers_1 = require("./Helpers");
|
|
10
|
+
class Analytics {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.description = {
|
|
13
|
+
displayName: 'Analytics',
|
|
14
|
+
name: 'analytics',
|
|
15
|
+
icon: 'file:icon.svg',
|
|
16
|
+
group: ['transform'],
|
|
17
|
+
version: 1,
|
|
18
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
19
|
+
description: 'Analyze n8n executions: AI token usage, cost estimation, per-node stats, timelines and more',
|
|
20
|
+
defaults: {
|
|
21
|
+
name: 'Analytics',
|
|
22
|
+
},
|
|
23
|
+
inputs: ['main'],
|
|
24
|
+
outputs: ['main'],
|
|
25
|
+
credentials: [
|
|
26
|
+
{
|
|
27
|
+
name: 'n8nApi',
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
properties: Description_1.nodeProperties,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
async execute() {
|
|
35
|
+
const items = this.getInputData();
|
|
36
|
+
const returnData = [];
|
|
37
|
+
const node = this.getNode();
|
|
38
|
+
for (let i = 0; i < items.length; i++) {
|
|
39
|
+
try {
|
|
40
|
+
const operation = this.getNodeParameter('operation', i);
|
|
41
|
+
const advanced = this.getNodeParameter('advancedOptions', i, {});
|
|
42
|
+
const executionId = (0, GenericFunctions_1.resolveExecutionId)(this, i);
|
|
43
|
+
(0, Validators_1.validateExecutionId)(executionId, node);
|
|
44
|
+
const execution = await Transport_1.fetchExecution.call(this, executionId);
|
|
45
|
+
(0, Validators_1.validateExecutionData)(execution, node);
|
|
46
|
+
let result;
|
|
47
|
+
switch (operation) {
|
|
48
|
+
case 'analyzeExecution':
|
|
49
|
+
result = handleAnalyzeExecution(execution, advanced);
|
|
50
|
+
break;
|
|
51
|
+
case 'tokenSummary':
|
|
52
|
+
result = handleTokenSummary(this, execution, i);
|
|
53
|
+
break;
|
|
54
|
+
case 'workflowSummary':
|
|
55
|
+
result = handleWorkflowSummary(execution);
|
|
56
|
+
break;
|
|
57
|
+
case 'aiModelSummary':
|
|
58
|
+
result = handleAiModelSummary(execution);
|
|
59
|
+
break;
|
|
60
|
+
case 'costSummary':
|
|
61
|
+
result = handleCostSummary(this, execution, i, node);
|
|
62
|
+
break;
|
|
63
|
+
case 'nodeStatistics':
|
|
64
|
+
result = handleNodeStatistics(this, execution, i, advanced);
|
|
65
|
+
break;
|
|
66
|
+
case 'executionTimeline':
|
|
67
|
+
result = handleExecutionTimeline(execution);
|
|
68
|
+
break;
|
|
69
|
+
case 'exportAnalytics':
|
|
70
|
+
result = handleExportAnalytics(this, execution, i, advanced);
|
|
71
|
+
break;
|
|
72
|
+
default:
|
|
73
|
+
throw new n8n_workflow_1.NodeOperationError(node, `Unknown operation: ${operation}`, {
|
|
74
|
+
itemIndex: i,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (advanced.includeRawExecution) {
|
|
78
|
+
result.rawExecution = execution;
|
|
79
|
+
}
|
|
80
|
+
returnData.push({ json: result, pairedItem: { item: i } });
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
if (this.continueOnFail()) {
|
|
84
|
+
returnData.push({
|
|
85
|
+
json: { error: error.message },
|
|
86
|
+
pairedItem: { item: i },
|
|
87
|
+
});
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
throw error;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return [returnData];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.Analytics = Analytics;
|
|
97
|
+
function handleAnalyzeExecution(execution, advanced) {
|
|
98
|
+
const metadata = (0, Helpers_1.extractWorkflowMetadata)(execution);
|
|
99
|
+
const nodes = (0, Helpers_1.extractNodeAnalytics)(execution);
|
|
100
|
+
const aiNodes = (0, Helpers_1.extractAiAnalytics)(execution);
|
|
101
|
+
const totalTokens = sumTokens(aiNodes);
|
|
102
|
+
const result = {
|
|
103
|
+
executionId: metadata.executionId,
|
|
104
|
+
workflowName: metadata.workflowName,
|
|
105
|
+
status: metadata.status,
|
|
106
|
+
duration: (0, GenericFunctions_1.formatDuration)(metadata.duration_ms),
|
|
107
|
+
duration_ms: metadata.duration_ms,
|
|
108
|
+
nodeCount: nodes.length,
|
|
109
|
+
aiNodeCount: aiNodes.length,
|
|
110
|
+
};
|
|
111
|
+
if (advanced.includeWorkflowMetadata !== false)
|
|
112
|
+
result.workflow = metadata;
|
|
113
|
+
if (advanced.includeTokenUsage !== false)
|
|
114
|
+
result.totalTokens = totalTokens;
|
|
115
|
+
if (advanced.includeErrors !== false) {
|
|
116
|
+
const errors = nodes.filter((n) => n.status === 'error').map((n) => ({ node: n.name, error: n.error }));
|
|
117
|
+
result.errors = errors;
|
|
118
|
+
}
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
function handleTokenSummary(ctx, execution, i) {
|
|
122
|
+
const groupBy = ctx.getNodeParameter('groupBy', i, 'none');
|
|
123
|
+
const metadata = (0, Helpers_1.extractWorkflowMetadata)(execution);
|
|
124
|
+
const aiNodes = (0, Helpers_1.extractAiAnalytics)(execution);
|
|
125
|
+
const grouped = (0, Helpers_1.aggregateTokens)(aiNodes, groupBy, metadata.workflowName);
|
|
126
|
+
return {
|
|
127
|
+
executionId: metadata.executionId,
|
|
128
|
+
groupBy,
|
|
129
|
+
aiNodeCount: aiNodes.length,
|
|
130
|
+
total: sumTokens(aiNodes),
|
|
131
|
+
groups: grouped,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function handleWorkflowSummary(execution) {
|
|
135
|
+
const metadata = (0, Helpers_1.extractWorkflowMetadata)(execution);
|
|
136
|
+
const nodes = (0, Helpers_1.extractNodeAnalytics)(execution);
|
|
137
|
+
return Object.assign(Object.assign({}, metadata), { durationHuman: (0, GenericFunctions_1.formatDuration)(metadata.duration_ms), successfulNodes: nodes.filter((n) => n.status === 'success').length, failedNodes: nodes.filter((n) => n.status === 'error').length, aiNodeCount: nodes.filter((n) => n.isAiNode).length });
|
|
138
|
+
}
|
|
139
|
+
function handleAiModelSummary(execution) {
|
|
140
|
+
const metadata = (0, Helpers_1.extractWorkflowMetadata)(execution);
|
|
141
|
+
const aiNodes = (0, Helpers_1.extractAiAnalytics)(execution);
|
|
142
|
+
const grouped = (0, Helpers_1.aggregateTokens)(aiNodes, 'model', metadata.workflowName);
|
|
143
|
+
return {
|
|
144
|
+
executionId: metadata.executionId,
|
|
145
|
+
modelCount: grouped.length,
|
|
146
|
+
models: grouped.map((g) => ({
|
|
147
|
+
model: g.group,
|
|
148
|
+
nodeCount: g.nodeCount,
|
|
149
|
+
tokens: g.tokens,
|
|
150
|
+
})),
|
|
151
|
+
nodes: aiNodes,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function handleCostSummary(ctx, execution, i, node) {
|
|
155
|
+
const costSource = ctx.getNodeParameter('costSource', i, 'builtin');
|
|
156
|
+
const currency = ctx.getNodeParameter('currency', i, 'USD');
|
|
157
|
+
let customPricing;
|
|
158
|
+
if (costSource === 'custom') {
|
|
159
|
+
const raw = ctx.getNodeParameter('customPricing', i, {});
|
|
160
|
+
customPricing = typeof raw === 'string' ? safeParseJson(raw, node) : raw;
|
|
161
|
+
(0, Validators_1.validateCustomPricing)(customPricing, node);
|
|
162
|
+
}
|
|
163
|
+
const metadata = (0, Helpers_1.extractWorkflowMetadata)(execution);
|
|
164
|
+
const aiNodes = (0, Helpers_1.extractAiAnalytics)(execution);
|
|
165
|
+
let grandTotal = 0;
|
|
166
|
+
const perNode = aiNodes.map((n) => {
|
|
167
|
+
const cost = (0, Helpers_1.calculateCost)(n.tokens, n.model, currency, customPricing);
|
|
168
|
+
grandTotal += cost.total_cost;
|
|
169
|
+
return {
|
|
170
|
+
node: n.node,
|
|
171
|
+
provider: n.provider,
|
|
172
|
+
model: n.model,
|
|
173
|
+
tokens: n.tokens,
|
|
174
|
+
cost,
|
|
175
|
+
};
|
|
176
|
+
});
|
|
177
|
+
return {
|
|
178
|
+
executionId: metadata.executionId,
|
|
179
|
+
currency: currency.toUpperCase(),
|
|
180
|
+
costSource,
|
|
181
|
+
totalCost: Math.round(grandTotal * 1e6) / 1e6,
|
|
182
|
+
nodes: perNode,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function handleNodeStatistics(ctx, execution, i, advanced) {
|
|
186
|
+
const filterType = ctx.getNodeParameter('filterType', i, 'all');
|
|
187
|
+
const metadata = (0, Helpers_1.extractWorkflowMetadata)(execution);
|
|
188
|
+
let nodes = (0, Helpers_1.extractNodeAnalytics)(execution);
|
|
189
|
+
nodes = (0, Helpers_1.filterNodes)(nodes, filterType);
|
|
190
|
+
const stats = nodes.map((n) => {
|
|
191
|
+
const entry = {
|
|
192
|
+
name: n.name,
|
|
193
|
+
type: n.type,
|
|
194
|
+
order: n.order,
|
|
195
|
+
status: n.status,
|
|
196
|
+
items: n.items,
|
|
197
|
+
retries: n.retries,
|
|
198
|
+
isAiNode: n.isAiNode,
|
|
199
|
+
};
|
|
200
|
+
if (advanced.includeNodeTiming !== false) {
|
|
201
|
+
entry.startTime = n.startTime;
|
|
202
|
+
entry.endTime = n.endTime;
|
|
203
|
+
entry.duration_ms = n.duration_ms;
|
|
204
|
+
entry.duration = (0, GenericFunctions_1.formatDuration)(n.duration_ms);
|
|
205
|
+
}
|
|
206
|
+
if (advanced.includeErrors !== false && n.error)
|
|
207
|
+
entry.error = n.error;
|
|
208
|
+
return entry;
|
|
209
|
+
});
|
|
210
|
+
return {
|
|
211
|
+
executionId: metadata.executionId,
|
|
212
|
+
filter: filterType,
|
|
213
|
+
nodeCount: stats.length,
|
|
214
|
+
nodes: stats,
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
function handleExecutionTimeline(execution) {
|
|
218
|
+
const metadata = (0, Helpers_1.extractWorkflowMetadata)(execution);
|
|
219
|
+
const nodes = (0, Helpers_1.extractNodeAnalytics)(execution);
|
|
220
|
+
const timeline = (0, Helpers_1.buildTimeline)(nodes);
|
|
221
|
+
return {
|
|
222
|
+
executionId: metadata.executionId,
|
|
223
|
+
totalDuration_ms: metadata.duration_ms,
|
|
224
|
+
totalDuration: (0, GenericFunctions_1.formatDuration)(metadata.duration_ms),
|
|
225
|
+
timeline: timeline.map((t) => (Object.assign(Object.assign({}, t), { duration: (0, GenericFunctions_1.formatDuration)(t.duration_ms), label: `${t.order}. ${t.node} → ${(0, GenericFunctions_1.formatDuration)(t.duration_ms)} [${t.status}]` }))),
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function handleExportAnalytics(ctx, execution, i, advanced) {
|
|
229
|
+
const outputFormat = ctx.getNodeParameter('outputFormat', i, 'json');
|
|
230
|
+
const metadata = (0, Helpers_1.extractWorkflowMetadata)(execution);
|
|
231
|
+
const nodes = (0, Helpers_1.extractNodeAnalytics)(execution);
|
|
232
|
+
const aiNodes = (0, Helpers_1.extractAiAnalytics)(execution);
|
|
233
|
+
const full = {};
|
|
234
|
+
if (advanced.includeWorkflowMetadata !== false)
|
|
235
|
+
full.workflow = metadata;
|
|
236
|
+
full.nodes = nodes;
|
|
237
|
+
if (advanced.includeAiMetadata !== false)
|
|
238
|
+
full.aiNodes = aiNodes;
|
|
239
|
+
if (advanced.includeTokenUsage !== false)
|
|
240
|
+
full.totalTokens = sumTokens(aiNodes);
|
|
241
|
+
if (advanced.includeErrors !== false) {
|
|
242
|
+
full.errors = nodes
|
|
243
|
+
.filter((n) => n.status === 'error')
|
|
244
|
+
.map((n) => ({ node: n.name, error: n.error }));
|
|
245
|
+
}
|
|
246
|
+
switch (outputFormat) {
|
|
247
|
+
case 'flatJson':
|
|
248
|
+
return { format: 'flatJson', data: (0, Helpers_1.toFlatJson)(full) };
|
|
249
|
+
case 'csv':
|
|
250
|
+
return { format: 'csv', data: (0, Helpers_1.toCsv)(nodes) };
|
|
251
|
+
case 'markdown':
|
|
252
|
+
return {
|
|
253
|
+
format: 'markdown',
|
|
254
|
+
data: (0, Helpers_1.toMarkdown)(nodes, `Analytics — ${metadata.workflowName || metadata.executionId}`),
|
|
255
|
+
};
|
|
256
|
+
case 'json':
|
|
257
|
+
default:
|
|
258
|
+
return { format: 'json', data: full };
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
function sumTokens(aiNodes) {
|
|
262
|
+
return aiNodes.reduce((acc, n) => ({
|
|
263
|
+
prompt_tokens: acc.prompt_tokens + n.tokens.prompt_tokens,
|
|
264
|
+
completion_tokens: acc.completion_tokens + n.tokens.completion_tokens,
|
|
265
|
+
cached_tokens: acc.cached_tokens + n.tokens.cached_tokens,
|
|
266
|
+
reasoning_tokens: acc.reasoning_tokens + n.tokens.reasoning_tokens,
|
|
267
|
+
total_tokens: acc.total_tokens + n.tokens.total_tokens,
|
|
268
|
+
}), {
|
|
269
|
+
prompt_tokens: 0,
|
|
270
|
+
completion_tokens: 0,
|
|
271
|
+
cached_tokens: 0,
|
|
272
|
+
reasoning_tokens: 0,
|
|
273
|
+
total_tokens: 0,
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
function safeParseJson(raw, node) {
|
|
277
|
+
try {
|
|
278
|
+
return JSON.parse(raw);
|
|
279
|
+
}
|
|
280
|
+
catch (_a) {
|
|
281
|
+
throw new n8n_workflow_1.NodeOperationError(node, 'Custom Pricing is not valid JSON.');
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
//# sourceMappingURL=Analytics.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Analytics.node.js","sourceRoot":"","sources":["../../../nodes/Analytics/Analytics.node.ts"],"names":[],"mappings":";;;AAOA,+CAAkD;AAElD,+CAA+C;AAC/C,2CAA6C;AAC7C,yDAAwE;AACxE,6CAIsB;AACtB,uCAemB;AAYnB,MAAa,SAAS;IAAtB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,eAAe;YACrB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EACV,6FAA6F;YAC9F,QAAQ,EAAE;gBACT,IAAI,EAAE,WAAW;aACjB;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE,4BAAc;SAC1B,CAAC;IAuEH,CAAC;IArEA,KAAK,CAAC,OAAO;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,MAAM,UAAU,GAAyB,EAAE,CAAC;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAE5B,KAAK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