@flowuent-org/diagramming-core 1.2.7 → 1.2.9
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/apps/diagramming/src/AutomationDiagramData.ts +893 -825
- package/package.json +1 -1
- package/packages/diagrams/src/lib/atoms/AddNodeAnchor.tsx +103 -97
- package/packages/diagrams/src/lib/components/automation/AISuggestionsPanel.tsx +293 -283
- package/packages/diagrams/src/lib/components/automation/AutomationGoogleServicesNode.tsx +4 -0
- package/packages/diagrams/src/lib/components/automation/AutomationSlackNode.tsx +685 -0
- package/packages/diagrams/src/lib/components/automation/index.ts +8 -0
- package/packages/diagrams/src/lib/hooks/useWorkflowNodeActiont.ts +391 -384
- package/packages/diagrams/src/lib/types/automation-node-data-types.ts +388 -388
- package/packages/diagrams/src/lib/types/node-types.ts +42 -39
|
@@ -1,825 +1,893 @@
|
|
|
1
|
-
import { MarkerType } from '@xyflow/react';
|
|
2
|
-
|
|
3
|
-
// Default nodes for the automation diagram
|
|
4
|
-
export const automationDefaultNodes = [
|
|
5
|
-
{
|
|
6
|
-
id: 'start-node',
|
|
7
|
-
type: 'AutomationStartNode',
|
|
8
|
-
position: { x: 100, y: 200 },
|
|
9
|
-
data: {
|
|
10
|
-
// Display data for the node UI
|
|
11
|
-
label: 'Workflow Trigger',
|
|
12
|
-
description: 'Workflow entry point. Triggered manually or on schedule.',
|
|
13
|
-
status: 'Ready',
|
|
14
|
-
lastRun: 'Never',
|
|
15
|
-
duration: '0.0s',
|
|
16
|
-
// iconName: 'PlayArrow', // Users must define their own icons
|
|
17
|
-
|
|
18
|
-
// Form data for configuration (keeping existing structure for compatibility)
|
|
19
|
-
formData: {
|
|
20
|
-
nodeId: 'start-node',
|
|
21
|
-
title: 'Workflow Trigger',
|
|
22
|
-
type: 'start',
|
|
23
|
-
triggerType: 'manual',
|
|
24
|
-
scheduleConfig: {
|
|
25
|
-
frequency: 'daily',
|
|
26
|
-
time: '09:00',
|
|
27
|
-
timezone: 'UTC',
|
|
28
|
-
},
|
|
29
|
-
eventConfig: {
|
|
30
|
-
webhookUrl: '',
|
|
31
|
-
eventType: 'webhook',
|
|
32
|
-
filters: [],
|
|
33
|
-
},
|
|
34
|
-
initialVariables: [
|
|
35
|
-
{
|
|
36
|
-
name: 'runId',
|
|
37
|
-
value: '{{timestamp}}',
|
|
38
|
-
type: 'string',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'startTime',
|
|
42
|
-
value: '{{now}}',
|
|
43
|
-
type: 'string',
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
outputVariable: 'workflowContext',
|
|
47
|
-
isPinned: false,
|
|
48
|
-
isBlock: false,
|
|
49
|
-
blocks: [],
|
|
50
|
-
parallelChildrenCount: 0,
|
|
51
|
-
conditions: {
|
|
52
|
-
combinator: 'and',
|
|
53
|
-
rules: [],
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
width: 336,
|
|
58
|
-
height: 150,
|
|
59
|
-
measured: { width: 336, height: 150 },
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: 'api-call-node',
|
|
63
|
-
type: 'AutomationApiNode',
|
|
64
|
-
position: { x: 500, y: 200 },
|
|
65
|
-
data: {
|
|
66
|
-
// Display data for the node UI
|
|
67
|
-
label: 'Discover Headlines',
|
|
68
|
-
description:
|
|
69
|
-
"This node extracts all news headlines from CNN's homepage using web scraping techniques.",
|
|
70
|
-
status: 'Ready',
|
|
71
|
-
lastRun: 'Never',
|
|
72
|
-
duration: '0.8s',
|
|
73
|
-
iconName: 'Api', // Users must define their own icons
|
|
74
|
-
|
|
75
|
-
// Form data for configuration
|
|
76
|
-
formData: {
|
|
77
|
-
nodeId: 'api-call-node',
|
|
78
|
-
title: 'Discover Headlines',
|
|
79
|
-
type: 'api',
|
|
80
|
-
method: 'GET',
|
|
81
|
-
url: 'https://jsonplaceholder.typicode.com/posts',
|
|
82
|
-
headers: [
|
|
83
|
-
{ key: 'Content-Type', value: 'application/json', enabled: true },
|
|
84
|
-
{ key: 'Accept', value: 'application/json', enabled: true },
|
|
85
|
-
{ key: 'User-Agent', value: 'AutomationBot/1.0', enabled: true },
|
|
86
|
-
],
|
|
87
|
-
queryParams: [
|
|
88
|
-
{ key: '_limit', value: '15', enabled: true },
|
|
89
|
-
{ key: 'userId', value: '1', enabled: true },
|
|
90
|
-
],
|
|
91
|
-
body: '',
|
|
92
|
-
bodyType: 'json',
|
|
93
|
-
timeout: 30000,
|
|
94
|
-
retryCount: 3,
|
|
95
|
-
retryDelay: 1000,
|
|
96
|
-
responseVariable: 'postsResponse',
|
|
97
|
-
responseDataType: 'Object',
|
|
98
|
-
errorHandling: {
|
|
99
|
-
onError: 'retry',
|
|
100
|
-
maxRetries: 3,
|
|
101
|
-
fallbackValue: '{"error": "Failed to fetch posts data"}',
|
|
102
|
-
},
|
|
103
|
-
// Schema matching data for the three boxes
|
|
104
|
-
schemaMatch: {
|
|
105
|
-
matched: 5,
|
|
106
|
-
partial: 0,
|
|
107
|
-
ignored: 1,
|
|
108
|
-
},
|
|
109
|
-
// Configuration cards for dynamic display
|
|
110
|
-
configurationCards: [
|
|
111
|
-
{
|
|
112
|
-
icon: '⚙️',
|
|
113
|
-
label: 'GPT-5 Thinking mini · v1',
|
|
114
|
-
iconColor: '#ffffff',
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
icon: '🗄️',
|
|
118
|
-
label: 'KB: CNN_Homepage_Titles (18 items)',
|
|
119
|
-
iconColor: '#10b981',
|
|
120
|
-
},
|
|
121
|
-
],
|
|
122
|
-
// AI Suggestions count and data
|
|
123
|
-
aiSuggestionsCount: 2,
|
|
124
|
-
aiSuggestions: [
|
|
125
|
-
{
|
|
126
|
-
id: '1',
|
|
127
|
-
title: 'Add Citation Extraction',
|
|
128
|
-
description: 'Automatically extract and format citations from article content.',
|
|
129
|
-
tags: ['classification', 'enhancement'],
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
id: '2',
|
|
133
|
-
title: 'Generate Bullet Summary',
|
|
134
|
-
description: 'Create a concise bullet-point summary of the article\'s main points.',
|
|
135
|
-
tags: ['classification', 'enhancement'],
|
|
136
|
-
},
|
|
137
|
-
],
|
|
138
|
-
isPinned: false,
|
|
139
|
-
isBlock: false,
|
|
140
|
-
blocks: [],
|
|
141
|
-
parallelChildrenCount: 0,
|
|
142
|
-
conditions: {
|
|
143
|
-
combinator: 'and',
|
|
144
|
-
rules: [],
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
width: 336,
|
|
149
|
-
height: 150,
|
|
150
|
-
measured: { width: 336, height: 150 },
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
id: 'navigation-node',
|
|
154
|
-
type: 'AutomationNavigationNode',
|
|
155
|
-
position: { x: 600, y: 200 },
|
|
156
|
-
data: {
|
|
157
|
-
// Display data for the node UI
|
|
158
|
-
label: 'Navigate to Website',
|
|
159
|
-
description: 'Navigate to the target website and wait for page load',
|
|
160
|
-
status: 'Ready',
|
|
161
|
-
navigationType: 'navigate',
|
|
162
|
-
url: 'https://example.com',
|
|
163
|
-
lastRun: 'Never',
|
|
164
|
-
backgroundColor: '#181C25',
|
|
165
|
-
textColor: '#ffffff',
|
|
166
|
-
borderColor: '#1e293b',
|
|
167
|
-
iconName: 'Navigation',
|
|
168
|
-
// Form data for configuration
|
|
169
|
-
formData: {
|
|
170
|
-
nodeId: 'navigation-node',
|
|
171
|
-
title: 'Navigate to Website',
|
|
172
|
-
type: 'navigation',
|
|
173
|
-
navigationType: 'navigate',
|
|
174
|
-
url: 'https://example.com',
|
|
175
|
-
timeout: 30000,
|
|
176
|
-
retryCount: 3,
|
|
177
|
-
outputVariable: 'navigationResult',
|
|
178
|
-
errorHandling: {
|
|
179
|
-
onError: 'retry',
|
|
180
|
-
maxRetries: 3,
|
|
181
|
-
fallbackAction: 'skip',
|
|
182
|
-
},
|
|
183
|
-
isPinned: false,
|
|
184
|
-
isBlock: false,
|
|
185
|
-
blocks: [],
|
|
186
|
-
parallelChildrenCount: 0,
|
|
187
|
-
conditions: {
|
|
188
|
-
combinator: 'and',
|
|
189
|
-
rules: [],
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
width: 336,
|
|
194
|
-
height: 150,
|
|
195
|
-
measured: { width: 336, height: 150 },
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
id: 'ai-suggestion-node',
|
|
199
|
-
type: 'AutomationAISuggestionNode',
|
|
200
|
-
position: { x: 900, y: 200 },
|
|
201
|
-
data: {
|
|
202
|
-
label: 'Citation Extractor',
|
|
203
|
-
description: 'Extract and format citation from article text.',
|
|
204
|
-
iconName: 'Lightbulb',
|
|
205
|
-
formData: {
|
|
206
|
-
badgeText: 'Suggested Node',
|
|
207
|
-
mapping: { from: 'references', to: 'source_text' },
|
|
208
|
-
pointers: [
|
|
209
|
-
'Ensures proper attribution',
|
|
210
|
-
'Creates standardized reference format',
|
|
211
|
-
'Enables source verification',
|
|
212
|
-
],
|
|
213
|
-
},
|
|
214
|
-
},
|
|
215
|
-
width: 336,
|
|
216
|
-
height: 150,
|
|
217
|
-
measured: { width: 336, height: 150 },
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
id: 'data-formatting-node',
|
|
221
|
-
type: 'AutomationFormattingNode',
|
|
222
|
-
position: { x: 700, y: 200 },
|
|
223
|
-
data: {
|
|
224
|
-
// Display data for the node UI
|
|
225
|
-
label: 'Article Analyzer',
|
|
226
|
-
description:
|
|
227
|
-
'Extract and analyze article content, generate summaries and topic classifications.',
|
|
228
|
-
status: 'Ready',
|
|
229
|
-
lastRun: '2 minutes ago',
|
|
230
|
-
duration: '1.2s',
|
|
231
|
-
// iconName: 'Article', // Users must define their own icons
|
|
232
|
-
|
|
233
|
-
// Form data for configuration (keeping existing structure for compatibility)
|
|
234
|
-
formData: {
|
|
235
|
-
nodeId: 'data-formatting-node',
|
|
236
|
-
title: 'Article Analyzer',
|
|
237
|
-
type: 'formatting',
|
|
238
|
-
inputVariable: 'postsResponse',
|
|
239
|
-
formattingType: 'ai-powered',
|
|
240
|
-
aiFormatting: {
|
|
241
|
-
apiUrl:
|
|
242
|
-
'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent',
|
|
243
|
-
apiKey: 'PUT_GEMINI_API_KEY_HERE',
|
|
244
|
-
model: 'GPT-5 Thinking mini',
|
|
245
|
-
instruction:
|
|
246
|
-
'Extract and analyze article content, generate summaries and topic classifications. Return structured JSON with title, url, author, published_date, summary, topics, and confidence.',
|
|
247
|
-
temperature: 0.1,
|
|
248
|
-
maxTokens: 2048,
|
|
249
|
-
topP: 0.95,
|
|
250
|
-
systemPrompt:
|
|
251
|
-
'You are an article analysis assistant. Extract key information and provide structured analysis. Always return valid JSON format.',
|
|
252
|
-
},
|
|
253
|
-
outputVariable: 'analyzedArticle',
|
|
254
|
-
outputDataType: 'Object',
|
|
255
|
-
// Schema matching data for the three boxes
|
|
256
|
-
schemaMatch: {
|
|
257
|
-
matched: 4,
|
|
258
|
-
partial: 1,
|
|
259
|
-
ignored: 0,
|
|
260
|
-
},
|
|
261
|
-
// AI Reasoning data
|
|
262
|
-
aiReasoning: {
|
|
263
|
-
text: 'Analyzed the selected headline for key components and promises',
|
|
264
|
-
},
|
|
265
|
-
// Configuration cards for dynamic display
|
|
266
|
-
configurationCards: [
|
|
267
|
-
{
|
|
268
|
-
icon: '🧠',
|
|
269
|
-
label: 'GPT-5 Thinking mini · v1',
|
|
270
|
-
iconColor: '#ffffff',
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
icon: '📚',
|
|
274
|
-
label: 'KB: CNN_Articles (18 items)',
|
|
275
|
-
iconColor: '#10b981',
|
|
276
|
-
},
|
|
277
|
-
],
|
|
278
|
-
// AI Suggestions count
|
|
279
|
-
aiSuggestionsCount: 2,
|
|
280
|
-
isPinned: false,
|
|
281
|
-
isBlock: false,
|
|
282
|
-
blocks: [],
|
|
283
|
-
parallelChildrenCount: 0,
|
|
284
|
-
conditions: {
|
|
285
|
-
combinator: 'and',
|
|
286
|
-
rules: [],
|
|
287
|
-
},
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
|
-
width: 336,
|
|
291
|
-
height: 150,
|
|
292
|
-
measured: { width: 336, height: 150 },
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
id: 'google-sheets-node',
|
|
296
|
-
type: 'AutomationSheetsNode',
|
|
297
|
-
position: { x: 1100, y: 200 },
|
|
298
|
-
data: {
|
|
299
|
-
// Display data for the node UI
|
|
300
|
-
label: 'Data Sync Node',
|
|
301
|
-
description:
|
|
302
|
-
'Export formatted data to Google Sheets for analysis and reporting.',
|
|
303
|
-
status: 'Ready',
|
|
304
|
-
lastRun: '2m ago',
|
|
305
|
-
duration: '2.1s',
|
|
306
|
-
iconName: 'TableChart', // Users must define their own icons
|
|
307
|
-
|
|
308
|
-
// Form data for configuration (keeping existing structure for compatibility)
|
|
309
|
-
formData: {
|
|
310
|
-
nodeId: 'google-sheets-node',
|
|
311
|
-
title: 'Google Sheets Export',
|
|
312
|
-
type: 'sheets',
|
|
313
|
-
inputVariable: 'analyzedArticle',
|
|
314
|
-
sheetsConfig: {
|
|
315
|
-
spreadsheetId: '',
|
|
316
|
-
sheetName: 'News Analysis2',
|
|
317
|
-
range: 'A1:F16',
|
|
318
|
-
credentials: {
|
|
319
|
-
type: 'oauth',
|
|
320
|
-
clientId: 'PUT_GOOGLE_OAUTH_CLIENT_ID_HERE',
|
|
321
|
-
scopes: ['https://www.googleapis.com/auth/spreadsheets'],
|
|
322
|
-
},
|
|
323
|
-
},
|
|
324
|
-
dataMapping: {
|
|
325
|
-
headers: [
|
|
326
|
-
{ column: 'A', sourceField: 'title', dataType: 'string' },
|
|
327
|
-
{ column: 'B', sourceField: 'author', dataType: 'string' },
|
|
328
|
-
{ column: 'C', sourceField: 'published_date', dataType: 'date' },
|
|
329
|
-
{ column: 'D', sourceField: 'summary', dataType: 'string' },
|
|
330
|
-
{ column: 'E', sourceField: 'topics', dataType: 'string' },
|
|
331
|
-
{ column: 'F', sourceField: 'confidence', dataType: 'number' },
|
|
332
|
-
],
|
|
333
|
-
appendMode: true,
|
|
334
|
-
clearSheet: false,
|
|
335
|
-
},
|
|
336
|
-
exportOptions: {
|
|
337
|
-
exportFormat: 'sheets',
|
|
338
|
-
emailRecipients: ['recipient@example.com'],
|
|
339
|
-
fileName: 'news_analysis_report',
|
|
340
|
-
includeHeaders: true,
|
|
341
|
-
sendEmailNotification: false,
|
|
342
|
-
emailSendEnabled: true,
|
|
343
|
-
emailSender: 'sender@example.com',
|
|
344
|
-
emailSubject: 'News Analysis Results',
|
|
345
|
-
emailMessage: 'Please find the latest news analysis output.',
|
|
346
|
-
includeSpreadsheetLink: false,
|
|
347
|
-
attachExcel: false,
|
|
348
|
-
// Slack output disabled
|
|
349
|
-
slack: {
|
|
350
|
-
enabled: true,
|
|
351
|
-
webhookUrl: 'https://hooks.slack.com/services/PUT/WEBHOOK/URL',
|
|
352
|
-
channel: 'your-slack-channel',
|
|
353
|
-
messageTemplate:
|
|
354
|
-
'New analysis ready: {{fileName}}. Rows added: {{rowsAdded}}.',
|
|
355
|
-
includeDataMode: 'json',
|
|
356
|
-
includeSpreadsheetLink: false,
|
|
357
|
-
},
|
|
358
|
-
// WhatsApp output disabled
|
|
359
|
-
whatsapp: {
|
|
360
|
-
enabled: true,
|
|
361
|
-
phoneNumber: '+94716999591',
|
|
362
|
-
messageTemplate:
|
|
363
|
-
'Automation Result: {{fileName}} completed successfully. Rows processed: {{rowsAdded}}.',
|
|
364
|
-
includeDataMode: 'summary',
|
|
365
|
-
// Twilio configuration (optional)
|
|
366
|
-
twilio: {
|
|
367
|
-
enabled: true,
|
|
368
|
-
accountSid: 'PUT_TWILIO_ACCOUNT_SID_HERE',
|
|
369
|
-
authToken: 'PUT_TWILIO_AUTH_TOKEN_HERE',
|
|
370
|
-
fromNumber: 'whatsapp:+14155238886', // Twilio sandbox number
|
|
371
|
-
isSandbox: true,
|
|
372
|
-
templateSid: 'PUT_TWILIO_TEMPLATE_SID_HERE', // Optional for template messages
|
|
373
|
-
templateVariables: {
|
|
374
|
-
fileName: '{{fileName}}',
|
|
375
|
-
rowsAdded: '{{rowsAdded}}',
|
|
376
|
-
},
|
|
377
|
-
},
|
|
378
|
-
},
|
|
379
|
-
},
|
|
380
|
-
outputVariable: 'sheetsResponse',
|
|
381
|
-
errorHandling: {
|
|
382
|
-
onError: 'retry',
|
|
383
|
-
maxRetries: 3,
|
|
384
|
-
fallbackAction: 'log',
|
|
385
|
-
},
|
|
386
|
-
// AI Suggestions count
|
|
387
|
-
aiSuggestionsCount: 2,
|
|
388
|
-
isPinned: false,
|
|
389
|
-
isBlock: false,
|
|
390
|
-
blocks: [],
|
|
391
|
-
parallelChildrenCount: 0,
|
|
392
|
-
conditions: {
|
|
393
|
-
combinator: 'and',
|
|
394
|
-
rules: [],
|
|
395
|
-
},
|
|
396
|
-
},
|
|
397
|
-
},
|
|
398
|
-
width: 380,
|
|
399
|
-
height: 280,
|
|
400
|
-
measured: { width: 380, height: 280 },
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
id: 'note-node-1',
|
|
404
|
-
type: 'AutomationNoteNode',
|
|
405
|
-
position: { x: 700, y: 50 },
|
|
406
|
-
data: {
|
|
407
|
-
label: 'Article Analyzer',
|
|
408
|
-
description:
|
|
409
|
-
'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
|
|
410
|
-
iconName: 'Description',
|
|
411
|
-
noteType: 'purpose',
|
|
412
|
-
formData: {
|
|
413
|
-
nodeId: 'note-node-1',
|
|
414
|
-
title: 'Article Analyzer',
|
|
415
|
-
type: 'note',
|
|
416
|
-
noteType: 'purpose',
|
|
417
|
-
description:
|
|
418
|
-
'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
|
|
419
|
-
isPinned: false,
|
|
420
|
-
isBlock: false,
|
|
421
|
-
blocks: [],
|
|
422
|
-
parallelChildrenCount: 0,
|
|
423
|
-
conditions: {
|
|
424
|
-
combinator: 'and',
|
|
425
|
-
rules: [],
|
|
426
|
-
},
|
|
427
|
-
},
|
|
428
|
-
},
|
|
429
|
-
width: 336,
|
|
430
|
-
height: 150,
|
|
431
|
-
measured: { width: 336, height: 150 },
|
|
432
|
-
},
|
|
433
|
-
{
|
|
434
|
-
id: 'note-node-2',
|
|
435
|
-
type: 'AutomationNoteNode',
|
|
436
|
-
position: { x: 500, y: 50 },
|
|
437
|
-
data: {
|
|
438
|
-
label: 'Discover Headlines',
|
|
439
|
-
description:
|
|
440
|
-
'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
|
|
441
|
-
iconName: 'Description',
|
|
442
|
-
noteType: 'info',
|
|
443
|
-
formData: {
|
|
444
|
-
nodeId: 'note-node-2',
|
|
445
|
-
title: 'Discover Headlines',
|
|
446
|
-
type: 'note',
|
|
447
|
-
noteType: 'info',
|
|
448
|
-
description:
|
|
449
|
-
'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
|
|
450
|
-
isPinned: false,
|
|
451
|
-
isBlock: false,
|
|
452
|
-
blocks: [],
|
|
453
|
-
parallelChildrenCount: 0,
|
|
454
|
-
conditions: {
|
|
455
|
-
combinator: 'and',
|
|
456
|
-
rules: [],
|
|
457
|
-
},
|
|
458
|
-
},
|
|
459
|
-
},
|
|
460
|
-
width: 336,
|
|
461
|
-
height: 150,
|
|
462
|
-
measured: { width: 336, height: 150 },
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
id: 'end-node',
|
|
466
|
-
type: 'AutomationEndNode',
|
|
467
|
-
position: { x: 1500, y: 200 },
|
|
468
|
-
data: {
|
|
469
|
-
// Display data for the node UI
|
|
470
|
-
label: 'Results Display',
|
|
471
|
-
description: 'Display analyzed article results to the user.',
|
|
472
|
-
status: 'Ready',
|
|
473
|
-
lastRun: '1 minute ago',
|
|
474
|
-
duration: '0.3s',
|
|
475
|
-
// iconName: 'Stop', // Users must define their own icons
|
|
476
|
-
|
|
477
|
-
// Form data for configuration (keeping existing structure for compatibility)
|
|
478
|
-
formData: {
|
|
479
|
-
nodeId: 'end-node',
|
|
480
|
-
title: 'Results Display',
|
|
481
|
-
type: 'end',
|
|
482
|
-
outputType: 'display',
|
|
483
|
-
displayConfig: {
|
|
484
|
-
format: 'table',
|
|
485
|
-
showInConsole: true,
|
|
486
|
-
showInUI: true,
|
|
487
|
-
maxRows: 100,
|
|
488
|
-
},
|
|
489
|
-
storeConfig: {
|
|
490
|
-
destination: 'database',
|
|
491
|
-
connectionString: '',
|
|
492
|
-
tableName: 'automation_results',
|
|
493
|
-
fileName: 'automation_output.json',
|
|
494
|
-
format: 'json',
|
|
495
|
-
},
|
|
496
|
-
sendConfig: {
|
|
497
|
-
method: 'email',
|
|
498
|
-
recipients: ['admin@example.com'],
|
|
499
|
-
subject: 'Automation Results',
|
|
500
|
-
template: 'The automation workflow has completed successfully.',
|
|
501
|
-
webhookUrl: '',
|
|
502
|
-
},
|
|
503
|
-
webhookConfig: {
|
|
504
|
-
url: '',
|
|
505
|
-
method: 'POST',
|
|
506
|
-
headers: [
|
|
507
|
-
{ key: 'Content-Type', value: 'application/json' },
|
|
508
|
-
{ key: 'Authorization', value: 'Bearer {{webhookToken}}' },
|
|
509
|
-
],
|
|
510
|
-
payloadTemplate: '{{analyzedArticle}}',
|
|
511
|
-
},
|
|
512
|
-
// AI Suggestions count
|
|
513
|
-
aiSuggestionsCount: 2,
|
|
514
|
-
isPinned: false,
|
|
515
|
-
isBlock: false,
|
|
516
|
-
blocks: [],
|
|
517
|
-
parallelChildrenCount: 0,
|
|
518
|
-
conditions: {
|
|
519
|
-
combinator: 'and',
|
|
520
|
-
rules: [],
|
|
521
|
-
},
|
|
522
|
-
},
|
|
523
|
-
},
|
|
524
|
-
width: 336,
|
|
525
|
-
height: 150,
|
|
526
|
-
measured: { width: 336, height: 150 },
|
|
527
|
-
},
|
|
528
|
-
// =====================================
|
|
529
|
-
// Google Services Nodes
|
|
530
|
-
// =====================================
|
|
531
|
-
{
|
|
532
|
-
id: 'google-docs-node',
|
|
533
|
-
type: 'AutomationGoogleDocsNode',
|
|
534
|
-
position: { x: 100, y: 450 },
|
|
535
|
-
data: {
|
|
536
|
-
label: 'Create Report',
|
|
537
|
-
description: 'Create a Google Docs document',
|
|
538
|
-
serviceType: 'docs',
|
|
539
|
-
status: 'idle',
|
|
540
|
-
isFirstGoogleNode: true,
|
|
541
|
-
parameters: {
|
|
542
|
-
documentTitle: 'Automation Report',
|
|
543
|
-
operation: 'create',
|
|
544
|
-
content: 'Report content will be generated here...',
|
|
545
|
-
},
|
|
546
|
-
googleAuth: {
|
|
547
|
-
clientId: '',
|
|
548
|
-
scopes: [
|
|
549
|
-
'https://www.googleapis.com/auth/documents',
|
|
550
|
-
'https://www.googleapis.com/auth/drive',
|
|
551
|
-
],
|
|
552
|
-
isAuthenticated: false,
|
|
553
|
-
isLoading: false,
|
|
554
|
-
},
|
|
555
|
-
formData: {
|
|
556
|
-
nodeId: 'google-docs-node',
|
|
557
|
-
title: 'Create Report',
|
|
558
|
-
type: 'navigation',
|
|
559
|
-
serviceType: 'docs',
|
|
560
|
-
},
|
|
561
|
-
},
|
|
562
|
-
width: 300,
|
|
563
|
-
height: 200,
|
|
564
|
-
measured: { width: 300, height: 200 },
|
|
565
|
-
},
|
|
566
|
-
{
|
|
567
|
-
id: 'gmail-node',
|
|
568
|
-
type: 'AutomationGmailNode',
|
|
569
|
-
position: { x: 450, y: 450 },
|
|
570
|
-
data: {
|
|
571
|
-
label: 'Send Email',
|
|
572
|
-
description: 'Send email via Gmail',
|
|
573
|
-
serviceType: 'gmail',
|
|
574
|
-
status: 'idle',
|
|
575
|
-
isFirstGoogleNode: true,
|
|
576
|
-
parameters: {
|
|
577
|
-
to: ['recipient@example.com'],
|
|
578
|
-
subject: 'Automation Report',
|
|
579
|
-
body: 'Please find the attached report...',
|
|
580
|
-
},
|
|
581
|
-
googleAuth: {
|
|
582
|
-
clientId: '',
|
|
583
|
-
scopes: [
|
|
584
|
-
'https://www.googleapis.com/auth/gmail.send',
|
|
585
|
-
'https://www.googleapis.com/auth/gmail.compose',
|
|
586
|
-
],
|
|
587
|
-
isAuthenticated: false,
|
|
588
|
-
isLoading: false,
|
|
589
|
-
},
|
|
590
|
-
formData: {
|
|
591
|
-
nodeId: 'gmail-node',
|
|
592
|
-
title: 'Send Email',
|
|
593
|
-
type: 'navigation',
|
|
594
|
-
serviceType: 'gmail',
|
|
595
|
-
},
|
|
596
|
-
},
|
|
597
|
-
width: 300,
|
|
598
|
-
height: 200,
|
|
599
|
-
measured: { width: 300, height: 200 },
|
|
600
|
-
},
|
|
601
|
-
{
|
|
602
|
-
id: 'google-meet-node',
|
|
603
|
-
type: 'AutomationGoogleMeetNode',
|
|
604
|
-
position: { x: 800, y: 450 },
|
|
605
|
-
data: {
|
|
606
|
-
label: 'Create Meeting',
|
|
607
|
-
description: 'Create a Google Meet link',
|
|
608
|
-
serviceType: 'meet',
|
|
609
|
-
status: 'idle',
|
|
610
|
-
isFirstGoogleNode: true,
|
|
611
|
-
parameters: {
|
|
612
|
-
meetingTitle: 'Project Discussion',
|
|
613
|
-
attendees: ['team@example.com'],
|
|
614
|
-
},
|
|
615
|
-
googleAuth: {
|
|
616
|
-
clientId: '',
|
|
617
|
-
scopes: ['https://www.googleapis.com/auth/meetings.space.created'],
|
|
618
|
-
isAuthenticated: false,
|
|
619
|
-
isLoading: false,
|
|
620
|
-
},
|
|
621
|
-
formData: {
|
|
622
|
-
nodeId: 'google-meet-node',
|
|
623
|
-
title: 'Create Meeting',
|
|
624
|
-
type: 'navigation',
|
|
625
|
-
serviceType: 'meet',
|
|
626
|
-
},
|
|
627
|
-
},
|
|
628
|
-
width: 300,
|
|
629
|
-
height: 200,
|
|
630
|
-
measured: { width: 300, height: 200 },
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
id: 'google-slides-node',
|
|
634
|
-
type: 'AutomationGoogleSlidesNode',
|
|
635
|
-
position: { x: 1150, y: 450 },
|
|
636
|
-
data: {
|
|
637
|
-
label: 'Create Presentation',
|
|
638
|
-
description: 'Create a Google Slides presentation',
|
|
639
|
-
serviceType: 'slides',
|
|
640
|
-
status: 'idle',
|
|
641
|
-
isFirstGoogleNode: true,
|
|
642
|
-
parameters: {
|
|
643
|
-
presentationTitle: 'Project Presentation',
|
|
644
|
-
slideCount: 5,
|
|
645
|
-
},
|
|
646
|
-
googleAuth: {
|
|
647
|
-
clientId: '',
|
|
648
|
-
scopes: [
|
|
649
|
-
'https://www.googleapis.com/auth/presentations',
|
|
650
|
-
'https://www.googleapis.com/auth/drive',
|
|
651
|
-
],
|
|
652
|
-
isAuthenticated: false,
|
|
653
|
-
isLoading: false,
|
|
654
|
-
},
|
|
655
|
-
formData: {
|
|
656
|
-
nodeId: 'google-slides-node',
|
|
657
|
-
title: 'Create Presentation',
|
|
658
|
-
type: 'navigation',
|
|
659
|
-
serviceType: 'slides',
|
|
660
|
-
},
|
|
661
|
-
},
|
|
662
|
-
width: 300,
|
|
663
|
-
height: 200,
|
|
664
|
-
measured: { width: 300, height: 200 },
|
|
665
|
-
},
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
//
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
},
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
},
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
},
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
},
|
|
824
|
-
|
|
825
|
-
|
|
1
|
+
import { MarkerType } from '@xyflow/react';
|
|
2
|
+
|
|
3
|
+
// Default nodes for the automation diagram
|
|
4
|
+
export const automationDefaultNodes = [
|
|
5
|
+
{
|
|
6
|
+
id: 'start-node',
|
|
7
|
+
type: 'AutomationStartNode',
|
|
8
|
+
position: { x: 100, y: 200 },
|
|
9
|
+
data: {
|
|
10
|
+
// Display data for the node UI
|
|
11
|
+
label: 'Workflow Trigger',
|
|
12
|
+
description: 'Workflow entry point. Triggered manually or on schedule.',
|
|
13
|
+
status: 'Ready',
|
|
14
|
+
lastRun: 'Never',
|
|
15
|
+
duration: '0.0s',
|
|
16
|
+
// iconName: 'PlayArrow', // Users must define their own icons
|
|
17
|
+
|
|
18
|
+
// Form data for configuration (keeping existing structure for compatibility)
|
|
19
|
+
formData: {
|
|
20
|
+
nodeId: 'start-node',
|
|
21
|
+
title: 'Workflow Trigger',
|
|
22
|
+
type: 'start',
|
|
23
|
+
triggerType: 'manual',
|
|
24
|
+
scheduleConfig: {
|
|
25
|
+
frequency: 'daily',
|
|
26
|
+
time: '09:00',
|
|
27
|
+
timezone: 'UTC',
|
|
28
|
+
},
|
|
29
|
+
eventConfig: {
|
|
30
|
+
webhookUrl: '',
|
|
31
|
+
eventType: 'webhook',
|
|
32
|
+
filters: [],
|
|
33
|
+
},
|
|
34
|
+
initialVariables: [
|
|
35
|
+
{
|
|
36
|
+
name: 'runId',
|
|
37
|
+
value: '{{timestamp}}',
|
|
38
|
+
type: 'string',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'startTime',
|
|
42
|
+
value: '{{now}}',
|
|
43
|
+
type: 'string',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
outputVariable: 'workflowContext',
|
|
47
|
+
isPinned: false,
|
|
48
|
+
isBlock: false,
|
|
49
|
+
blocks: [],
|
|
50
|
+
parallelChildrenCount: 0,
|
|
51
|
+
conditions: {
|
|
52
|
+
combinator: 'and',
|
|
53
|
+
rules: [],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
width: 336,
|
|
58
|
+
height: 150,
|
|
59
|
+
measured: { width: 336, height: 150 },
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'api-call-node',
|
|
63
|
+
type: 'AutomationApiNode',
|
|
64
|
+
position: { x: 500, y: 200 },
|
|
65
|
+
data: {
|
|
66
|
+
// Display data for the node UI
|
|
67
|
+
label: 'Discover Headlines',
|
|
68
|
+
description:
|
|
69
|
+
"This node extracts all news headlines from CNN's homepage using web scraping techniques.",
|
|
70
|
+
status: 'Ready',
|
|
71
|
+
lastRun: 'Never',
|
|
72
|
+
duration: '0.8s',
|
|
73
|
+
iconName: 'Api', // Users must define their own icons
|
|
74
|
+
|
|
75
|
+
// Form data for configuration
|
|
76
|
+
formData: {
|
|
77
|
+
nodeId: 'api-call-node',
|
|
78
|
+
title: 'Discover Headlines',
|
|
79
|
+
type: 'api',
|
|
80
|
+
method: 'GET',
|
|
81
|
+
url: 'https://jsonplaceholder.typicode.com/posts',
|
|
82
|
+
headers: [
|
|
83
|
+
{ key: 'Content-Type', value: 'application/json', enabled: true },
|
|
84
|
+
{ key: 'Accept', value: 'application/json', enabled: true },
|
|
85
|
+
{ key: 'User-Agent', value: 'AutomationBot/1.0', enabled: true },
|
|
86
|
+
],
|
|
87
|
+
queryParams: [
|
|
88
|
+
{ key: '_limit', value: '15', enabled: true },
|
|
89
|
+
{ key: 'userId', value: '1', enabled: true },
|
|
90
|
+
],
|
|
91
|
+
body: '',
|
|
92
|
+
bodyType: 'json',
|
|
93
|
+
timeout: 30000,
|
|
94
|
+
retryCount: 3,
|
|
95
|
+
retryDelay: 1000,
|
|
96
|
+
responseVariable: 'postsResponse',
|
|
97
|
+
responseDataType: 'Object',
|
|
98
|
+
errorHandling: {
|
|
99
|
+
onError: 'retry',
|
|
100
|
+
maxRetries: 3,
|
|
101
|
+
fallbackValue: '{"error": "Failed to fetch posts data"}',
|
|
102
|
+
},
|
|
103
|
+
// Schema matching data for the three boxes
|
|
104
|
+
schemaMatch: {
|
|
105
|
+
matched: 5,
|
|
106
|
+
partial: 0,
|
|
107
|
+
ignored: 1,
|
|
108
|
+
},
|
|
109
|
+
// Configuration cards for dynamic display
|
|
110
|
+
configurationCards: [
|
|
111
|
+
{
|
|
112
|
+
icon: '⚙️',
|
|
113
|
+
label: 'GPT-5 Thinking mini · v1',
|
|
114
|
+
iconColor: '#ffffff',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
icon: '🗄️',
|
|
118
|
+
label: 'KB: CNN_Homepage_Titles (18 items)',
|
|
119
|
+
iconColor: '#10b981',
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
// AI Suggestions count and data
|
|
123
|
+
aiSuggestionsCount: 2,
|
|
124
|
+
aiSuggestions: [
|
|
125
|
+
{
|
|
126
|
+
id: '1',
|
|
127
|
+
title: 'Add Citation Extraction',
|
|
128
|
+
description: 'Automatically extract and format citations from article content.',
|
|
129
|
+
tags: ['classification', 'enhancement'],
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: '2',
|
|
133
|
+
title: 'Generate Bullet Summary',
|
|
134
|
+
description: 'Create a concise bullet-point summary of the article\'s main points.',
|
|
135
|
+
tags: ['classification', 'enhancement'],
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
isPinned: false,
|
|
139
|
+
isBlock: false,
|
|
140
|
+
blocks: [],
|
|
141
|
+
parallelChildrenCount: 0,
|
|
142
|
+
conditions: {
|
|
143
|
+
combinator: 'and',
|
|
144
|
+
rules: [],
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
width: 336,
|
|
149
|
+
height: 150,
|
|
150
|
+
measured: { width: 336, height: 150 },
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: 'navigation-node',
|
|
154
|
+
type: 'AutomationNavigationNode',
|
|
155
|
+
position: { x: 600, y: 200 },
|
|
156
|
+
data: {
|
|
157
|
+
// Display data for the node UI
|
|
158
|
+
label: 'Navigate to Website',
|
|
159
|
+
description: 'Navigate to the target website and wait for page load',
|
|
160
|
+
status: 'Ready',
|
|
161
|
+
navigationType: 'navigate',
|
|
162
|
+
url: 'https://example.com',
|
|
163
|
+
lastRun: 'Never',
|
|
164
|
+
backgroundColor: '#181C25',
|
|
165
|
+
textColor: '#ffffff',
|
|
166
|
+
borderColor: '#1e293b',
|
|
167
|
+
iconName: 'Navigation',
|
|
168
|
+
// Form data for configuration
|
|
169
|
+
formData: {
|
|
170
|
+
nodeId: 'navigation-node',
|
|
171
|
+
title: 'Navigate to Website',
|
|
172
|
+
type: 'navigation',
|
|
173
|
+
navigationType: 'navigate',
|
|
174
|
+
url: 'https://example.com',
|
|
175
|
+
timeout: 30000,
|
|
176
|
+
retryCount: 3,
|
|
177
|
+
outputVariable: 'navigationResult',
|
|
178
|
+
errorHandling: {
|
|
179
|
+
onError: 'retry',
|
|
180
|
+
maxRetries: 3,
|
|
181
|
+
fallbackAction: 'skip',
|
|
182
|
+
},
|
|
183
|
+
isPinned: false,
|
|
184
|
+
isBlock: false,
|
|
185
|
+
blocks: [],
|
|
186
|
+
parallelChildrenCount: 0,
|
|
187
|
+
conditions: {
|
|
188
|
+
combinator: 'and',
|
|
189
|
+
rules: [],
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
width: 336,
|
|
194
|
+
height: 150,
|
|
195
|
+
measured: { width: 336, height: 150 },
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: 'ai-suggestion-node',
|
|
199
|
+
type: 'AutomationAISuggestionNode',
|
|
200
|
+
position: { x: 900, y: 200 },
|
|
201
|
+
data: {
|
|
202
|
+
label: 'Citation Extractor',
|
|
203
|
+
description: 'Extract and format citation from article text.',
|
|
204
|
+
iconName: 'Lightbulb',
|
|
205
|
+
formData: {
|
|
206
|
+
badgeText: 'Suggested Node',
|
|
207
|
+
mapping: { from: 'references', to: 'source_text' },
|
|
208
|
+
pointers: [
|
|
209
|
+
'Ensures proper attribution',
|
|
210
|
+
'Creates standardized reference format',
|
|
211
|
+
'Enables source verification',
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
width: 336,
|
|
216
|
+
height: 150,
|
|
217
|
+
measured: { width: 336, height: 150 },
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
id: 'data-formatting-node',
|
|
221
|
+
type: 'AutomationFormattingNode',
|
|
222
|
+
position: { x: 700, y: 200 },
|
|
223
|
+
data: {
|
|
224
|
+
// Display data for the node UI
|
|
225
|
+
label: 'Article Analyzer',
|
|
226
|
+
description:
|
|
227
|
+
'Extract and analyze article content, generate summaries and topic classifications.',
|
|
228
|
+
status: 'Ready',
|
|
229
|
+
lastRun: '2 minutes ago',
|
|
230
|
+
duration: '1.2s',
|
|
231
|
+
// iconName: 'Article', // Users must define their own icons
|
|
232
|
+
|
|
233
|
+
// Form data for configuration (keeping existing structure for compatibility)
|
|
234
|
+
formData: {
|
|
235
|
+
nodeId: 'data-formatting-node',
|
|
236
|
+
title: 'Article Analyzer',
|
|
237
|
+
type: 'formatting',
|
|
238
|
+
inputVariable: 'postsResponse',
|
|
239
|
+
formattingType: 'ai-powered',
|
|
240
|
+
aiFormatting: {
|
|
241
|
+
apiUrl:
|
|
242
|
+
'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent',
|
|
243
|
+
apiKey: 'PUT_GEMINI_API_KEY_HERE',
|
|
244
|
+
model: 'GPT-5 Thinking mini',
|
|
245
|
+
instruction:
|
|
246
|
+
'Extract and analyze article content, generate summaries and topic classifications. Return structured JSON with title, url, author, published_date, summary, topics, and confidence.',
|
|
247
|
+
temperature: 0.1,
|
|
248
|
+
maxTokens: 2048,
|
|
249
|
+
topP: 0.95,
|
|
250
|
+
systemPrompt:
|
|
251
|
+
'You are an article analysis assistant. Extract key information and provide structured analysis. Always return valid JSON format.',
|
|
252
|
+
},
|
|
253
|
+
outputVariable: 'analyzedArticle',
|
|
254
|
+
outputDataType: 'Object',
|
|
255
|
+
// Schema matching data for the three boxes
|
|
256
|
+
schemaMatch: {
|
|
257
|
+
matched: 4,
|
|
258
|
+
partial: 1,
|
|
259
|
+
ignored: 0,
|
|
260
|
+
},
|
|
261
|
+
// AI Reasoning data
|
|
262
|
+
aiReasoning: {
|
|
263
|
+
text: 'Analyzed the selected headline for key components and promises',
|
|
264
|
+
},
|
|
265
|
+
// Configuration cards for dynamic display
|
|
266
|
+
configurationCards: [
|
|
267
|
+
{
|
|
268
|
+
icon: '🧠',
|
|
269
|
+
label: 'GPT-5 Thinking mini · v1',
|
|
270
|
+
iconColor: '#ffffff',
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
icon: '📚',
|
|
274
|
+
label: 'KB: CNN_Articles (18 items)',
|
|
275
|
+
iconColor: '#10b981',
|
|
276
|
+
},
|
|
277
|
+
],
|
|
278
|
+
// AI Suggestions count
|
|
279
|
+
aiSuggestionsCount: 2,
|
|
280
|
+
isPinned: false,
|
|
281
|
+
isBlock: false,
|
|
282
|
+
blocks: [],
|
|
283
|
+
parallelChildrenCount: 0,
|
|
284
|
+
conditions: {
|
|
285
|
+
combinator: 'and',
|
|
286
|
+
rules: [],
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
width: 336,
|
|
291
|
+
height: 150,
|
|
292
|
+
measured: { width: 336, height: 150 },
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
id: 'google-sheets-node',
|
|
296
|
+
type: 'AutomationSheetsNode',
|
|
297
|
+
position: { x: 1100, y: 200 },
|
|
298
|
+
data: {
|
|
299
|
+
// Display data for the node UI
|
|
300
|
+
label: 'Data Sync Node',
|
|
301
|
+
description:
|
|
302
|
+
'Export formatted data to Google Sheets for analysis and reporting.',
|
|
303
|
+
status: 'Ready',
|
|
304
|
+
lastRun: '2m ago',
|
|
305
|
+
duration: '2.1s',
|
|
306
|
+
iconName: 'TableChart', // Users must define their own icons
|
|
307
|
+
|
|
308
|
+
// Form data for configuration (keeping existing structure for compatibility)
|
|
309
|
+
formData: {
|
|
310
|
+
nodeId: 'google-sheets-node',
|
|
311
|
+
title: 'Google Sheets Export',
|
|
312
|
+
type: 'sheets',
|
|
313
|
+
inputVariable: 'analyzedArticle',
|
|
314
|
+
sheetsConfig: {
|
|
315
|
+
spreadsheetId: '',
|
|
316
|
+
sheetName: 'News Analysis2',
|
|
317
|
+
range: 'A1:F16',
|
|
318
|
+
credentials: {
|
|
319
|
+
type: 'oauth',
|
|
320
|
+
clientId: 'PUT_GOOGLE_OAUTH_CLIENT_ID_HERE',
|
|
321
|
+
scopes: ['https://www.googleapis.com/auth/spreadsheets'],
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
dataMapping: {
|
|
325
|
+
headers: [
|
|
326
|
+
{ column: 'A', sourceField: 'title', dataType: 'string' },
|
|
327
|
+
{ column: 'B', sourceField: 'author', dataType: 'string' },
|
|
328
|
+
{ column: 'C', sourceField: 'published_date', dataType: 'date' },
|
|
329
|
+
{ column: 'D', sourceField: 'summary', dataType: 'string' },
|
|
330
|
+
{ column: 'E', sourceField: 'topics', dataType: 'string' },
|
|
331
|
+
{ column: 'F', sourceField: 'confidence', dataType: 'number' },
|
|
332
|
+
],
|
|
333
|
+
appendMode: true,
|
|
334
|
+
clearSheet: false,
|
|
335
|
+
},
|
|
336
|
+
exportOptions: {
|
|
337
|
+
exportFormat: 'sheets',
|
|
338
|
+
emailRecipients: ['recipient@example.com'],
|
|
339
|
+
fileName: 'news_analysis_report',
|
|
340
|
+
includeHeaders: true,
|
|
341
|
+
sendEmailNotification: false,
|
|
342
|
+
emailSendEnabled: true,
|
|
343
|
+
emailSender: 'sender@example.com',
|
|
344
|
+
emailSubject: 'News Analysis Results',
|
|
345
|
+
emailMessage: 'Please find the latest news analysis output.',
|
|
346
|
+
includeSpreadsheetLink: false,
|
|
347
|
+
attachExcel: false,
|
|
348
|
+
// Slack output disabled
|
|
349
|
+
slack: {
|
|
350
|
+
enabled: true,
|
|
351
|
+
webhookUrl: 'https://hooks.slack.com/services/PUT/WEBHOOK/URL',
|
|
352
|
+
channel: 'your-slack-channel',
|
|
353
|
+
messageTemplate:
|
|
354
|
+
'New analysis ready: {{fileName}}. Rows added: {{rowsAdded}}.',
|
|
355
|
+
includeDataMode: 'json',
|
|
356
|
+
includeSpreadsheetLink: false,
|
|
357
|
+
},
|
|
358
|
+
// WhatsApp output disabled
|
|
359
|
+
whatsapp: {
|
|
360
|
+
enabled: true,
|
|
361
|
+
phoneNumber: '+94716999591',
|
|
362
|
+
messageTemplate:
|
|
363
|
+
'Automation Result: {{fileName}} completed successfully. Rows processed: {{rowsAdded}}.',
|
|
364
|
+
includeDataMode: 'summary',
|
|
365
|
+
// Twilio configuration (optional)
|
|
366
|
+
twilio: {
|
|
367
|
+
enabled: true,
|
|
368
|
+
accountSid: 'PUT_TWILIO_ACCOUNT_SID_HERE',
|
|
369
|
+
authToken: 'PUT_TWILIO_AUTH_TOKEN_HERE',
|
|
370
|
+
fromNumber: 'whatsapp:+14155238886', // Twilio sandbox number
|
|
371
|
+
isSandbox: true,
|
|
372
|
+
templateSid: 'PUT_TWILIO_TEMPLATE_SID_HERE', // Optional for template messages
|
|
373
|
+
templateVariables: {
|
|
374
|
+
fileName: '{{fileName}}',
|
|
375
|
+
rowsAdded: '{{rowsAdded}}',
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
outputVariable: 'sheetsResponse',
|
|
381
|
+
errorHandling: {
|
|
382
|
+
onError: 'retry',
|
|
383
|
+
maxRetries: 3,
|
|
384
|
+
fallbackAction: 'log',
|
|
385
|
+
},
|
|
386
|
+
// AI Suggestions count
|
|
387
|
+
aiSuggestionsCount: 2,
|
|
388
|
+
isPinned: false,
|
|
389
|
+
isBlock: false,
|
|
390
|
+
blocks: [],
|
|
391
|
+
parallelChildrenCount: 0,
|
|
392
|
+
conditions: {
|
|
393
|
+
combinator: 'and',
|
|
394
|
+
rules: [],
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
width: 380,
|
|
399
|
+
height: 280,
|
|
400
|
+
measured: { width: 380, height: 280 },
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
id: 'note-node-1',
|
|
404
|
+
type: 'AutomationNoteNode',
|
|
405
|
+
position: { x: 700, y: 50 },
|
|
406
|
+
data: {
|
|
407
|
+
label: 'Article Analyzer',
|
|
408
|
+
description:
|
|
409
|
+
'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
|
|
410
|
+
iconName: 'Description',
|
|
411
|
+
noteType: 'purpose',
|
|
412
|
+
formData: {
|
|
413
|
+
nodeId: 'note-node-1',
|
|
414
|
+
title: 'Article Analyzer',
|
|
415
|
+
type: 'note',
|
|
416
|
+
noteType: 'purpose',
|
|
417
|
+
description:
|
|
418
|
+
'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
|
|
419
|
+
isPinned: false,
|
|
420
|
+
isBlock: false,
|
|
421
|
+
blocks: [],
|
|
422
|
+
parallelChildrenCount: 0,
|
|
423
|
+
conditions: {
|
|
424
|
+
combinator: 'and',
|
|
425
|
+
rules: [],
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
width: 336,
|
|
430
|
+
height: 150,
|
|
431
|
+
measured: { width: 336, height: 150 },
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
id: 'note-node-2',
|
|
435
|
+
type: 'AutomationNoteNode',
|
|
436
|
+
position: { x: 500, y: 50 },
|
|
437
|
+
data: {
|
|
438
|
+
label: 'Discover Headlines',
|
|
439
|
+
description:
|
|
440
|
+
'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
|
|
441
|
+
iconName: 'Description',
|
|
442
|
+
noteType: 'info',
|
|
443
|
+
formData: {
|
|
444
|
+
nodeId: 'note-node-2',
|
|
445
|
+
title: 'Discover Headlines',
|
|
446
|
+
type: 'note',
|
|
447
|
+
noteType: 'info',
|
|
448
|
+
description:
|
|
449
|
+
'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
|
|
450
|
+
isPinned: false,
|
|
451
|
+
isBlock: false,
|
|
452
|
+
blocks: [],
|
|
453
|
+
parallelChildrenCount: 0,
|
|
454
|
+
conditions: {
|
|
455
|
+
combinator: 'and',
|
|
456
|
+
rules: [],
|
|
457
|
+
},
|
|
458
|
+
},
|
|
459
|
+
},
|
|
460
|
+
width: 336,
|
|
461
|
+
height: 150,
|
|
462
|
+
measured: { width: 336, height: 150 },
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
id: 'end-node',
|
|
466
|
+
type: 'AutomationEndNode',
|
|
467
|
+
position: { x: 1500, y: 200 },
|
|
468
|
+
data: {
|
|
469
|
+
// Display data for the node UI
|
|
470
|
+
label: 'Results Display',
|
|
471
|
+
description: 'Display analyzed article results to the user.',
|
|
472
|
+
status: 'Ready',
|
|
473
|
+
lastRun: '1 minute ago',
|
|
474
|
+
duration: '0.3s',
|
|
475
|
+
// iconName: 'Stop', // Users must define their own icons
|
|
476
|
+
|
|
477
|
+
// Form data for configuration (keeping existing structure for compatibility)
|
|
478
|
+
formData: {
|
|
479
|
+
nodeId: 'end-node',
|
|
480
|
+
title: 'Results Display',
|
|
481
|
+
type: 'end',
|
|
482
|
+
outputType: 'display',
|
|
483
|
+
displayConfig: {
|
|
484
|
+
format: 'table',
|
|
485
|
+
showInConsole: true,
|
|
486
|
+
showInUI: true,
|
|
487
|
+
maxRows: 100,
|
|
488
|
+
},
|
|
489
|
+
storeConfig: {
|
|
490
|
+
destination: 'database',
|
|
491
|
+
connectionString: '',
|
|
492
|
+
tableName: 'automation_results',
|
|
493
|
+
fileName: 'automation_output.json',
|
|
494
|
+
format: 'json',
|
|
495
|
+
},
|
|
496
|
+
sendConfig: {
|
|
497
|
+
method: 'email',
|
|
498
|
+
recipients: ['admin@example.com'],
|
|
499
|
+
subject: 'Automation Results',
|
|
500
|
+
template: 'The automation workflow has completed successfully.',
|
|
501
|
+
webhookUrl: '',
|
|
502
|
+
},
|
|
503
|
+
webhookConfig: {
|
|
504
|
+
url: '',
|
|
505
|
+
method: 'POST',
|
|
506
|
+
headers: [
|
|
507
|
+
{ key: 'Content-Type', value: 'application/json' },
|
|
508
|
+
{ key: 'Authorization', value: 'Bearer {{webhookToken}}' },
|
|
509
|
+
],
|
|
510
|
+
payloadTemplate: '{{analyzedArticle}}',
|
|
511
|
+
},
|
|
512
|
+
// AI Suggestions count
|
|
513
|
+
aiSuggestionsCount: 2,
|
|
514
|
+
isPinned: false,
|
|
515
|
+
isBlock: false,
|
|
516
|
+
blocks: [],
|
|
517
|
+
parallelChildrenCount: 0,
|
|
518
|
+
conditions: {
|
|
519
|
+
combinator: 'and',
|
|
520
|
+
rules: [],
|
|
521
|
+
},
|
|
522
|
+
},
|
|
523
|
+
},
|
|
524
|
+
width: 336,
|
|
525
|
+
height: 150,
|
|
526
|
+
measured: { width: 336, height: 150 },
|
|
527
|
+
},
|
|
528
|
+
// =====================================
|
|
529
|
+
// Google Services Nodes
|
|
530
|
+
// =====================================
|
|
531
|
+
{
|
|
532
|
+
id: 'google-docs-node',
|
|
533
|
+
type: 'AutomationGoogleDocsNode',
|
|
534
|
+
position: { x: 100, y: 450 },
|
|
535
|
+
data: {
|
|
536
|
+
label: 'Create Report',
|
|
537
|
+
description: 'Create a Google Docs document',
|
|
538
|
+
serviceType: 'docs',
|
|
539
|
+
status: 'idle',
|
|
540
|
+
isFirstGoogleNode: true,
|
|
541
|
+
parameters: {
|
|
542
|
+
documentTitle: 'Automation Report',
|
|
543
|
+
operation: 'create',
|
|
544
|
+
content: 'Report content will be generated here...',
|
|
545
|
+
},
|
|
546
|
+
googleAuth: {
|
|
547
|
+
clientId: '',
|
|
548
|
+
scopes: [
|
|
549
|
+
'https://www.googleapis.com/auth/documents',
|
|
550
|
+
'https://www.googleapis.com/auth/drive',
|
|
551
|
+
],
|
|
552
|
+
isAuthenticated: false,
|
|
553
|
+
isLoading: false,
|
|
554
|
+
},
|
|
555
|
+
formData: {
|
|
556
|
+
nodeId: 'google-docs-node',
|
|
557
|
+
title: 'Create Report',
|
|
558
|
+
type: 'navigation',
|
|
559
|
+
serviceType: 'docs',
|
|
560
|
+
},
|
|
561
|
+
},
|
|
562
|
+
width: 300,
|
|
563
|
+
height: 200,
|
|
564
|
+
measured: { width: 300, height: 200 },
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
id: 'gmail-node',
|
|
568
|
+
type: 'AutomationGmailNode',
|
|
569
|
+
position: { x: 450, y: 450 },
|
|
570
|
+
data: {
|
|
571
|
+
label: 'Send Email',
|
|
572
|
+
description: 'Send email via Gmail',
|
|
573
|
+
serviceType: 'gmail',
|
|
574
|
+
status: 'idle',
|
|
575
|
+
isFirstGoogleNode: true,
|
|
576
|
+
parameters: {
|
|
577
|
+
to: ['recipient@example.com'],
|
|
578
|
+
subject: 'Automation Report',
|
|
579
|
+
body: 'Please find the attached report...',
|
|
580
|
+
},
|
|
581
|
+
googleAuth: {
|
|
582
|
+
clientId: '',
|
|
583
|
+
scopes: [
|
|
584
|
+
'https://www.googleapis.com/auth/gmail.send',
|
|
585
|
+
'https://www.googleapis.com/auth/gmail.compose',
|
|
586
|
+
],
|
|
587
|
+
isAuthenticated: false,
|
|
588
|
+
isLoading: false,
|
|
589
|
+
},
|
|
590
|
+
formData: {
|
|
591
|
+
nodeId: 'gmail-node',
|
|
592
|
+
title: 'Send Email',
|
|
593
|
+
type: 'navigation',
|
|
594
|
+
serviceType: 'gmail',
|
|
595
|
+
},
|
|
596
|
+
},
|
|
597
|
+
width: 300,
|
|
598
|
+
height: 200,
|
|
599
|
+
measured: { width: 300, height: 200 },
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
id: 'google-meet-node',
|
|
603
|
+
type: 'AutomationGoogleMeetNode',
|
|
604
|
+
position: { x: 800, y: 450 },
|
|
605
|
+
data: {
|
|
606
|
+
label: 'Create Meeting',
|
|
607
|
+
description: 'Create a Google Meet link',
|
|
608
|
+
serviceType: 'meet',
|
|
609
|
+
status: 'idle',
|
|
610
|
+
isFirstGoogleNode: true,
|
|
611
|
+
parameters: {
|
|
612
|
+
meetingTitle: 'Project Discussion',
|
|
613
|
+
attendees: ['team@example.com'],
|
|
614
|
+
},
|
|
615
|
+
googleAuth: {
|
|
616
|
+
clientId: '',
|
|
617
|
+
scopes: ['https://www.googleapis.com/auth/meetings.space.created'],
|
|
618
|
+
isAuthenticated: false,
|
|
619
|
+
isLoading: false,
|
|
620
|
+
},
|
|
621
|
+
formData: {
|
|
622
|
+
nodeId: 'google-meet-node',
|
|
623
|
+
title: 'Create Meeting',
|
|
624
|
+
type: 'navigation',
|
|
625
|
+
serviceType: 'meet',
|
|
626
|
+
},
|
|
627
|
+
},
|
|
628
|
+
width: 300,
|
|
629
|
+
height: 200,
|
|
630
|
+
measured: { width: 300, height: 200 },
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
id: 'google-slides-node',
|
|
634
|
+
type: 'AutomationGoogleSlidesNode',
|
|
635
|
+
position: { x: 1150, y: 450 },
|
|
636
|
+
data: {
|
|
637
|
+
label: 'Create Presentation',
|
|
638
|
+
description: 'Create a Google Slides presentation',
|
|
639
|
+
serviceType: 'slides',
|
|
640
|
+
status: 'idle',
|
|
641
|
+
isFirstGoogleNode: true,
|
|
642
|
+
parameters: {
|
|
643
|
+
presentationTitle: 'Project Presentation',
|
|
644
|
+
slideCount: 5,
|
|
645
|
+
},
|
|
646
|
+
googleAuth: {
|
|
647
|
+
clientId: '',
|
|
648
|
+
scopes: [
|
|
649
|
+
'https://www.googleapis.com/auth/presentations',
|
|
650
|
+
'https://www.googleapis.com/auth/drive',
|
|
651
|
+
],
|
|
652
|
+
isAuthenticated: false,
|
|
653
|
+
isLoading: false,
|
|
654
|
+
},
|
|
655
|
+
formData: {
|
|
656
|
+
nodeId: 'google-slides-node',
|
|
657
|
+
title: 'Create Presentation',
|
|
658
|
+
type: 'navigation',
|
|
659
|
+
serviceType: 'slides',
|
|
660
|
+
},
|
|
661
|
+
},
|
|
662
|
+
width: 300,
|
|
663
|
+
height: 200,
|
|
664
|
+
measured: { width: 300, height: 200 },
|
|
665
|
+
},
|
|
666
|
+
// =====================================
|
|
667
|
+
// Slack Integration Node
|
|
668
|
+
// =====================================
|
|
669
|
+
{
|
|
670
|
+
id: 'slack-node',
|
|
671
|
+
type: 'AutomationSlackNode',
|
|
672
|
+
position: { x: 1500, y: 450 },
|
|
673
|
+
data: {
|
|
674
|
+
label: 'Send Slack Notification',
|
|
675
|
+
description: 'Send a message to Slack channel',
|
|
676
|
+
operationType: 'send-message',
|
|
677
|
+
status: 'idle',
|
|
678
|
+
parameters: {
|
|
679
|
+
channel: 'automation-updates',
|
|
680
|
+
message: 'Workflow completed successfully! Check the results.',
|
|
681
|
+
slackAccessToken: '',
|
|
682
|
+
slackTokenExpiresAt: undefined,
|
|
683
|
+
slackTeamId: '',
|
|
684
|
+
slackTeamName: '',
|
|
685
|
+
slackUserId: '',
|
|
686
|
+
slackUserName: '',
|
|
687
|
+
},
|
|
688
|
+
slackAuth: {
|
|
689
|
+
clientId: '',
|
|
690
|
+
scopes: [
|
|
691
|
+
'chat:write',
|
|
692
|
+
'channels:read',
|
|
693
|
+
'users:read',
|
|
694
|
+
],
|
|
695
|
+
isAuthenticated: false,
|
|
696
|
+
isLoading: false,
|
|
697
|
+
},
|
|
698
|
+
formData: {
|
|
699
|
+
nodeId: 'slack-node',
|
|
700
|
+
title: 'Send Slack Notification',
|
|
701
|
+
type: 'slack',
|
|
702
|
+
operationType: 'send-message',
|
|
703
|
+
channel: 'automation-updates',
|
|
704
|
+
message: 'Workflow completed successfully! Check the results.',
|
|
705
|
+
},
|
|
706
|
+
lastRun: 'Never',
|
|
707
|
+
},
|
|
708
|
+
width: 300,
|
|
709
|
+
height: 200,
|
|
710
|
+
measured: { width: 300, height: 200 },
|
|
711
|
+
},
|
|
712
|
+
];
|
|
713
|
+
|
|
714
|
+
// Default edges for the automation diagram
|
|
715
|
+
export const automationDefaultEdges = [
|
|
716
|
+
{
|
|
717
|
+
id: 'edge-start-to-api',
|
|
718
|
+
source: 'start-node',
|
|
719
|
+
target: 'api-call-node',
|
|
720
|
+
sourceHandle: 'right',
|
|
721
|
+
targetHandle: 'left',
|
|
722
|
+
data: {
|
|
723
|
+
label: '',
|
|
724
|
+
type: 'flow',
|
|
725
|
+
},
|
|
726
|
+
style: {
|
|
727
|
+
stroke: '#ffffff',
|
|
728
|
+
strokeWidth: 2,
|
|
729
|
+
},
|
|
730
|
+
markerEnd: {
|
|
731
|
+
type: MarkerType.ArrowClosed,
|
|
732
|
+
color: '#ffffff',
|
|
733
|
+
},
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
id: 'edge-api-to-navigation',
|
|
737
|
+
source: 'api-call-node',
|
|
738
|
+
target: 'navigation-node',
|
|
739
|
+
sourceHandle: 'right',
|
|
740
|
+
targetHandle: 'left',
|
|
741
|
+
data: {
|
|
742
|
+
label: '',
|
|
743
|
+
type: 'flow',
|
|
744
|
+
},
|
|
745
|
+
style: {
|
|
746
|
+
stroke: '#ffffff',
|
|
747
|
+
strokeWidth: 2,
|
|
748
|
+
},
|
|
749
|
+
markerEnd: {
|
|
750
|
+
type: MarkerType.ArrowClosed,
|
|
751
|
+
color: '#ffffff',
|
|
752
|
+
},
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
id: 'edge-navigation-to-formatting',
|
|
756
|
+
source: 'navigation-node',
|
|
757
|
+
target: 'data-formatting-node',
|
|
758
|
+
sourceHandle: 'right',
|
|
759
|
+
targetHandle: 'left',
|
|
760
|
+
data: {
|
|
761
|
+
label: '',
|
|
762
|
+
type: 'flow',
|
|
763
|
+
},
|
|
764
|
+
style: {
|
|
765
|
+
stroke: '#ffffff',
|
|
766
|
+
strokeWidth: 2,
|
|
767
|
+
},
|
|
768
|
+
markerEnd: {
|
|
769
|
+
type: MarkerType.ArrowClosed,
|
|
770
|
+
color: '#ffffff',
|
|
771
|
+
},
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
id: 'edge-formatting-to-sheets',
|
|
775
|
+
source: 'data-formatting-node',
|
|
776
|
+
target: 'google-sheets-node',
|
|
777
|
+
sourceHandle: 'right',
|
|
778
|
+
targetHandle: 'left',
|
|
779
|
+
data: {
|
|
780
|
+
label: '',
|
|
781
|
+
type: 'flow',
|
|
782
|
+
},
|
|
783
|
+
style: {
|
|
784
|
+
stroke: '#ffffff',
|
|
785
|
+
strokeWidth: 2,
|
|
786
|
+
},
|
|
787
|
+
markerEnd: {
|
|
788
|
+
type: MarkerType.ArrowClosed,
|
|
789
|
+
color: '#ffffff',
|
|
790
|
+
},
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
id: 'edge-sheets-to-end',
|
|
794
|
+
source: 'google-sheets-node',
|
|
795
|
+
target: 'end-node',
|
|
796
|
+
sourceHandle: 'right',
|
|
797
|
+
targetHandle: 'left',
|
|
798
|
+
data: {
|
|
799
|
+
label: '',
|
|
800
|
+
type: 'flow',
|
|
801
|
+
},
|
|
802
|
+
style: {
|
|
803
|
+
stroke: '#ffffff',
|
|
804
|
+
strokeWidth: 2,
|
|
805
|
+
},
|
|
806
|
+
markerEnd: {
|
|
807
|
+
type: MarkerType.ArrowClosed,
|
|
808
|
+
color: '#ffffff',
|
|
809
|
+
},
|
|
810
|
+
},
|
|
811
|
+
// =====================================
|
|
812
|
+
// Google Services Node Edges
|
|
813
|
+
// =====================================
|
|
814
|
+
{
|
|
815
|
+
id: 'edge-docs-to-gmail',
|
|
816
|
+
source: 'google-docs-node',
|
|
817
|
+
target: 'gmail-node',
|
|
818
|
+
sourceHandle: 'right',
|
|
819
|
+
targetHandle: 'left',
|
|
820
|
+
data: {
|
|
821
|
+
label: 'Send Report',
|
|
822
|
+
type: 'flow',
|
|
823
|
+
},
|
|
824
|
+
style: {
|
|
825
|
+
stroke: '#4285F4',
|
|
826
|
+
strokeWidth: 2,
|
|
827
|
+
},
|
|
828
|
+
markerEnd: {
|
|
829
|
+
type: MarkerType.ArrowClosed,
|
|
830
|
+
color: '#4285F4',
|
|
831
|
+
},
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
id: 'edge-gmail-to-meet',
|
|
835
|
+
source: 'gmail-node',
|
|
836
|
+
target: 'google-meet-node',
|
|
837
|
+
sourceHandle: 'right',
|
|
838
|
+
targetHandle: 'left',
|
|
839
|
+
data: {
|
|
840
|
+
label: 'Schedule Meeting',
|
|
841
|
+
type: 'flow',
|
|
842
|
+
},
|
|
843
|
+
style: {
|
|
844
|
+
stroke: '#EA4335',
|
|
845
|
+
strokeWidth: 2,
|
|
846
|
+
},
|
|
847
|
+
markerEnd: {
|
|
848
|
+
type: MarkerType.ArrowClosed,
|
|
849
|
+
color: '#EA4335',
|
|
850
|
+
},
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
id: 'edge-meet-to-slides',
|
|
854
|
+
source: 'google-meet-node',
|
|
855
|
+
target: 'google-slides-node',
|
|
856
|
+
sourceHandle: 'right',
|
|
857
|
+
targetHandle: 'left',
|
|
858
|
+
data: {
|
|
859
|
+
label: 'Create Presentation',
|
|
860
|
+
type: 'flow',
|
|
861
|
+
},
|
|
862
|
+
style: {
|
|
863
|
+
stroke: '#FBBC04',
|
|
864
|
+
strokeWidth: 2,
|
|
865
|
+
},
|
|
866
|
+
markerEnd: {
|
|
867
|
+
type: MarkerType.ArrowClosed,
|
|
868
|
+
color: '#FBBC04',
|
|
869
|
+
},
|
|
870
|
+
},
|
|
871
|
+
// =====================================
|
|
872
|
+
// Slack Node Edge
|
|
873
|
+
// =====================================
|
|
874
|
+
{
|
|
875
|
+
id: 'edge-slides-to-slack',
|
|
876
|
+
source: 'google-slides-node',
|
|
877
|
+
target: 'slack-node',
|
|
878
|
+
sourceHandle: 'right',
|
|
879
|
+
targetHandle: 'left',
|
|
880
|
+
data: {
|
|
881
|
+
label: 'Notify Team',
|
|
882
|
+
type: 'flow',
|
|
883
|
+
},
|
|
884
|
+
style: {
|
|
885
|
+
stroke: '#4A154B',
|
|
886
|
+
strokeWidth: 2,
|
|
887
|
+
},
|
|
888
|
+
markerEnd: {
|
|
889
|
+
type: MarkerType.ArrowClosed,
|
|
890
|
+
color: '#4A154B',
|
|
891
|
+
},
|
|
892
|
+
},
|
|
893
|
+
];
|