@n8n/ai-workflow-builder 0.32.1 → 0.33.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/dist/agents/responder.agent.d.ts +20 -0
- package/dist/agents/responder.agent.js +95 -0
- package/dist/agents/responder.agent.js.map +1 -0
- package/dist/agents/supervisor.agent.d.ts +30 -0
- package/dist/agents/supervisor.agent.js +99 -0
- package/dist/agents/supervisor.agent.js.map +1 -0
- package/dist/ai-workflow-builder-agent.service.js +4 -0
- package/dist/ai-workflow-builder-agent.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +5 -1
- package/dist/constants.js.map +1 -1
- package/dist/llm-config.d.ts +1 -0
- package/dist/llm-config.js +20 -1
- package/dist/llm-config.js.map +1 -1
- package/dist/multi-agent-workflow-subgraphs.d.ts +85 -0
- package/dist/multi-agent-workflow-subgraphs.js +121 -0
- package/dist/multi-agent-workflow-subgraphs.js.map +1 -0
- package/dist/parent-graph-state.d.ts +23 -0
- package/dist/parent-graph-state.js +34 -0
- package/dist/parent-graph-state.js.map +1 -0
- package/dist/subgraphs/builder.subgraph.d.ts +120 -0
- package/dist/subgraphs/builder.subgraph.js +322 -0
- package/dist/subgraphs/builder.subgraph.js.map +1 -0
- package/dist/subgraphs/configurator.subgraph.d.ts +130 -0
- package/dist/subgraphs/configurator.subgraph.js +242 -0
- package/dist/subgraphs/configurator.subgraph.js.map +1 -0
- package/dist/subgraphs/discovery.subgraph.d.ts +140 -0
- package/dist/subgraphs/discovery.subgraph.js +415 -0
- package/dist/subgraphs/discovery.subgraph.js.map +1 -0
- package/dist/subgraphs/subgraph-interface.d.ts +23 -0
- package/dist/subgraphs/subgraph-interface.js +7 -0
- package/dist/subgraphs/subgraph-interface.js.map +1 -0
- package/dist/tools/builder-tools.d.ts +5 -2
- package/dist/tools/builder-tools.js +15 -25
- package/dist/tools/builder-tools.js.map +1 -1
- package/dist/tools/get-best-practices.tool.d.ts +1 -1
- package/dist/tools/get-workflow-examples.tool.d.ts +34 -0
- package/dist/tools/get-workflow-examples.tool.js +172 -0
- package/dist/tools/get-workflow-examples.tool.js.map +1 -0
- package/dist/tools/node-details.tool.d.ts +4 -4
- package/dist/tools/node-details.tool.js +30 -2
- package/dist/tools/node-details.tool.js.map +1 -1
- package/dist/tools/node-search.tool.d.ts +1 -1
- package/dist/tools/prompts/main-agent.prompt.d.ts +4 -0
- package/dist/tools/prompts/main-agent.prompt.js +113 -57
- package/dist/tools/prompts/main-agent.prompt.js.map +1 -1
- package/dist/tools/utils/markdown-workflow.utils.d.ts +14 -0
- package/dist/tools/utils/markdown-workflow.utils.js +174 -0
- package/dist/tools/utils/markdown-workflow.utils.js.map +1 -0
- package/dist/tools/utils/test/workflows/ai-assistant.workflow.d.ts +2 -0
- package/dist/tools/utils/test/workflows/ai-assistant.workflow.js +541 -0
- package/dist/tools/utils/test/workflows/ai-assistant.workflow.js.map +1 -0
- package/dist/tools/validate-configuration.tool.d.ts +4 -0
- package/dist/tools/validate-configuration.tool.js +70 -0
- package/dist/tools/validate-configuration.tool.js.map +1 -0
- package/dist/tools/validate-structure.tool.d.ts +4 -0
- package/dist/tools/validate-structure.tool.js +66 -0
- package/dist/tools/validate-structure.tool.js.map +1 -0
- package/dist/tools/web/templates.d.ts +7 -0
- package/dist/tools/web/templates.js +71 -0
- package/dist/tools/web/templates.js.map +1 -0
- package/dist/types/coordination.d.ts +36 -0
- package/dist/types/coordination.js +19 -0
- package/dist/types/coordination.js.map +1 -0
- package/dist/types/discovery-types.d.ts +12 -0
- package/dist/types/discovery-types.js +3 -0
- package/dist/types/discovery-types.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +15 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/langchain.d.ts +1 -0
- package/dist/types/langchain.js +8 -0
- package/dist/types/langchain.js.map +1 -1
- package/dist/types/tools.d.ts +20 -0
- package/dist/types/web/templates.d.ts +44 -0
- package/dist/types/web/templates.js +37 -0
- package/dist/types/web/templates.js.map +1 -0
- package/dist/utils/cache-control/helpers.d.ts +1 -0
- package/dist/utils/cache-control/helpers.js +36 -0
- package/dist/utils/cache-control/helpers.js.map +1 -1
- package/dist/utils/cache-control/index.d.ts +1 -1
- package/dist/utils/cache-control/index.js +2 -1
- package/dist/utils/cache-control/index.js.map +1 -1
- package/dist/utils/context-builders.d.ts +10 -0
- package/dist/utils/context-builders.js +71 -0
- package/dist/utils/context-builders.js.map +1 -0
- package/dist/utils/coordination-log.d.ts +14 -0
- package/dist/utils/coordination-log.js +75 -0
- package/dist/utils/coordination-log.js.map +1 -0
- package/dist/utils/operations-processor.d.ts +4 -2
- package/dist/utils/operations-processor.js.map +1 -1
- package/dist/utils/stream-processor.d.ts +6 -2
- package/dist/utils/stream-processor.js +164 -81
- package/dist/utils/stream-processor.js.map +1 -1
- package/dist/utils/subgraph-helpers.d.ts +13 -0
- package/dist/utils/subgraph-helpers.js +95 -0
- package/dist/utils/subgraph-helpers.js.map +1 -0
- package/dist/utils/token-usage.js +4 -1
- package/dist/utils/token-usage.js.map +1 -1
- package/dist/utils/tool-executor.js +55 -38
- package/dist/utils/tool-executor.js.map +1 -1
- package/dist/utils/workflow-validation.js +1 -0
- package/dist/utils/workflow-validation.js.map +1 -1
- package/dist/validation/checks/index.d.ts +2 -1
- package/dist/validation/checks/index.js +3 -1
- package/dist/validation/checks/index.js.map +1 -1
- package/dist/validation/checks/nodes.d.ts +4 -0
- package/dist/validation/checks/nodes.js +36 -0
- package/dist/validation/checks/nodes.js.map +1 -0
- package/dist/validation/checks/trigger.js +0 -6
- package/dist/validation/checks/trigger.js.map +1 -1
- package/dist/validation/programmatic.js +2 -0
- package/dist/validation/programmatic.js.map +1 -1
- package/dist/validation/types.d.ts +5 -1
- package/dist/validation/types.js +8 -0
- package/dist/validation/types.js.map +1 -1
- package/dist/workflow-builder-agent.d.ts +8 -0
- package/dist/workflow-builder-agent.js +38 -9
- package/dist/workflow-builder-agent.js.map +1 -1
- package/dist/workflow-state.d.ts +4 -2
- package/dist/workflow-state.js +20 -0
- package/dist/workflow-state.js.map +1 -1
- package/package.json +9 -8
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.aiAssistantWorkflow = void 0;
|
|
4
|
+
exports.aiAssistantWorkflow = {
|
|
5
|
+
name: 'Personal Life Manager with Telegram, Google Services & Voice-Enabled AI',
|
|
6
|
+
description: 'This project teaches you to create a personal AI assistant named Jackie that operates through Telegram. Jackie can summarize unread emails, check calendar events, manage Google Tasks, and handle both voice and text interactions. The assistant provides a comprehensive digital life management solution accessible via Telegram messaging.',
|
|
7
|
+
workflow: {
|
|
8
|
+
name: 'Personal Life Manager with Telegram, Google Services & Voice-Enabled AI',
|
|
9
|
+
nodes: [
|
|
10
|
+
{
|
|
11
|
+
parameters: {
|
|
12
|
+
operation: 'getAll',
|
|
13
|
+
calendar: {
|
|
14
|
+
__rl: true,
|
|
15
|
+
mode: 'id',
|
|
16
|
+
value: '=<insert email here>',
|
|
17
|
+
},
|
|
18
|
+
options: {
|
|
19
|
+
timeMin: "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('After', ``, 'string') }}",
|
|
20
|
+
timeMax: "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Before', ``, 'string') }}",
|
|
21
|
+
fields: '=items(summary, start(dateTime))',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
id: 'b70bab99-2919-42c0-a64f-ea8340503a81',
|
|
25
|
+
name: 'Google Calendar',
|
|
26
|
+
type: 'n8n-nodes-base.googleCalendarTool',
|
|
27
|
+
position: [3232, 832],
|
|
28
|
+
typeVersion: 1.1,
|
|
29
|
+
credentials: {},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
parameters: {
|
|
33
|
+
sessionIdType: 'customKey',
|
|
34
|
+
sessionKey: "={{ $('Listen for incoming events').first().json.message.from.id }}",
|
|
35
|
+
},
|
|
36
|
+
id: '621a4839-bc0d-4c73-b228-3831ad50ca3c',
|
|
37
|
+
name: 'Window Buffer Memory',
|
|
38
|
+
type: '@n8n/n8n-nodes-langchain.memoryBufferWindow',
|
|
39
|
+
position: [2016, 832],
|
|
40
|
+
typeVersion: 1.2,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
parameters: {
|
|
44
|
+
operation: 'getAll',
|
|
45
|
+
limit: 20,
|
|
46
|
+
filters: {
|
|
47
|
+
labelIds: ['INBOX'],
|
|
48
|
+
readStatus: 'unread',
|
|
49
|
+
receivedAfter: "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Received_After', ``, 'string') }}",
|
|
50
|
+
receivedBefore: "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Received_Before', ``, 'string') }}",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
id: '89d9a5d9-d3c7-48c1-98cf-cc8987ba9391',
|
|
54
|
+
name: 'Get Email',
|
|
55
|
+
type: 'n8n-nodes-base.gmailTool',
|
|
56
|
+
position: [2800, 832],
|
|
57
|
+
webhookId: 'a4ae7b5d-7686-4bee-a753-848932860b4e',
|
|
58
|
+
typeVersion: 2.1,
|
|
59
|
+
credentials: {},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
parameters: {
|
|
63
|
+
updates: ['message'],
|
|
64
|
+
additionalFields: {},
|
|
65
|
+
},
|
|
66
|
+
id: '88f2bfc3-a997-4838-a4e6-911c60d377ec',
|
|
67
|
+
name: 'Listen for incoming events',
|
|
68
|
+
type: 'n8n-nodes-base.telegramTrigger',
|
|
69
|
+
position: [880, 480],
|
|
70
|
+
webhookId: '322dce18-f93e-4f86-b9b1-3305519b7834',
|
|
71
|
+
typeVersion: 1,
|
|
72
|
+
credentials: {},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
parameters: {
|
|
76
|
+
chatId: "={{ $('Listen for incoming events').first().json.message.from.id }}",
|
|
77
|
+
text: '={{ $json.output }}',
|
|
78
|
+
additionalFields: {
|
|
79
|
+
appendAttribution: false,
|
|
80
|
+
parse_mode: 'Markdown',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
id: 'fe37d04d-2bb4-4130-8386-665364195dce',
|
|
84
|
+
name: 'Telegram',
|
|
85
|
+
type: 'n8n-nodes-base.telegram',
|
|
86
|
+
position: [2688, 464],
|
|
87
|
+
webhookId: '2c133a40-af48-4106-bc1a-be6047840a89',
|
|
88
|
+
typeVersion: 1.1,
|
|
89
|
+
credentials: {},
|
|
90
|
+
onError: 'continueErrorOutput',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
parameters: {
|
|
94
|
+
conditions: {
|
|
95
|
+
options: {
|
|
96
|
+
version: 2,
|
|
97
|
+
leftValue: '',
|
|
98
|
+
caseSensitive: true,
|
|
99
|
+
typeValidation: 'strict',
|
|
100
|
+
},
|
|
101
|
+
combinator: 'and',
|
|
102
|
+
conditions: [
|
|
103
|
+
{
|
|
104
|
+
id: 'a0bf9719-4272-46f6-ab3b-eda6f7b44fd8',
|
|
105
|
+
operator: {
|
|
106
|
+
type: 'string',
|
|
107
|
+
operation: 'empty',
|
|
108
|
+
singleValue: true,
|
|
109
|
+
},
|
|
110
|
+
leftValue: '={{ $json.message.text }}',
|
|
111
|
+
rightValue: '',
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
options: {},
|
|
116
|
+
},
|
|
117
|
+
id: 'a5717776-2c85-4dfb-9e05-bf9b805f9004',
|
|
118
|
+
name: 'If',
|
|
119
|
+
type: 'n8n-nodes-base.if',
|
|
120
|
+
position: [1328, 480],
|
|
121
|
+
typeVersion: 2.2,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
parameters: {
|
|
125
|
+
fields: {
|
|
126
|
+
values: [
|
|
127
|
+
{
|
|
128
|
+
name: 'text',
|
|
129
|
+
stringValue: '={{ $json?.message?.text || "" }}',
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
options: {},
|
|
134
|
+
},
|
|
135
|
+
id: 'dc3d741a-2ed6-4c34-b14f-91a728b3fffd',
|
|
136
|
+
name: 'Voice or Text',
|
|
137
|
+
type: 'n8n-nodes-base.set',
|
|
138
|
+
position: [1104, 480],
|
|
139
|
+
typeVersion: 3.2,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
parameters: {
|
|
143
|
+
resource: 'file',
|
|
144
|
+
fileId: "={{ $('Listen for incoming events').item.json.message.voice.file_id }}",
|
|
145
|
+
additionalFields: {},
|
|
146
|
+
},
|
|
147
|
+
id: '7c7cbb13-8b9d-4e98-9287-4002166ff159',
|
|
148
|
+
name: 'Get Voice File',
|
|
149
|
+
type: 'n8n-nodes-base.telegram',
|
|
150
|
+
position: [1552, 400],
|
|
151
|
+
webhookId: 'ef3f120e-c212-45ff-99b5-b6a5a82598d8',
|
|
152
|
+
typeVersion: 1.1,
|
|
153
|
+
credentials: {},
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
parameters: {
|
|
157
|
+
content: '## Process Telegram Request\n',
|
|
158
|
+
height: 279,
|
|
159
|
+
width: 624,
|
|
160
|
+
color: 7,
|
|
161
|
+
},
|
|
162
|
+
id: '8078f53c-0aed-4f01-bf8f-f0e65a8291c0',
|
|
163
|
+
name: 'Sticky Note',
|
|
164
|
+
type: 'n8n-nodes-base.stickyNote',
|
|
165
|
+
position: [1072, 368],
|
|
166
|
+
typeVersion: 1,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
parameters: {
|
|
170
|
+
content: '\n\n\n\n\n\n\n\n\n\n\n\n1. [In OpenRouter](https://openrouter.ai/settings/keys) click **“Create API key”** and copy it.\n\n2. Open the ```OpenRouter``` node:\n * **Select Credential → Create New**\n * Paste into **API Key** and **Save**\n',
|
|
171
|
+
height: 316,
|
|
172
|
+
width: 294,
|
|
173
|
+
color: 3,
|
|
174
|
+
},
|
|
175
|
+
id: '9006e460-0a4f-4250-876c-1743d7526909',
|
|
176
|
+
name: 'Sticky Note1',
|
|
177
|
+
type: 'n8n-nodes-base.stickyNote',
|
|
178
|
+
position: [1584, 784],
|
|
179
|
+
typeVersion: 1,
|
|
180
|
+
notes: '© 2025 Lucas Peyrin',
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
parameters: {
|
|
184
|
+
options: {},
|
|
185
|
+
},
|
|
186
|
+
id: '7e0fa1ed-2cd6-48a6-bf04-d67d4d7fe842',
|
|
187
|
+
name: 'OpenRouter',
|
|
188
|
+
type: '@n8n/n8n-nodes-langchain.lmChatOpenRouter',
|
|
189
|
+
position: [1680, 816],
|
|
190
|
+
typeVersion: 1,
|
|
191
|
+
credentials: {},
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
parameters: {
|
|
195
|
+
content: '\n\n\n\n\n\n\n\n\n\n\n\n\n\nThis node helps your agent remember the last few messages to stay on topic.',
|
|
196
|
+
height: 260,
|
|
197
|
+
width: 308,
|
|
198
|
+
color: 7,
|
|
199
|
+
},
|
|
200
|
+
id: 'f326d185-cd53-421e-a3d1-ae3b0d162bfa',
|
|
201
|
+
name: 'Sticky Note15',
|
|
202
|
+
type: 'n8n-nodes-base.stickyNote',
|
|
203
|
+
position: [1904, 784],
|
|
204
|
+
typeVersion: 1,
|
|
205
|
+
notes: '© 2025 Lucas Peyrin',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
parameters: {
|
|
209
|
+
content: '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThis node allows your agent create and get tasks from Google Tasks\n',
|
|
210
|
+
height: 260,
|
|
211
|
+
width: 484,
|
|
212
|
+
color: 7,
|
|
213
|
+
},
|
|
214
|
+
id: '48c06490-e261-45f5-ad0c-2b2648203ab0',
|
|
215
|
+
name: 'Sticky Note16',
|
|
216
|
+
type: 'n8n-nodes-base.stickyNote',
|
|
217
|
+
position: [2240, 784],
|
|
218
|
+
typeVersion: 1,
|
|
219
|
+
notes: '© 2025 Lucas Peyrin',
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
parameters: {
|
|
223
|
+
content: '\n\n\n\n\n\n\n\n\n\n\n\n\n\nThis node allows your agent access your gmail\n',
|
|
224
|
+
height: 260,
|
|
225
|
+
width: 308,
|
|
226
|
+
color: 7,
|
|
227
|
+
},
|
|
228
|
+
id: '8bb0d940-eda3-4ecf-8a1d-15b1a6445a83',
|
|
229
|
+
name: 'Sticky Note18',
|
|
230
|
+
type: 'n8n-nodes-base.stickyNote',
|
|
231
|
+
position: [2752, 784],
|
|
232
|
+
typeVersion: 1,
|
|
233
|
+
notes: '© 2025 Lucas Peyrin',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
parameters: {
|
|
237
|
+
content: '\n\n\n\n\n\n\n\n\n\n\n\n\n\nThis node allows your agent access your Google calendar\n',
|
|
238
|
+
height: 260,
|
|
239
|
+
width: 404,
|
|
240
|
+
color: 7,
|
|
241
|
+
},
|
|
242
|
+
id: 'cf8916e8-4701-4644-9d92-e2dd78665448',
|
|
243
|
+
name: 'Sticky Note19',
|
|
244
|
+
type: 'n8n-nodes-base.stickyNote',
|
|
245
|
+
position: [3088, 784],
|
|
246
|
+
typeVersion: 1,
|
|
247
|
+
notes: '© 2025 Lucas Peyrin',
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
parameters: {
|
|
251
|
+
content: '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nUses OpenAI to convert voice to text.\n[In OpenAI](https://platform.openai.com/api-keys) click **“Create new secret key”** and copy it.',
|
|
252
|
+
height: 276,
|
|
253
|
+
width: 324,
|
|
254
|
+
color: 7,
|
|
255
|
+
},
|
|
256
|
+
id: 'a5db0c52-ba8d-4622-8a0a-eae3a7f0d90f',
|
|
257
|
+
name: 'Sticky Note20',
|
|
258
|
+
type: 'n8n-nodes-base.stickyNote',
|
|
259
|
+
position: [1760, 368],
|
|
260
|
+
typeVersion: 1,
|
|
261
|
+
notes: '© 2025 Lucas Peyrin',
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
parameters: {
|
|
265
|
+
content: 'Caylee, your peronal AI Assistant:\n1. Get email\n2. Check calendar\n3. Get and create to-do tasks \n\nEdit the **System Message** to adjust your agent’s thinking, behavior, and replies.\n\n\n\n\n\n\n\n\n\n\n',
|
|
266
|
+
height: 380,
|
|
267
|
+
width: 396,
|
|
268
|
+
color: 7,
|
|
269
|
+
},
|
|
270
|
+
id: 'fd8b069a-19da-4740-a3ce-d88ee0e81331',
|
|
271
|
+
name: 'Sticky Note13',
|
|
272
|
+
type: 'n8n-nodes-base.stickyNote',
|
|
273
|
+
position: [2144, 272],
|
|
274
|
+
typeVersion: 1,
|
|
275
|
+
notes: '© 2025 Lucas Peyrin',
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
parameters: {
|
|
279
|
+
content: '# Try It Out!\n\nLaunch Jackie—your personal AI assistant that handles voice & text via Telegram to manage your digital life.\n\n**To get started:**\n\n1. **Connect all credentials** (Telegram, OpenAI, Gmail, etc.)\n2. **Activate the workflow** and message your Telegram bot:\n • "What emails do I have today?"\n • "Show me my calendar for tomorrow"\n • "Craete new to-do item"\n • 🎤 Send voice messages for hands-free interaction\n\n## Questions or Need Help?\n\nFor setup assistance, customization, or workflow support, join my Skool community!\n\n### [AI Automation Engineering Community](https://www.skool.com/ai-automation-engineering-3014)\n\nHappy learning! -- Derek Cheung\n',
|
|
280
|
+
height: 568,
|
|
281
|
+
width: 460,
|
|
282
|
+
color: 4,
|
|
283
|
+
},
|
|
284
|
+
id: '1c27ac6c-39d7-4f07-8134-624e1cb21e07',
|
|
285
|
+
name: 'Sticky Note3',
|
|
286
|
+
type: 'n8n-nodes-base.stickyNote',
|
|
287
|
+
position: [368, 240],
|
|
288
|
+
typeVersion: 1,
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
parameters: {
|
|
292
|
+
content: '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nSend message back to Telegram\n',
|
|
293
|
+
height: 288,
|
|
294
|
+
width: 304,
|
|
295
|
+
color: 7,
|
|
296
|
+
},
|
|
297
|
+
id: 'fd801aac-5dfa-4a51-abbd-b187a6e588e8',
|
|
298
|
+
name: 'Sticky Note4',
|
|
299
|
+
type: 'n8n-nodes-base.stickyNote',
|
|
300
|
+
position: [2592, 368],
|
|
301
|
+
typeVersion: 1,
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
parameters: {
|
|
305
|
+
task: 'MTY1MTc5NzMxMzA5NDc5MTQ5NzQ6MDow',
|
|
306
|
+
title: "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Title', ``, 'string') }}",
|
|
307
|
+
additionalFields: {},
|
|
308
|
+
},
|
|
309
|
+
id: '4a44f67a-65b1-4de7-898f-ee7724e33bb1',
|
|
310
|
+
name: 'Create a task in Google Tasks',
|
|
311
|
+
type: 'n8n-nodes-base.googleTasksTool',
|
|
312
|
+
position: [2336, 848],
|
|
313
|
+
typeVersion: 1,
|
|
314
|
+
credentials: {},
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
parameters: {
|
|
318
|
+
operation: 'getAll',
|
|
319
|
+
task: 'MTY1MTc5NzMxMzA5NDc5MTQ5NzQ6MDow',
|
|
320
|
+
additionalFields: {},
|
|
321
|
+
},
|
|
322
|
+
id: '0262484e-23cc-49b3-be29-8f205e49077a',
|
|
323
|
+
name: 'Get many tasks in Google Tasks',
|
|
324
|
+
type: 'n8n-nodes-base.googleTasksTool',
|
|
325
|
+
position: [2528, 848],
|
|
326
|
+
typeVersion: 1,
|
|
327
|
+
credentials: {},
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
parameters: {
|
|
331
|
+
content: '## [Video Tutorial](https://youtu.be/ROgf5dVqYPQ)\n@[youtube](ROgf5dVqYPQ)',
|
|
332
|
+
height: 400,
|
|
333
|
+
width: 544,
|
|
334
|
+
color: 7,
|
|
335
|
+
},
|
|
336
|
+
id: 'ef46cbde-6e82-4488-b027-d70087f1b5f4',
|
|
337
|
+
name: 'Sticky Note2',
|
|
338
|
+
type: 'n8n-nodes-base.stickyNote',
|
|
339
|
+
position: [2944, 256],
|
|
340
|
+
typeVersion: 1,
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
parameters: {
|
|
344
|
+
resource: 'audio',
|
|
345
|
+
operation: 'transcribe',
|
|
346
|
+
options: {},
|
|
347
|
+
},
|
|
348
|
+
id: '3acacedb-bafa-4fbf-8d3e-f198b19b9308',
|
|
349
|
+
name: 'Transcribe a recording',
|
|
350
|
+
type: '@n8n/n8n-nodes-langchain.openAi',
|
|
351
|
+
position: [1872, 400],
|
|
352
|
+
typeVersion: 1.8,
|
|
353
|
+
credentials: {},
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
parameters: {
|
|
357
|
+
sendTo: "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}",
|
|
358
|
+
subject: "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
|
|
359
|
+
message: "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', `Please format this nicely in html`, 'string') }}",
|
|
360
|
+
options: {
|
|
361
|
+
appendAttribution: false,
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
id: '2ea5b79c-2e49-4d7e-933c-8b1a58d2415c',
|
|
365
|
+
name: 'Send Email',
|
|
366
|
+
type: 'n8n-nodes-base.gmailTool',
|
|
367
|
+
position: [2944, 832],
|
|
368
|
+
webhookId: 'a4ae7b5d-7686-4bee-a753-848932860b4e',
|
|
369
|
+
typeVersion: 2.1,
|
|
370
|
+
credentials: {},
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
parameters: {
|
|
374
|
+
promptType: 'define',
|
|
375
|
+
text: '={{ $json.text }}',
|
|
376
|
+
options: {
|
|
377
|
+
systemMessage: "=You are a helpful personal assistant called Jackie. \n\nToday's date is {{ $today.format('yyyy-MM-dd') }}.\n\nGuidelines:\n- When summarizing emails, include Sender, Message date, subject, and brief summary of email.\n- if the user did not specify a date in the request assume they are asking for today\n- When answering questions about calendar events, filter out events that don't apply to the question. For example, the question is about events for today, only reply with events for today. Don't mention future events if it's more than 1 week away\n- When creating calendar entry, the attendee email is optional",
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
id: '4ec85126-51da-4f3b-a04f-16552fdcb244',
|
|
381
|
+
name: 'Jackie, AI Assistant 👩🏻🏫',
|
|
382
|
+
type: '@n8n/n8n-nodes-langchain.agent',
|
|
383
|
+
position: [2224, 464],
|
|
384
|
+
typeVersion: 1.6,
|
|
385
|
+
},
|
|
386
|
+
],
|
|
387
|
+
connections: {
|
|
388
|
+
'Google Calendar': {
|
|
389
|
+
ai_tool: [
|
|
390
|
+
[
|
|
391
|
+
{
|
|
392
|
+
node: 'Jackie, AI Assistant 👩🏻🏫',
|
|
393
|
+
type: 'ai_tool',
|
|
394
|
+
index: 0,
|
|
395
|
+
},
|
|
396
|
+
],
|
|
397
|
+
],
|
|
398
|
+
},
|
|
399
|
+
'Window Buffer Memory': {
|
|
400
|
+
ai_memory: [
|
|
401
|
+
[
|
|
402
|
+
{
|
|
403
|
+
node: 'Jackie, AI Assistant 👩🏻🏫',
|
|
404
|
+
type: 'ai_memory',
|
|
405
|
+
index: 0,
|
|
406
|
+
},
|
|
407
|
+
],
|
|
408
|
+
],
|
|
409
|
+
},
|
|
410
|
+
'Get Email': {
|
|
411
|
+
ai_tool: [
|
|
412
|
+
[
|
|
413
|
+
{
|
|
414
|
+
node: 'Jackie, AI Assistant 👩🏻🏫',
|
|
415
|
+
type: 'ai_tool',
|
|
416
|
+
index: 0,
|
|
417
|
+
},
|
|
418
|
+
],
|
|
419
|
+
],
|
|
420
|
+
},
|
|
421
|
+
'Listen for incoming events': {
|
|
422
|
+
main: [
|
|
423
|
+
[
|
|
424
|
+
{
|
|
425
|
+
node: 'Voice or Text',
|
|
426
|
+
type: 'main',
|
|
427
|
+
index: 0,
|
|
428
|
+
},
|
|
429
|
+
],
|
|
430
|
+
],
|
|
431
|
+
},
|
|
432
|
+
If: {
|
|
433
|
+
main: [
|
|
434
|
+
[
|
|
435
|
+
{
|
|
436
|
+
node: 'Get Voice File',
|
|
437
|
+
type: 'main',
|
|
438
|
+
index: 0,
|
|
439
|
+
},
|
|
440
|
+
],
|
|
441
|
+
[
|
|
442
|
+
{
|
|
443
|
+
node: 'Jackie, AI Assistant 👩🏻🏫',
|
|
444
|
+
type: 'main',
|
|
445
|
+
index: 0,
|
|
446
|
+
},
|
|
447
|
+
],
|
|
448
|
+
],
|
|
449
|
+
},
|
|
450
|
+
'Voice or Text': {
|
|
451
|
+
main: [
|
|
452
|
+
[
|
|
453
|
+
{
|
|
454
|
+
node: 'If',
|
|
455
|
+
type: 'main',
|
|
456
|
+
index: 0,
|
|
457
|
+
},
|
|
458
|
+
],
|
|
459
|
+
],
|
|
460
|
+
},
|
|
461
|
+
'Get Voice File': {
|
|
462
|
+
main: [
|
|
463
|
+
[
|
|
464
|
+
{
|
|
465
|
+
node: 'Transcribe a recording',
|
|
466
|
+
type: 'main',
|
|
467
|
+
index: 0,
|
|
468
|
+
},
|
|
469
|
+
],
|
|
470
|
+
],
|
|
471
|
+
},
|
|
472
|
+
OpenRouter: {
|
|
473
|
+
ai_languageModel: [
|
|
474
|
+
[
|
|
475
|
+
{
|
|
476
|
+
node: 'Jackie, AI Assistant 👩🏻🏫',
|
|
477
|
+
type: 'ai_languageModel',
|
|
478
|
+
index: 0,
|
|
479
|
+
},
|
|
480
|
+
],
|
|
481
|
+
],
|
|
482
|
+
},
|
|
483
|
+
'Create a task in Google Tasks': {
|
|
484
|
+
ai_tool: [
|
|
485
|
+
[
|
|
486
|
+
{
|
|
487
|
+
node: 'Jackie, AI Assistant 👩🏻🏫',
|
|
488
|
+
type: 'ai_tool',
|
|
489
|
+
index: 0,
|
|
490
|
+
},
|
|
491
|
+
],
|
|
492
|
+
],
|
|
493
|
+
},
|
|
494
|
+
'Get many tasks in Google Tasks': {
|
|
495
|
+
ai_tool: [
|
|
496
|
+
[
|
|
497
|
+
{
|
|
498
|
+
node: 'Jackie, AI Assistant 👩🏻🏫',
|
|
499
|
+
type: 'ai_tool',
|
|
500
|
+
index: 0,
|
|
501
|
+
},
|
|
502
|
+
],
|
|
503
|
+
],
|
|
504
|
+
},
|
|
505
|
+
'Transcribe a recording': {
|
|
506
|
+
main: [
|
|
507
|
+
[
|
|
508
|
+
{
|
|
509
|
+
node: 'Jackie, AI Assistant 👩🏻🏫',
|
|
510
|
+
type: 'main',
|
|
511
|
+
index: 0,
|
|
512
|
+
},
|
|
513
|
+
],
|
|
514
|
+
],
|
|
515
|
+
},
|
|
516
|
+
'Send Email': {
|
|
517
|
+
ai_tool: [
|
|
518
|
+
[
|
|
519
|
+
{
|
|
520
|
+
node: 'Jackie, AI Assistant 👩🏻🏫',
|
|
521
|
+
type: 'ai_tool',
|
|
522
|
+
index: 0,
|
|
523
|
+
},
|
|
524
|
+
],
|
|
525
|
+
],
|
|
526
|
+
},
|
|
527
|
+
'Jackie, AI Assistant 👩🏻🏫': {
|
|
528
|
+
main: [
|
|
529
|
+
[
|
|
530
|
+
{
|
|
531
|
+
node: 'Telegram',
|
|
532
|
+
type: 'main',
|
|
533
|
+
index: 0,
|
|
534
|
+
},
|
|
535
|
+
],
|
|
536
|
+
],
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
},
|
|
540
|
+
};
|
|
541
|
+
//# sourceMappingURL=ai-assistant.workflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-assistant.workflow.js","sourceRoot":"","sources":["../../../../../src/tools/utils/test/workflows/ai-assistant.workflow.ts"],"names":[],"mappings":";;;AAIa,QAAA,mBAAmB,GAAqB;IACpD,IAAI,EAAE,yEAAyE;IAC/E,WAAW,EACV,iVAAiV;IAClV,QAAQ,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;gBACjC,OAAO,EAAE;oBACR;wBACC;4BACC,IAAI,EAAE,8BAA8B;4BACpC,IAAI,EAAE,SAAS;4BACf,KAAK,EAAE,CAAC;yBACR;qBACD;iBACD;aACD;YACD,wBAAwB,EAAE;gBACzB,IAAI,EAAE;oBACL;wBACC;4BACC,IAAI,EAAE,8BAA8B;4BACpC,IAAI,EAAE,MAAM;4BACZ,KAAK,EAAE,CAAC;yBACR;qBACD;iBACD;aACD;YACD,YAAY,EAAE;gBACb,OAAO,EAAE;oBACR;wBACC;4BACC,IAAI,EAAE,8BAA8B;4BACpC,IAAI,EAAE,SAAS;4BACf,KAAK,EAAE,CAAC;yBACR;qBACD;iBACD;aACD;YACD,8BAA8B,EAAE;gBAC/B,IAAI,EAAE;oBACL;wBACC;4BACC,IAAI,EAAE,UAAU;4BAChB,IAAI,EAAE,MAAM;4BACZ,KAAK,EAAE,CAAC;yBACR;qBACD;iBACD;aACD;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
import type { BuilderTool, BuilderToolBase } from '../utils/stream-processor';
|
|
3
|
+
export declare const VALIDATE_CONFIGURATION_TOOL: BuilderToolBase;
|
|
4
|
+
export declare function createValidateConfigurationTool(parsedNodeTypes: INodeTypeDescription[]): BuilderTool;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VALIDATE_CONFIGURATION_TOOL = void 0;
|
|
4
|
+
exports.createValidateConfigurationTool = createValidateConfigurationTool;
|
|
5
|
+
const tools_1 = require("@langchain/core/tools");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const checks_1 = require("../validation/checks");
|
|
8
|
+
const errors_1 = require("../errors");
|
|
9
|
+
const progress_1 = require("./helpers/progress");
|
|
10
|
+
const response_1 = require("./helpers/response");
|
|
11
|
+
const state_1 = require("./helpers/state");
|
|
12
|
+
const validateConfigurationSchema = zod_1.z.object({}).strict().default({});
|
|
13
|
+
exports.VALIDATE_CONFIGURATION_TOOL = {
|
|
14
|
+
toolName: 'validate_configuration',
|
|
15
|
+
displayTitle: 'Validating configuration',
|
|
16
|
+
};
|
|
17
|
+
function createValidateConfigurationTool(parsedNodeTypes) {
|
|
18
|
+
const dynamicTool = (0, tools_1.tool)(async (input, config) => {
|
|
19
|
+
const reporter = (0, progress_1.createProgressReporter)(config, exports.VALIDATE_CONFIGURATION_TOOL.toolName, exports.VALIDATE_CONFIGURATION_TOOL.displayTitle);
|
|
20
|
+
try {
|
|
21
|
+
const validatedInput = validateConfigurationSchema.parse(input ?? {});
|
|
22
|
+
reporter.start(validatedInput);
|
|
23
|
+
const state = (0, state_1.getWorkflowState)();
|
|
24
|
+
(0, progress_1.reportProgress)(reporter, 'Validating configuration');
|
|
25
|
+
const agentViolations = (0, checks_1.validateAgentPrompt)(state.workflowJSON);
|
|
26
|
+
const toolViolations = (0, checks_1.validateTools)(state.workflowJSON, parsedNodeTypes);
|
|
27
|
+
const fromAiViolations = (0, checks_1.validateFromAi)(state.workflowJSON, parsedNodeTypes);
|
|
28
|
+
const allViolations = [...agentViolations, ...toolViolations, ...fromAiViolations];
|
|
29
|
+
let message;
|
|
30
|
+
if (allViolations.length === 0) {
|
|
31
|
+
message = 'Configuration is valid. Agent prompts, tools, and $fromAI usage are correct.';
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
message = `Found ${allViolations.length} configuration issues:\n${allViolations.map((v) => `- ${v.description}`).join('\n')}`;
|
|
35
|
+
}
|
|
36
|
+
reporter.complete({ message });
|
|
37
|
+
return (0, response_1.createSuccessResponse)(config, message, {
|
|
38
|
+
configurationValidation: {
|
|
39
|
+
agentPrompt: agentViolations,
|
|
40
|
+
tools: toolViolations,
|
|
41
|
+
fromAi: fromAiViolations,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
if (error instanceof zod_1.z.ZodError) {
|
|
47
|
+
const validationError = new errors_1.ValidationError('Invalid input parameters', {
|
|
48
|
+
extra: { errors: error.errors },
|
|
49
|
+
});
|
|
50
|
+
reporter.error(validationError);
|
|
51
|
+
return (0, response_1.createErrorResponse)(config, validationError);
|
|
52
|
+
}
|
|
53
|
+
const toolError = new errors_1.ToolExecutionError(error instanceof Error ? error.message : 'Failed to validate configuration', {
|
|
54
|
+
toolName: exports.VALIDATE_CONFIGURATION_TOOL.toolName,
|
|
55
|
+
cause: error instanceof Error ? error : undefined,
|
|
56
|
+
});
|
|
57
|
+
reporter.error(toolError);
|
|
58
|
+
return (0, response_1.createErrorResponse)(config, toolError);
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
name: exports.VALIDATE_CONFIGURATION_TOOL.toolName,
|
|
62
|
+
description: 'Validate node configuration (agent prompts, tool parameters, $fromAI usage). Call after configuring nodes to check for issues.',
|
|
63
|
+
schema: validateConfigurationSchema,
|
|
64
|
+
});
|
|
65
|
+
return {
|
|
66
|
+
tool: dynamicTool,
|
|
67
|
+
...exports.VALIDATE_CONFIGURATION_TOOL,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=validate-configuration.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-configuration.tool.js","sourceRoot":"","sources":["../../src/tools/validate-configuration.tool.ts"],"names":[],"mappings":";;;AAuBA,0EAyEC;AAhGD,iDAA6C;AAE7C,6BAAwB;AAGxB,gDAAyF;AAEzF,sCAAgE;AAChE,iDAA4E;AAC5E,iDAAgF;AAChF,2CAAmD;AAEnD,MAAM,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAEzD,QAAA,2BAA2B,GAAoB;IAC3D,QAAQ,EAAE,wBAAwB;IAClC,YAAY,EAAE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escription } from 'n8n-workflow';
|
|
2
|
+
import type { BuilderTool, BuilderToolBase } from '../utils/stream-processor';
|
|
3
|
+
export declare const VALIDATE_STRUCTURE_TOOL: BuilderToolBase;
|
|
4
|
+
export declare function createValidateStructureTool(parsedNodeTypes: INodeTypeDescription[]): BuilderTool;
|