@pixelml/claw-linux-x64 2.0.0 → 3.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.
@@ -0,0 +1,2269 @@
1
+ # Solution Creation Process (Workflows & Agents)
2
+
3
+ This guide provides the complete process for creating AgenticFlow workflows and specialized AI agents from natural language requirements to production-ready solutions.
4
+
5
+ ## 🎯 The 7-Phase Creation Process
6
+
7
+ ### Phase 1: Health Check & Setup
8
+
9
+ **OPTIONAL - Only call API when necessary:**
10
+
11
+ ```javascript
12
+ agenticflow_health_check() // SKIP this unless you need to validate connection
13
+ ```
14
+
15
+ **When to call:**
16
+ - ✅ First time using the skill in a session (validate connection)
17
+ - ✅ User explicitly asks to check connection
18
+ - ✅ After errors to verify API is working
19
+ - ❌ **NOT needed** for every workflow - all node data is LOCAL
20
+
21
+ **Purpose (when called):**
22
+ - Verify API connectivity
23
+ - Check available features
24
+ - Confirm workspace access
25
+ - Validate MCP tools availability
26
+
27
+ **IMPORTANT:** All node type data (139 nodes) is available locally in:
28
+ - `references/official_node_types.json` - Complete node data
29
+ - `references/node_types.md` - Categorized reference
30
+ - `references/complete_node_types.md` - Full schemas
31
+
32
+ **Save API calls** - Use local files for node discovery!
33
+
34
+ ---
35
+
36
+ ### Phase 2: Discovery & Requirements Analysis
37
+
38
+ **Goal:** Understand what the user wants to automate and break it down into actionable components.
39
+
40
+ **Steps:**
41
+
42
+ 1. **Deep Thinking:**
43
+ - Analyze the user's natural language request
44
+ - Identify the core automation goal
45
+ - Break down into logical workflow steps
46
+ - Consider data sources and destinations
47
+
48
+ 2. **Clarifying Questions:**
49
+ - Ask follow-up questions if requirements are unclear
50
+ - Confirm assumptions about data formats
51
+ - Verify external service access
52
+ - Understand expected outputs
53
+
54
+ 3. **Node Discovery (USE LOCAL FILES FIRST):**
55
+ - **PRIMARY:** Load `references/node_types.md` - Browse 139 nodes by category
56
+ - **PRIMARY:** Check `references/examples/workflows/` - 78 real workflow patterns
57
+ - **PRIMARY:** Reference `guides/02_node_selection_strategy.md` - Node selection guide
58
+ - **FALLBACK:** Only use API if absolutely needed:
59
+ - `agenticflow_search_node_types({name: 'keyword'})` - Specific search
60
+ - `agenticflow_list_node_types({limit: 200})` - Need latest data
61
+ - **TIP:** Local files have ALL 139 nodes with complete details!
62
+
63
+ 4. **Service Identification:**
64
+ - List all external services mentioned (Gmail, Slack, Shopify, etc.)
65
+ - Determine if standard nodes or MCP integrations are needed
66
+ - Check for 2,500+ MCP integration options
67
+
68
+ **Example:**
69
+
70
+ ```
71
+ User: "I need to monitor competitor prices and update my team via Slack"
72
+
73
+ Discovery:
74
+ ✓ Data Source: Competitor websites (web scraping needed)
75
+ ✓ Processing: Price extraction and analysis (LLM + data extraction)
76
+ ✓ Destination: Slack notifications (MCP integration)
77
+ ✓ Frequency: Scheduled or manual trigger
78
+ ✓ Nodes needed: web_scraping, llm, mcp_run_action
79
+ ```
80
+
81
+ ---
82
+
83
+ ### Phase 3: MCP Integration Analysis
84
+
85
+ **When to use MCP:**
86
+ - User mentions external services (Gmail, Slack, HubSpot, etc.)
87
+ - Need CRM, communication, e-commerce, or productivity tools
88
+ - Standard nodes don't provide required functionality
89
+
90
+ **MCP Planning Process:**
91
+
92
+ 1. **Identify MCP Services:**
93
+ - CRM: HubSpot, Salesforce, Pipedrive
94
+ - Communication: Gmail, Slack, Teams, WhatsApp
95
+ - E-commerce: Shopify, WooCommerce, Stripe
96
+ - Productivity: Google Sheets, Notion, Airtable
97
+ - Marketing: Mailchimp, Facebook, LinkedIn
98
+ - And 2,500+ more!
99
+
100
+ 2. **Plan MCP Actions:**
101
+ - Action naming pattern: `SERVICE-ACTION-NAME` (all caps with hyphens)
102
+ - Examples:
103
+ - `GMAIL-SEND-EMAIL`
104
+ - `GOOGLE_SHEETS-APPEND-ROW`
105
+ - `SLACK-SEND-MESSAGE`
106
+ - `HUBSPOT-CREATE-CONTACT`
107
+
108
+ 3. **Design Instructions:**
109
+ - Write clear, specific instruction for AI to execute
110
+ - Include template variables from previous nodes
111
+ - Specify exact operations and formatting
112
+
113
+ 4. **Note Connection Requirements:**
114
+ - Document which MCP connections user needs
115
+ - Each service requires its own connection
116
+ - User sets up at agenticflow.ai/app/mcp
117
+
118
+ **MCP Node Structure:**
119
+ ```javascript
120
+ {
121
+ "name": "descriptive_action_name",
122
+ "title": "Descriptive Action Title",
123
+ "node_type_name": "mcp_run_action",
124
+ "input_config": {
125
+ "action": "SERVICE-ACTION-NAME",
126
+ "input_params": {
127
+ "instruction": "Detailed instruction with {{template_variables}}"
128
+ }
129
+ },
130
+ "output_mapping": {},
131
+ "connection": "{{__app_connections__['connection-uuid']}}"
132
+ }
133
+ ```
134
+
135
+ ---
136
+
137
+ ### Phase 4: Configuration Planning
138
+
139
+ **Goal:** Design the complete workflow architecture with proper data flow.
140
+
141
+ **Steps:**
142
+
143
+ 1. **Node Selection:**
144
+ - Choose appropriate node types for each step
145
+ - Reference `references/node_types.md` for categories
146
+ - Check `references/complete_node_types.md` for field details
147
+
148
+ 2. **Data Flow Design:**
149
+ - Map how data flows between nodes
150
+ - Use template variables: `{{node_name.field}}`
151
+ - Common output fields:
152
+ - LLM nodes: `.content`
153
+ - Perplexity/search: `.response`
154
+ - Web scraping: `.scraped_content`
155
+ - MCP actions: `.output`
156
+ - Structured extraction: `.extracted_data`
157
+
158
+ 3. **Input Schema Design:**
159
+ - Define workflow input parameters
160
+ - Add proper UI metadata for user-friendly forms
161
+ - Include descriptions and placeholders
162
+
163
+ 4. **Execution Order:**
164
+ - Plan sequential vs parallel execution
165
+ - Use `prevNodeName` for dependencies
166
+ - Optimize for performance
167
+
168
+ **Visual Representation:**
169
+ Always show the user a workflow diagram like:
170
+ ```
171
+ User Input → Web Scraping → AI Analysis → External Service → Output
172
+ ```
173
+
174
+ ---
175
+
176
+ ### Phase 5: Pre-Building & Validation
177
+
178
+ **Goal:** Structure the complete workflow before creation.
179
+
180
+ **Components to prepare:**
181
+
182
+ 1. **Workflow Metadata:**
183
+ ```javascript
184
+ {
185
+ "name": "Clear Workflow Name",
186
+ "description": "What this workflow does and why"
187
+ }
188
+ ```
189
+
190
+ 2. **Input Schema:**
191
+ ```javascript
192
+ {
193
+ "input_schema": {
194
+ "type": "object",
195
+ "title": "User inputs",
196
+ "required": ["essential_field"],
197
+ "properties": {
198
+ "field_name": {
199
+ "type": "string",
200
+ "title": "Display Label",
201
+ "description": "Help text for users",
202
+ "ui_metadata": {
203
+ "type": "short_text", // or long_text, dropdown, multi_select
204
+ "order": 0,
205
+ "placeholder": "Example value",
206
+ "value": "default_value"
207
+ }
208
+ }
209
+ }
210
+ }
211
+ }
212
+ ```
213
+
214
+ 3. **Nodes Array:**
215
+ - Each node with complete configuration
216
+ - Proper field requirements met
217
+ - Template variables correctly referenced
218
+
219
+ 4. **Output Mapping:**
220
+ ```javascript
221
+ {
222
+ "output_mapping": {
223
+ "result": "{{final_node.content}}",
224
+ "metadata": "{{extraction_node.data}}"
225
+ }
226
+ }
227
+ ```
228
+
229
+ 5. **Connection Documentation:**
230
+ - List all MCP connections needed
231
+ - Provide setup instructions
232
+ - Note connection categories
233
+
234
+ ---
235
+
236
+ ### Phase 6: Building the Workflow
237
+
238
+ **Goal:** Create the actual workflow using AgenticFlow MCP tools.
239
+
240
+ **Build Steps:**
241
+
242
+ 1. **Prepare Complete JSON:**
243
+ - Validate all required fields
244
+ - Check node type names are exact
245
+ - Ensure proper data types
246
+
247
+ 2. **REQUIRED: Validate First:**
248
+ ```javascript
249
+ // ALWAYS validate before creating
250
+ const validationResult = agenticflow_validate_workflow({
251
+ name: "Workflow Name",
252
+ description: "Workflow description",
253
+ nodes: [...],
254
+ input_schema: {...},
255
+ output_mapping: {...}
256
+ })
257
+ ```
258
+
259
+ **Check Validation Results:**
260
+ - ✅ If validation passes → Proceed to creation
261
+ - ❌ If validation fails → Fix errors and validate again
262
+ - ⚠️ If warnings → Review and decide whether to fix
263
+
264
+ **Never skip validation!** This prevents creating broken workflows that clutter the user's workspace.
265
+
266
+ 3. **Node Structure Requirements:**
267
+ ```javascript
268
+ {
269
+ "name": "node_name", // Required: string
270
+ "title": "Display Title", // Required: string (optional for some nodes)
271
+ "description": "What it does", // Required: string (optional for some nodes)
272
+ "node_type_name": "node_type", // Required: exact from API
273
+ "input_config": {}, // Required: object (can be empty {})
274
+ "output_mapping": {}, // Required: object (use {} not null)
275
+ "connection": "" // Required: string (use "" not null)
276
+ }
277
+ ```
278
+
279
+ 4. **Critical Fixes:**
280
+ - Never use `null` for `output_mapping` → use `{}`
281
+ - Never use `null` for `connection` → use `""`
282
+ - Always include all required fields
283
+ - Use exact node type names
284
+
285
+ 5. **Only After Validation Passes - Create Workflow:**
286
+ ```javascript
287
+ // Only call this after agenticflow_validate_workflow() succeeds
288
+ agenticflow_create_workflow({
289
+ name: "Workflow Name",
290
+ description: "Workflow description",
291
+ nodes: [...],
292
+ input_schema: {...},
293
+ output_mapping: {...}
294
+ })
295
+ ```
296
+
297
+ **CRITICAL:** Never create without validating first!
298
+
299
+ 6. **Provide Direct Link:**
300
+ ```
301
+ https://agenticflow.ai/app/workspaces/{workspace_id}/workflows/{workflow_id}/build
302
+ ```
303
+
304
+ ---
305
+
306
+ ### Phase 7: Post-Creation Documentation
307
+
308
+ **Goal:** Provide user with complete setup and usage information.
309
+
310
+ **Note:** Validation is done in Phase 6 BEFORE creation, not after!
311
+
312
+ **Documentation Steps:**
313
+
314
+ 1. **Workflow Summary:**
315
+ - Confirm workflow was created successfully
316
+ - Provide direct link to workflow
317
+ - Explain what the workflow does
318
+ - Share validation results (already completed)
319
+
320
+ 2. **Validation Confirmation (Already Done):**
321
+ - Workflow structure validated ✓
322
+ - All fields properly configured ✓
323
+ - Data flow verified ✓
324
+ - Template variables correct ✓
325
+
326
+ 3. **MCP Connection Check:**
327
+ - All MCP actions have connections specified
328
+ - Connection UUIDs format correct
329
+ - Services properly identified
330
+
331
+ **Documentation to Provide:**
332
+
333
+ 1. **Workflow Summary:**
334
+ - What the workflow does
335
+ - Input requirements
336
+ - Expected outputs
337
+
338
+ 2. **MCP Setup Instructions:**
339
+ ```markdown
340
+ ## Required MCP Connections
341
+
342
+ 1. **Gmail Connection**
343
+ - Go to agenticflow.ai/app/mcp
344
+ - Add Gmail provider
345
+ - Authorize your Google account
346
+ - Copy connection ID to workflow
347
+
348
+ 2. **Slack Connection**
349
+ - Add Slack provider
350
+ - Connect workspace
351
+ - Select channels for access
352
+ ```
353
+
354
+ 3. **Usage Guide:**
355
+ - How to run the workflow
356
+ - What inputs to provide
357
+ - How to interpret outputs
358
+
359
+ 4. **Limitations & Notes:**
360
+ - Rate limits
361
+ - Cost estimates
362
+ - Best practices
363
+ - Error handling
364
+
365
+ ---
366
+
367
+ ## 🎨 Workflow Design Patterns
368
+
369
+ ### Pattern 1: Data Collection → AI Processing → Distribution
370
+
371
+ ```
372
+ Web Scraping → LLM Analysis → Multi-Channel Output
373
+ ↓ ↓ ↓
374
+ Research Extract Insights Email + Slack + Sheets
375
+ ```
376
+
377
+ ### Pattern 2: External Service Integration
378
+
379
+ ```
380
+ MCP Data Source → AI Processing → MCP Action
381
+ ↓ ↓ ↓
382
+ HubSpot CRM Analyze & Segment Send Campaigns
383
+ ```
384
+
385
+ ### Pattern 3: Parallel Processing
386
+
387
+ ```
388
+ ┌─ Research Source 1 ─┐
389
+ Input → Split → ├─ Research Source 2 ─┤ → Combine → Output
390
+ └─ Research Source 3 ─┘
391
+ ```
392
+
393
+ ---
394
+
395
+ ## 📋 Quick Reference Checklist
396
+
397
+ **Before Building:**
398
+ - [ ] Health check completed
399
+ - [ ] Requirements fully understood
400
+ - [ ] Node types identified
401
+ - [ ] MCP services planned
402
+ - [ ] Data flow mapped
403
+ - [ ] Input schema designed
404
+
405
+ **During Building:**
406
+ - [ ] All required fields included
407
+ - [ ] Template variables correct
408
+ - [ ] Connection fields proper format
409
+ - [ ] No null values for objects
410
+ - [ ] Node names unique and descriptive
411
+
412
+ **After Building:**
413
+ - [ ] Workflow created successfully
414
+ - [ ] Direct link provided
415
+ - [ ] MCP setup documented
416
+ - [ ] Usage instructions clear
417
+ - [ ] Limitations noted
418
+
419
+ ---
420
+
421
+ ## 💡 Pro Tips
422
+
423
+ 1. **Think Hybrid:** Always consider both standard nodes AND MCP integrations
424
+ 2. **Start Simple:** Build core functionality first, then add enhancements
425
+ 3. **Use Examples:** Reference `references/examples/workflows/` for patterns
426
+ 4. **Validate Early:** Check field requirements before building
427
+ 5. **Document Well:** Clear MCP setup instructions prevent user confusion
428
+
429
+ ---
430
+
431
+ **Next Steps:**
432
+ - Review `references/node_types.md` for node selection
433
+ - Check `references/workflow_guide.md` for patterns
434
+ - See `references/examples/workflows/` for real examples
435
+ # Node Selection Strategy Guide
436
+
437
+ Complete guide for selecting the right node types for any workflow requirement.
438
+
439
+ ## 🎯 Selection Philosophy
440
+
441
+ **Key Principle:** Choose the simplest, most appropriate node that fulfills the requirement while considering:
442
+ - Connection requirements (some nodes need external connections)
443
+ - Cost efficiency (credits per execution)
444
+ - Feature capabilities
445
+ - Output format compatibility with downstream nodes
446
+
447
+ ---
448
+
449
+ ## 📊 Node Categories & When to Use
450
+
451
+ ### 1. AI & LLM Nodes (20 nodes)
452
+
453
+ **Use for:** Intelligent processing, text generation, analysis, decision-making
454
+
455
+ #### Primary Choices
456
+
457
+ **`llm` - General Purpose AI** ⭐ MOST VERSATILE
458
+ - **Best for:** Any AI processing task
459
+ - **Connection:** None required
460
+ - **Models:** DeepSeek V3, Claude 3.5 Sonnet, GPT-4o-mini, GPT-4o
461
+ - **Cost:** Varies by model
462
+ - **Output field:** `.content`
463
+ - **Use when:** You need flexible AI processing without service lock-in
464
+
465
+ ```javascript
466
+ {
467
+ "node_type_name": "llm",
468
+ "input_config": {
469
+ "model": "DeepSeek V3", // Cost-effective
470
+ "temperature": 0.3,
471
+ "max_tokens": 4000,
472
+ "human_message": "Process this: {{input_data}}",
473
+ "system_message": "You are an expert..."
474
+ }
475
+ }
476
+ ```
477
+
478
+ **`claude_ask` - Claude-Specific**
479
+ - **Best for:** Tasks requiring Claude's specific capabilities
480
+ - **Connection:** Claude Connection required
481
+ - **Cost:** 4 credits + PML $0.01
482
+ - **Output field:** `.answer`
483
+ - **Use when:** User specifically wants Claude or needs citations
484
+
485
+ **`openai_ask_chat_gpt` - ChatGPT-Specific**
486
+ - **Best for:** ChatGPT-specific features
487
+ - **Connection:** OpenAI Connection required
488
+ - **Output field:** `.response`
489
+ - **Use when:** User prefers OpenAI ecosystem
490
+
491
+ **`openai_ask_assistant` - GPT Assistants**
492
+ - **Best for:** Using pre-configured GPT assistants
493
+ - **Connection:** OpenAI Connection required
494
+ - **Use when:** Leveraging existing assistant configurations
495
+
496
+ #### Model Selection Guide
497
+
498
+ **DeepSeek V3:**
499
+ - Best for: Simple tasks, cost-effective processing
500
+ - Speed: Fast
501
+ - Quality: Good for straightforward tasks
502
+
503
+ **Claude 3.5 Sonnet:**
504
+ - Best for: Complex analysis, nuanced understanding
505
+ - Speed: Medium
506
+ - Quality: Excellent for complex reasoning
507
+
508
+ **GPT-4o-mini:**
509
+ - Best for: General tasks, good balance
510
+ - Speed: Fast
511
+ - Quality: Very good for most use cases
512
+
513
+ **GPT-4o:**
514
+ - Best for: Most complex reasoning tasks
515
+ - Speed: Medium
516
+ - Quality: Best available
517
+
518
+ ---
519
+
520
+ ### 2. Web Research & Search Nodes (6 nodes)
521
+
522
+ **Use for:** Gathering information from the internet
523
+
524
+ **`perplexity_search` - AI-Powered Research** ⭐ RECOMMENDED
525
+ - **Best for:** Comprehensive research with citations
526
+ - **Connection:** Perplexity required
527
+ - **Output:** Structured results with sources
528
+ - **Output field:** `.response`
529
+ - **Use when:** Need accurate, cited research
530
+
531
+ **`google_search` - Google Results**
532
+ - **Best for:** Simple web searches
533
+ - **Connection:** PixelML required
534
+ - **Output:** Organic and paid results
535
+ - **Use when:** Need Google-specific results
536
+
537
+ **`tavily_search` - Fast Web Search**
538
+ - **Best for:** Quick comprehensive searches
539
+ - **Output:** Results with direct answers
540
+ - **Use when:** Speed is priority
541
+
542
+ **`research_deep_research` - In-Depth Analysis**
543
+ - **Best for:** Thorough research projects
544
+ - **Use when:** Need comprehensive analysis
545
+
546
+ ---
547
+
548
+ ### 3. Web Scraping Nodes (9 nodes)
549
+
550
+ **Use for:** Extracting data from specific websites
551
+
552
+ **`web_scraping` - Simple Scraping** ⭐ START HERE
553
+ - **Best for:** Basic content extraction
554
+ - **Connection:** None required
555
+ - **Output field:** `.scraped_content`
556
+ - **Max tokens:** Configurable
557
+ - **Use when:** Simple page content needed
558
+
559
+ ```javascript
560
+ {
561
+ "node_type_name": "web_scraping",
562
+ "input_config": {
563
+ "web_url": "{{target_url}}",
564
+ "max_tokens": 10000,
565
+ "include_images": false,
566
+ "include_links": false
567
+ }
568
+ }
569
+ ```
570
+
571
+ **`firecrawl_scrape` - Advanced Scraping**
572
+ - **Best for:** JavaScript-heavy sites, complex pages
573
+ - **Features:** JS rendering, screenshots
574
+ - **Use when:** Simple scraping fails
575
+
576
+ **`firecrawl_crawl` - Multi-Page Scraping**
577
+ - **Best for:** Scraping entire website sections
578
+ - **Use when:** Need multiple related pages
579
+
580
+ **`linkedin_scrape_profile` / `linkedin_scrape_company`**
581
+ - **Best for:** LinkedIn data extraction
582
+ - **Use when:** Specifically targeting LinkedIn
583
+
584
+ **`web_scraping_apify` - Advanced Features**
585
+ - **Connection:** PixelML required
586
+ - **Use when:** Need advanced scraping capabilities
587
+
588
+ ---
589
+
590
+ ### 4. Data Extraction & Processing Nodes (4 nodes)
591
+
592
+ **Use for:** Converting unstructured data to structured formats
593
+
594
+ **`openai_extract_structured_data` - JSON Extraction** ⭐ RECOMMENDED
595
+ - **Best for:** Reliable JSON schema extraction
596
+ - **Connection:** OpenAI recommended
597
+ - **Provides:** Guaranteed JSON structure
598
+ - **Use when:** Need structured data output
599
+
600
+ ```javascript
601
+ {
602
+ "node_type_name": "openai_extract_structured_data",
603
+ "input_config": {
604
+ "model": "gpt-4o-mini",
605
+ "input_text": "{{unstructured_text}}",
606
+ "json_schema": {
607
+ "type": "object",
608
+ "properties": {
609
+ "name": {"type": "string"},
610
+ "email": {"type": "string"},
611
+ "price": {"type": "number"}
612
+ },
613
+ "required": ["name", "email"]
614
+ }
615
+ }
616
+ }
617
+ ```
618
+
619
+ **`claude_extract_structured_data` - Alternative**
620
+ - **Best for:** Claude-based extraction
621
+ - **Use when:** Prefer Claude or OpenAI unavailable
622
+
623
+ **`string_to_json` - Simple Conversion**
624
+ - **Best for:** Converting string representations to JSON
625
+ - **Use when:** Data already in JSON-like format
626
+
627
+ **`optical_character_recognition` - OCR**
628
+ - **Best for:** Extracting text from images
629
+ - **Use when:** Processing scanned documents, images with text
630
+
631
+ ---
632
+
633
+ ### 5. Image Generation & Processing Nodes (13 nodes)
634
+
635
+ **Use for:** Creating and manipulating images
636
+
637
+ **`generate_image` - General Image Creation** ⭐ START HERE
638
+ - **Best for:** Creating images from prompts
639
+ - **Models:** DALL-E 3, Midjourney, Stable Diffusion
640
+ - **Output field:** `.image_url`
641
+
642
+ ```javascript
643
+ {
644
+ "node_type_name": "generate_image",
645
+ "input_config": {
646
+ "prompt": "{{image_description}}",
647
+ "model": "dall-e-3",
648
+ "size": "1024x1024",
649
+ "quality": "standard"
650
+ }
651
+ }
652
+ ```
653
+
654
+ **`generate_image_v2` - Advanced Generation**
655
+ - **Best for:** More control over image parameters
656
+ - **Use when:** Need specific models or settings
657
+
658
+ **`describe_image` - Image Analysis**
659
+ - **Best for:** Understanding image content
660
+ - **Output:** Detailed descriptions, objects, text
661
+ - **Use when:** Need to analyze existing images
662
+
663
+ **`pml_edit_image` - Image Editing**
664
+ - **Best for:** Modifying existing images
665
+ - **Use when:** Need to edit rather than create
666
+
667
+ **`enhance_image_v2` - Image Enhancement**
668
+ - **Best for:** Upscaling, improving quality
669
+ - **Use when:** Need to improve image quality
670
+
671
+ ---
672
+
673
+ ### 6. Video Processing Nodes (14 nodes)
674
+
675
+ **Use for:** Creating and editing video content
676
+
677
+ **`text_to_video` - Text to Video**
678
+ - **Best for:** Creating videos from text prompts
679
+ - **Use when:** Need video content from descriptions
680
+
681
+ **`image_to_video` - Image Animation**
682
+ - **Best for:** Animating static images
683
+ - **Use when:** Have images to animate
684
+
685
+ **`render_video` - Video Rendering**
686
+ - **Best for:** Creating videos from templates
687
+ - **Use when:** Need structured video creation
688
+
689
+ **`google_gen_ai_generate_veo_video` - Google Veo**
690
+ - **Best for:** Advanced video generation
691
+ - **Connection:** Google Gen AI required
692
+
693
+ ---
694
+
695
+ ### 7. Audio & Speech Nodes (5 nodes)
696
+
697
+ **Use for:** Voice synthesis and transcription
698
+
699
+ **`text_to_speech` - TTS** ⭐ RECOMMENDED
700
+ - **Best for:** Converting text to speech
701
+ - **Use when:** Need voice output
702
+
703
+ **`speech_to_text` - Transcription**
704
+ - **Best for:** Converting audio to text
705
+ - **Use when:** Processing voice input
706
+
707
+ **`openai_text_to_speech` - OpenAI TTS**
708
+ - **Connection:** OpenAI required
709
+ - **Best for:** High-quality OpenAI voices
710
+
711
+ **`text_to_music` - Music Generation**
712
+ - **Best for:** Creating background music
713
+ - **Use when:** Need audio content
714
+
715
+ ---
716
+
717
+ ### 8. Document Processing Nodes (2 nodes)
718
+
719
+ **Use for:** Working with documents and text formats
720
+
721
+ **`url_to_markdown` - Web to Markdown**
722
+ - **Best for:** Converting web pages to clean markdown
723
+ - **Use when:** Need formatted text extraction
724
+
725
+ ---
726
+
727
+ ### 9. Email & Communication Nodes (5 nodes)
728
+
729
+ **Use for:** Sending emails (for advanced needs, use MCP)
730
+
731
+ **`send_email` - Basic Email**
732
+ - **Best for:** Simple email sending
733
+ - **Use when:** Basic email needs
734
+
735
+ **For advanced email:**
736
+ - Use MCP: `GMAIL-SEND-EMAIL`, `SENDGRID-SEND-BULK-EMAIL`
737
+
738
+ ---
739
+
740
+ ### 10. File Storage & Management Nodes (12 nodes)
741
+
742
+ **Use for:** File operations and storage
743
+
744
+ **`drive_*` nodes - OneDrive Integration**
745
+ - `drive_create_folder`
746
+ - `drive_upload_file`
747
+ - `drive_get_item`
748
+ - `drive_list_items`
749
+ - `drive_delete_item`
750
+
751
+ **`export_data_to_file` - Export Data**
752
+ - **Best for:** Saving workflow results to files
753
+ - **Formats:** JSON, CSV, TXT, XML
754
+
755
+ ---
756
+
757
+ ### 11. API & Integration Nodes (3 nodes)
758
+
759
+ **Use for:** Connecting to external services
760
+
761
+ **`api_call` - Custom HTTP Requests** ⭐ VERSATILE
762
+ - **Best for:** Any REST API integration
763
+ - **Methods:** GET, POST, PUT, DELETE, PATCH
764
+ - **Use when:** Need custom API integration
765
+
766
+ ```javascript
767
+ {
768
+ "node_type_name": "api_call",
769
+ "input_config": {
770
+ "url": "{{api_endpoint}}",
771
+ "method": "GET",
772
+ "headers": {
773
+ "Content-Type": "application/json",
774
+ "Authorization": "Bearer {{api_token}}"
775
+ },
776
+ "body": {},
777
+ "response_type": "json"
778
+ }
779
+ }
780
+ ```
781
+
782
+ **`mcp_run_action` - MCP Integration** ⭐ POWERFUL
783
+ - **Best for:** 2,500+ service integrations
784
+ - **Use when:** Integrating Gmail, Slack, HubSpot, Shopify, etc.
785
+ - **See:** `references/mcp_integrations.md`
786
+
787
+ ```javascript
788
+ {
789
+ "node_type_name": "mcp_run_action",
790
+ "input_config": {
791
+ "action": "GMAIL-SEND-EMAIL",
792
+ "input_params": {
793
+ "instruction": "Send email to {{recipient}} with content: {{content}}"
794
+ }
795
+ },
796
+ "connection": "{{__app_connections__['gmail-connection-id']}}"
797
+ }
798
+ ```
799
+
800
+ ---
801
+
802
+ ## 🔄 Decision Flow Charts
803
+
804
+ ### Choosing AI/LLM Nodes
805
+
806
+ ```
807
+ Need AI processing?
808
+
809
+ Do you need a specific provider?
810
+ ├─ Yes: Use provider-specific node (claude_ask, openai_ask_chat_gpt)
811
+ └─ No: Use llm node (most flexible)
812
+
813
+ Choose model based on task:
814
+ ├─ Simple/Cost-effective: DeepSeek V3
815
+ ├─ Balanced: GPT-4o-mini
816
+ ├─ Complex reasoning: Claude 3.5 Sonnet
817
+ └─ Most advanced: GPT-4o
818
+ ```
819
+
820
+ ### Choosing Research Nodes
821
+
822
+ ```
823
+ Need web information?
824
+
825
+ What type?
826
+ ├─ Specific website content: web_scraping
827
+ ├─ General research: perplexity_search
828
+ ├─ Google results: google_search
829
+ └─ Fast comprehensive: tavily_search
830
+ ```
831
+
832
+ ### Choosing Integration Approach
833
+
834
+ ```
835
+ Need external service?
836
+
837
+ Is it a standard service (Gmail, Slack, HubSpot, etc.)?
838
+ ├─ Yes: Use mcp_run_action
839
+ └─ No: Does it have a REST API?
840
+ ├─ Yes: Use api_call
841
+ └─ No: May not be possible
842
+ ```
843
+
844
+ ---
845
+
846
+ ## 💡 Pro Tips
847
+
848
+ ### Connection vs No Connection
849
+
850
+ **No Connection Required (Easier):**
851
+ - `llm` (most AI tasks)
852
+ - `web_scraping` (basic scraping)
853
+ - `string_to_json`
854
+ - Most utility nodes
855
+
856
+ **Connection Required (More Setup):**
857
+ - `claude_ask`, `openai_ask_chat_gpt` (provider-specific)
858
+ - `perplexity_search` (Perplexity)
859
+ - `mcp_run_action` (each service)
860
+ - Provider-specific nodes
861
+
862
+ **Recommendation:** Start with no-connection nodes when possible
863
+
864
+ ### Cost Considerations
865
+
866
+ **Low Cost:**
867
+ - `llm` with DeepSeek V3
868
+ - `web_scraping`
869
+ - Basic utility nodes
870
+
871
+ **Medium Cost:**
872
+ - `llm` with GPT-4o-mini
873
+ - Search nodes
874
+ - Basic AI nodes
875
+
876
+ **Higher Cost:**
877
+ - `llm` with Claude 3.5 Sonnet or GPT-4o
878
+ - Advanced AI processing
879
+ - Image/video generation
880
+
881
+ ### Output Field Reference
882
+
883
+ | Node Type | Output Field |
884
+ |-----------|--------------|
885
+ | `llm` | `.content` |
886
+ | `claude_ask` | `.answer` |
887
+ | `openai_ask_chat_gpt` | `.response` |
888
+ | `perplexity_search` | `.response` |
889
+ | `web_scraping` | `.scraped_content` |
890
+ | `openai_extract_structured_data` | `.extracted_data` |
891
+ | `generate_image` | `.image_url` |
892
+ | `mcp_run_action` | `.output` |
893
+ | `api_call` | `.response` |
894
+
895
+ ---
896
+
897
+ ## 📚 Quick Reference by Use Case
898
+
899
+ **Content Creation:**
900
+ - Text: `llm`
901
+ - Images: `generate_image`
902
+ - Videos: `text_to_video`
903
+ - Audio: `text_to_speech`
904
+
905
+ **Data Collection:**
906
+ - Web research: `perplexity_search`
907
+ - Specific sites: `web_scraping`
908
+ - APIs: `api_call` or `mcp_run_action`
909
+
910
+ **Data Processing:**
911
+ - Analysis: `llm`
912
+ - Extraction: `openai_extract_structured_data`
913
+ - Transformation: `llm` with specific prompts
914
+
915
+ **External Services:**
916
+ - Standard services: `mcp_run_action`
917
+ - Custom APIs: `api_call`
918
+ - Email: `send_email` or MCP
919
+
920
+ **File Operations:**
921
+ - Export: `export_data_to_file`
922
+ - Storage: `drive_*` nodes
923
+
924
+ ---
925
+
926
+ **Next Steps:**
927
+ - Check `references/node_types.md` for complete node list
928
+ - See `references/complete_node_types.md` for detailed schemas
929
+ - Review `references/examples/workflows/` for real usage
930
+ # MCP Integration Guide
931
+
932
+ Complete guide for integrating 2,500+ external services into AgenticFlow workflows using Model Context Protocol (MCP).
933
+
934
+ ## 🌐 What is MCP?
935
+
936
+ **Model Context Protocol (MCP)** enables AgenticFlow to connect to virtually any external service through AI-powered actions. Instead of configuring complex APIs, you write natural language instructions that the AI executes.
937
+
938
+ **Key Benefits:**
939
+ - Access 2,500+ services without coding
940
+ - AI interprets your instructions
941
+ - Handles authentication automatically
942
+ - Simplifies complex API interactions
943
+
944
+ ---
945
+
946
+ ## 🎯 When to Use MCP
947
+
948
+ ### Use MCP Integration When:
949
+
950
+ ✅ User mentions external services:
951
+ - CRM (HubSpot, Salesforce, Pipedrive)
952
+ - Communication (Gmail, Slack, Teams, WhatsApp)
953
+ - E-commerce (Shopify, WooCommerce, Stripe)
954
+ - Productivity (Google Sheets, Notion, Airtable)
955
+ - Marketing (Mailchimp, Facebook, LinkedIn)
956
+ - Project Management (Asana, Trello, Jira)
957
+
958
+ ✅ Standard nodes don't provide the functionality
959
+
960
+ ✅ Need advanced features from specific platforms
961
+
962
+ ✅ Want to chain multiple service operations
963
+
964
+ ### Don't Use MCP When:
965
+
966
+ ❌ Simple operations available in standard nodes
967
+ ❌ No external service integration needed
968
+ ❌ User doesn't have access to required service
969
+ ❌ Cost-sensitive and standard nodes work
970
+
971
+ ---
972
+
973
+ ## 📋 MCP Action Structure
974
+
975
+ ### Basic MCP Node Format
976
+
977
+ ```javascript
978
+ {
979
+ "name": "descriptive_action_name",
980
+ "title": "Human-Readable Action Title",
981
+ "description": "What this action does",
982
+ "node_type_name": "mcp_run_action",
983
+ "input_config": {
984
+ "action": "SERVICE-ACTION-NAME",
985
+ "input_params": {
986
+ "instruction": "Natural language instruction with {{template_variables}}"
987
+ }
988
+ },
989
+ "output_mapping": {},
990
+ "connection": "{{__app_connections__['connection-uuid']}}"
991
+ }
992
+ ```
993
+
994
+ ### Key Components
995
+
996
+ **1. Action Name**
997
+ - Pattern: `SERVICE-ACTION-NAME` (all uppercase with hyphens)
998
+ - Examples:
999
+ - `GMAIL-SEND-EMAIL`
1000
+ - `GOOGLE_SHEETS-APPEND-ROW`
1001
+ - `HUBSPOT-CREATE-CONTACT`
1002
+ - `SLACK-SEND-MESSAGE`
1003
+
1004
+ **2. Instruction**
1005
+ - Natural language describing what to do
1006
+ - Include template variables for dynamic data
1007
+ - Be specific about format and requirements
1008
+ - Example: `"Send email to {{recipient}} with subject '{{subject}}' and body: {{email_content}}"`
1009
+
1010
+ **3. Connection**
1011
+ - Reference format: `{{__app_connections__['connection-uuid']}}`
1012
+ - Each service needs its own connection
1013
+ - User sets up at agenticflow.ai/app/mcp
1014
+
1015
+ ---
1016
+
1017
+ ## 🔧 Popular MCP Actions by Category
1018
+
1019
+ ### CRM & Sales
1020
+
1021
+ **HubSpot**
1022
+ ```javascript
1023
+ // Create Contact
1024
+ {
1025
+ "action": "HUBSPOT-CREATE-CONTACT",
1026
+ "input_params": {
1027
+ "instruction": "Create contact with email {{email}}, name {{name}}, and company {{company}}"
1028
+ }
1029
+ }
1030
+
1031
+ // Update Deal
1032
+ {
1033
+ "action": "HUBSPOT-UPDATE-DEAL",
1034
+ "input_params": {
1035
+ "instruction": "Update deal {{deal_id}} with amount {{amount}} and stage {{stage}}"
1036
+ }
1037
+ }
1038
+
1039
+ // Get Contacts
1040
+ {
1041
+ "action": "HUBSPOT-GET-CONTACTS",
1042
+ "input_params": {
1043
+ "instruction": "Get all contacts created in the last 7 days with engagement scores"
1044
+ }
1045
+ }
1046
+ ```
1047
+
1048
+ **Salesforce**
1049
+ ```javascript
1050
+ // Create Lead
1051
+ {
1052
+ "action": "SALESFORCE-CREATE-LEAD",
1053
+ "input_params": {
1054
+ "instruction": "Create lead from {{lead_data}} with company {{company_name}}"
1055
+ }
1056
+ }
1057
+
1058
+ // Update Opportunity
1059
+ {
1060
+ "action": "SALESFORCE-UPDATE-OPPORTUNITY",
1061
+ "input_params": {
1062
+ "instruction": "Update opportunity {{opp_id}} status to {{status}}"
1063
+ }
1064
+ }
1065
+ ```
1066
+
1067
+ **Pipedrive**
1068
+ ```javascript
1069
+ // Add Person
1070
+ {
1071
+ "action": "PIPEDRIVE-ADD-PERSON",
1072
+ "input_params": {
1073
+ "instruction": "Add person with name {{name}}, email {{email}}, and phone {{phone}}"
1074
+ }
1075
+ }
1076
+
1077
+ // Create Deal
1078
+ {
1079
+ "action": "PIPEDRIVE-CREATE-DEAL",
1080
+ "input_params": {
1081
+ "instruction": "Create deal for {{person}} with value {{value}} in stage {{stage}}"
1082
+ }
1083
+ }
1084
+ ```
1085
+
1086
+ ---
1087
+
1088
+ ### Communication
1089
+
1090
+ **Gmail**
1091
+ ```javascript
1092
+ // Send Email
1093
+ {
1094
+ "action": "GMAIL-SEND-EMAIL",
1095
+ "input_params": {
1096
+ "instruction": "Send email to {{recipient}} with subject '{{subject}}' and body: {{email_content}}"
1097
+ }
1098
+ }
1099
+
1100
+ // Search Emails
1101
+ {
1102
+ "action": "GMAIL-SEARCH-EMAILS",
1103
+ "input_params": {
1104
+ "instruction": "Search for emails from {{sender}} in the last 7 days about {{topic}}"
1105
+ }
1106
+ }
1107
+
1108
+ // Create Draft
1109
+ {
1110
+ "action": "GMAIL-CREATE-DRAFT",
1111
+ "input_params": {
1112
+ "instruction": "Create draft email to {{recipient}} with content: {{draft_content}}"
1113
+ }
1114
+ }
1115
+ ```
1116
+
1117
+ **Slack**
1118
+ ```javascript
1119
+ // Send Message
1120
+ {
1121
+ "action": "SLACK-SEND-MESSAGE",
1122
+ "input_params": {
1123
+ "instruction": "Send message to {{channel}} with text: {{message_text}}"
1124
+ }
1125
+ }
1126
+
1127
+ // Create Channel
1128
+ {
1129
+ "action": "SLACK-CREATE-CHANNEL",
1130
+ "input_params": {
1131
+ "instruction": "Create channel named {{channel_name}} with description {{description}}"
1132
+ }
1133
+ }
1134
+
1135
+ // Upload File
1136
+ {
1137
+ "action": "SLACK-UPLOAD-FILE",
1138
+ "input_params": {
1139
+ "instruction": "Upload file {{file_url}} to channel {{channel}} with comment {{comment}}"
1140
+ }
1141
+ }
1142
+ ```
1143
+
1144
+ **Microsoft Teams**
1145
+ ```javascript
1146
+ // Create Meeting
1147
+ {
1148
+ "action": "TEAMS-CREATE-MEETING",
1149
+ "input_params": {
1150
+ "instruction": "Create meeting on {{date}} at {{time}} with attendees {{attendees}}"
1151
+ }
1152
+ }
1153
+
1154
+ // Send Message
1155
+ {
1156
+ "action": "TEAMS-SEND-MESSAGE",
1157
+ "input_params": {
1158
+ "instruction": "Send message to {{team_channel}} with content: {{message}}"
1159
+ }
1160
+ }
1161
+ ```
1162
+
1163
+ ---
1164
+
1165
+ ### E-commerce
1166
+
1167
+ **Shopify**
1168
+ ```javascript
1169
+ // Get Orders
1170
+ {
1171
+ "action": "SHOPIFY-GET-ORDERS",
1172
+ "input_params": {
1173
+ "instruction": "Get all orders from the last 24 hours with total value over $100"
1174
+ }
1175
+ }
1176
+
1177
+ // Update Inventory
1178
+ {
1179
+ "action": "SHOPIFY-UPDATE-INVENTORY",
1180
+ "input_params": {
1181
+ "instruction": "Update inventory for product {{product_id}} to {{quantity}} units"
1182
+ }
1183
+ }
1184
+
1185
+ // Create Product
1186
+ {
1187
+ "action": "SHOPIFY-CREATE-PRODUCT",
1188
+ "input_params": {
1189
+ "instruction": "Create product with title {{title}}, price {{price}}, and description: {{description}}"
1190
+ }
1191
+ }
1192
+ ```
1193
+
1194
+ **Stripe**
1195
+ ```javascript
1196
+ // Create Charge
1197
+ {
1198
+ "action": "STRIPE-CREATE-CHARGE",
1199
+ "input_params": {
1200
+ "instruction": "Charge {{amount}} to customer {{customer_id}} for {{description}}"
1201
+ }
1202
+ }
1203
+
1204
+ // Get Customer
1205
+ {
1206
+ "action": "STRIPE-GET-CUSTOMER",
1207
+ "input_params": {
1208
+ "instruction": "Get customer details for {{customer_id}}"
1209
+ }
1210
+ }
1211
+
1212
+ // Create Subscription
1213
+ {
1214
+ "action": "STRIPE-CREATE-SUBSCRIPTION",
1215
+ "input_params": {
1216
+ "instruction": "Create subscription for customer {{customer_id}} with plan {{plan_id}}"
1217
+ }
1218
+ }
1219
+ ```
1220
+
1221
+ **WooCommerce**
1222
+ ```javascript
1223
+ // Update Order
1224
+ {
1225
+ "action": "WOOCOMMERCE-UPDATE-ORDER",
1226
+ "input_params": {
1227
+ "instruction": "Update order {{order_id}} status to {{status}}"
1228
+ }
1229
+ }
1230
+
1231
+ // Get Products
1232
+ {
1233
+ "action": "WOOCOMMERCE-GET-PRODUCTS",
1234
+ "input_params": {
1235
+ "instruction": "Get all products in category {{category}} with stock status {{status}}"
1236
+ }
1237
+ }
1238
+ ```
1239
+
1240
+ ---
1241
+
1242
+ ### Productivity
1243
+
1244
+ **Google Sheets**
1245
+ ```javascript
1246
+ // Append Row
1247
+ {
1248
+ "action": "GOOGLE_SHEETS-APPEND-ROW",
1249
+ "input_params": {
1250
+ "instruction": "Append row to sheet {{sheet_name}} with data: {{row_data}}"
1251
+ }
1252
+ }
1253
+
1254
+ // Update Cell
1255
+ {
1256
+ "action": "GOOGLE_SHEETS-UPDATE-CELL",
1257
+ "input_params": {
1258
+ "instruction": "Update cell {{cell_reference}} in sheet {{sheet_name}} with value {{value}}"
1259
+ }
1260
+ }
1261
+
1262
+ // Get Data
1263
+ {
1264
+ "action": "GOOGLE_SHEETS-GET-DATA",
1265
+ "input_params": {
1266
+ "instruction": "Get all data from range {{range}} in sheet {{sheet_name}}"
1267
+ }
1268
+ }
1269
+
1270
+ // Update Range
1271
+ {
1272
+ "action": "GOOGLE_SHEETS-UPDATE-RANGE",
1273
+ "input_params": {
1274
+ "instruction": "Update range {{range}} with values: {{values}}"
1275
+ }
1276
+ }
1277
+ ```
1278
+
1279
+ **Notion**
1280
+ ```javascript
1281
+ // Create Page
1282
+ {
1283
+ "action": "NOTION-CREATE-PAGE",
1284
+ "input_params": {
1285
+ "instruction": "Create page in database {{database_id}} with title {{title}} and content: {{content}}"
1286
+ }
1287
+ }
1288
+
1289
+ // Update Database
1290
+ {
1291
+ "action": "NOTION-UPDATE-DATABASE",
1292
+ "input_params": {
1293
+ "instruction": "Update database entry {{entry_id}} with properties: {{properties}}"
1294
+ }
1295
+ }
1296
+
1297
+ // Search
1298
+ {
1299
+ "action": "NOTION-SEARCH",
1300
+ "input_params": {
1301
+ "instruction": "Search for pages containing {{keyword}} in workspace"
1302
+ }
1303
+ }
1304
+ ```
1305
+
1306
+ **Airtable**
1307
+ ```javascript
1308
+ // Create Record
1309
+ {
1310
+ "action": "AIRTABLE-CREATE-RECORD",
1311
+ "input_params": {
1312
+ "instruction": "Create record in table {{table_name}} with fields: {{fields}}"
1313
+ }
1314
+ }
1315
+
1316
+ // Find Records
1317
+ {
1318
+ "action": "AIRTABLE-FIND-RECORDS",
1319
+ "input_params": {
1320
+ "instruction": "Find records in {{table_name}} where {{field}} equals {{value}}"
1321
+ }
1322
+ }
1323
+ ```
1324
+
1325
+ ---
1326
+
1327
+ ### Marketing
1328
+
1329
+ **Mailchimp**
1330
+ ```javascript
1331
+ // Add Subscriber
1332
+ {
1333
+ "action": "MAILCHIMP-ADD-SUBSCRIBER",
1334
+ "input_params": {
1335
+ "instruction": "Add {{email}} to list {{list_id}} with tags {{tags}}"
1336
+ }
1337
+ }
1338
+
1339
+ // Create Campaign
1340
+ {
1341
+ "action": "MAILCHIMP-CREATE-CAMPAIGN",
1342
+ "input_params": {
1343
+ "instruction": "Create campaign with subject {{subject}} for list {{list_id}} and content: {{content}}"
1344
+ }
1345
+ }
1346
+ ```
1347
+
1348
+ **SendGrid**
1349
+ ```javascript
1350
+ // Send Bulk Email
1351
+ {
1352
+ "action": "SENDGRID-SEND-BULK-EMAIL",
1353
+ "input_params": {
1354
+ "instruction": "Send emails to {{recipients}} with template {{template_id}} and data: {{personalization}}"
1355
+ }
1356
+ }
1357
+ ```
1358
+
1359
+ **Facebook**
1360
+ ```javascript
1361
+ // Create Ad
1362
+ {
1363
+ "action": "FACEBOOK-CREATE-AD",
1364
+ "input_params": {
1365
+ "instruction": "Create ad with creative {{creative_id}} targeting {{audience}} with budget {{budget}}"
1366
+ }
1367
+ }
1368
+
1369
+ // Get Insights
1370
+ {
1371
+ "action": "FACEBOOK-GET-INSIGHTS",
1372
+ "input_params": {
1373
+ "instruction": "Get ad insights for campaign {{campaign_id}} from {{start_date}} to {{end_date}}"
1374
+ }
1375
+ }
1376
+ ```
1377
+
1378
+ **LinkedIn**
1379
+ ```javascript
1380
+ // Create Post
1381
+ {
1382
+ "action": "LINKEDIN-CREATE-POST",
1383
+ "input_params": {
1384
+ "instruction": "Create post with text: {{content}} and image {{image_url}}"
1385
+ }
1386
+ }
1387
+
1388
+ // Get Profile
1389
+ {
1390
+ "action": "LINKEDIN-GET-PROFILE",
1391
+ "input_params": {
1392
+ "instruction": "Get profile information for user {{user_id}}"
1393
+ }
1394
+ }
1395
+ ```
1396
+
1397
+ ---
1398
+
1399
+ ## 🔄 Hybrid Workflow Patterns
1400
+
1401
+ ### Pattern 1: Data Collection + AI Processing + Multi-Channel Distribution
1402
+
1403
+ ```javascript
1404
+ {
1405
+ "nodes": [
1406
+ // 1. Collect data from CRM
1407
+ {
1408
+ "name": "get_crm_contacts",
1409
+ "node_type_name": "mcp_run_action",
1410
+ "input_config": {
1411
+ "action": "HUBSPOT-GET-CONTACTS",
1412
+ "input_params": {
1413
+ "instruction": "Get contacts created in last 7 days with engagement scores"
1414
+ }
1415
+ },
1416
+ "connection": "{{__app_connections__['hubspot-conn']}}"
1417
+ },
1418
+
1419
+ // 2. AI Analysis
1420
+ {
1421
+ "name": "analyze_contacts",
1422
+ "node_type_name": "llm",
1423
+ "input_config": {
1424
+ "model": "DeepSeek V3",
1425
+ "human_message": "Analyze these contacts and segment into high/medium/low priority: {{get_crm_contacts.output}}"
1426
+ }
1427
+ },
1428
+
1429
+ // 3. Send to Google Sheets
1430
+ {
1431
+ "name": "update_sheet",
1432
+ "node_type_name": "mcp_run_action",
1433
+ "input_config": {
1434
+ "action": "GOOGLE_SHEETS-APPEND-ROW",
1435
+ "input_params": {
1436
+ "instruction": "Append analysis to sheet 'Contact Analysis' with data: {{analyze_contacts.content}}"
1437
+ }
1438
+ },
1439
+ "connection": "{{__app_connections__['sheets-conn']}}"
1440
+ },
1441
+
1442
+ // 4. Notify team via Slack
1443
+ {
1444
+ "name": "notify_team",
1445
+ "node_type_name": "mcp_run_action",
1446
+ "input_config": {
1447
+ "action": "SLACK-SEND-MESSAGE",
1448
+ "input_params": {
1449
+ "instruction": "Send to #sales channel: New contact analysis complete with {{analyze_contacts.content}}"
1450
+ }
1451
+ },
1452
+ "connection": "{{__app_connections__['slack-conn']}}"
1453
+ }
1454
+ ]
1455
+ }
1456
+ ```
1457
+
1458
+ ### Pattern 2: Web Research + CRM Update + Email Campaign
1459
+
1460
+ ```javascript
1461
+ {
1462
+ "nodes": [
1463
+ // 1. Research company
1464
+ {
1465
+ "name": "research_company",
1466
+ "node_type_name": "perplexity_search",
1467
+ "input_config": {
1468
+ "query": "{{company_name}} latest news and funding rounds"
1469
+ }
1470
+ },
1471
+
1472
+ // 2. Extract insights
1473
+ {
1474
+ "name": "extract_insights",
1475
+ "node_type_name": "llm",
1476
+ "input_config": {
1477
+ "model": "Claude 3.5 Sonnet",
1478
+ "human_message": "Extract key insights from: {{research_company.response}}"
1479
+ }
1480
+ },
1481
+
1482
+ // 3. Update CRM
1483
+ {
1484
+ "name": "update_crm",
1485
+ "node_type_name": "mcp_run_action",
1486
+ "input_config": {
1487
+ "action": "SALESFORCE-UPDATE-OPPORTUNITY",
1488
+ "input_params": {
1489
+ "instruction": "Update opportunity notes with research: {{extract_insights.content}}"
1490
+ }
1491
+ },
1492
+ "connection": "{{__app_connections__['salesforce-conn']}}"
1493
+ },
1494
+
1495
+ // 4. Generate personalized email
1496
+ {
1497
+ "name": "generate_email",
1498
+ "node_type_name": "llm",
1499
+ "input_config": {
1500
+ "model": "GPT-4o-mini",
1501
+ "human_message": "Write personalized email based on insights: {{extract_insights.content}}"
1502
+ }
1503
+ },
1504
+
1505
+ // 5. Send via Gmail
1506
+ {
1507
+ "name": "send_email",
1508
+ "node_type_name": "mcp_run_action",
1509
+ "input_config": {
1510
+ "action": "GMAIL-SEND-EMAIL",
1511
+ "input_params": {
1512
+ "instruction": "Send email generated in {{generate_email.content}} to {{recipient_email}}"
1513
+ }
1514
+ },
1515
+ "connection": "{{__app_connections__['gmail-conn']}}"
1516
+ }
1517
+ ]
1518
+ }
1519
+ ```
1520
+
1521
+ ---
1522
+
1523
+ ## 🔐 Connection Management
1524
+
1525
+ ### Setting Up MCP Connections
1526
+
1527
+ **User Instructions:**
1528
+
1529
+ 1. **Navigate to MCP Settings:**
1530
+ ```
1531
+ Go to: https://agenticflow.ai/app/mcp
1532
+ ```
1533
+
1534
+ 2. **Add Provider:**
1535
+ - Click "Add Provider"
1536
+ - Select service (Gmail, Slack, HubSpot, etc.)
1537
+ - Click "Connect"
1538
+
1539
+ 3. **Authorize:**
1540
+ - Follow OAuth flow
1541
+ - Grant required permissions
1542
+ - Confirm access
1543
+
1544
+ 4. **Copy Connection ID:**
1545
+ - Connection will be created with UUID
1546
+ - Copy for use in workflows
1547
+
1548
+ 5. **Use in Workflow:**
1549
+ ```javascript
1550
+ "connection": "{{__app_connections__['copied-uuid-here']}}"
1551
+ ```
1552
+
1553
+ ### Connection Requirements by Service
1554
+
1555
+ | Service | Auth Type | Permissions Needed |
1556
+ |---------|-----------|-------------------|
1557
+ | Gmail | OAuth | Send, Read emails |
1558
+ | Google Sheets | OAuth | Edit spreadsheets |
1559
+ | Slack | OAuth | Post messages, Manage channels |
1560
+ | HubSpot | API Key | CRM access |
1561
+ | Salesforce | OAuth | CRM read/write |
1562
+ | Shopify | API Key | Store management |
1563
+ | Stripe | API Key | Payment processing |
1564
+
1565
+ ---
1566
+
1567
+ ## 💡 Best Practices
1568
+
1569
+ ### 1. Instruction Design
1570
+
1571
+ **Good Instructions:**
1572
+ ✅ Clear and specific
1573
+ ✅ Include all necessary data
1574
+ ✅ Specify format when needed
1575
+ ✅ Use template variables
1576
+
1577
+ ```javascript
1578
+ "Send email to {{recipient}} with subject 'Order Confirmation #{{order_id}}' and body: Thank you for your order of {{product_name}}. Total: ${{total}}."
1579
+ ```
1580
+
1581
+ **Bad Instructions:**
1582
+ ❌ Vague
1583
+ ❌ Missing data
1584
+ ❌ Unclear format
1585
+
1586
+ ```javascript
1587
+ "Send an email about the order"
1588
+ ```
1589
+
1590
+ ### 2. Error Handling
1591
+
1592
+ Always plan for:
1593
+ - Connection failures
1594
+ - Rate limits
1595
+ - Invalid data
1596
+ - Service outages
1597
+
1598
+ ### 3. Cost Optimization
1599
+
1600
+ - Use MCP only when needed
1601
+ - Batch operations when possible
1602
+ - Cache results to avoid redundant calls
1603
+
1604
+ ### 4. Security
1605
+
1606
+ - Never hardcode credentials
1607
+ - Use connections for auth
1608
+ - Validate data before sending
1609
+ - Follow service best practices
1610
+
1611
+ ---
1612
+
1613
+ ## 🚀 Quick Start Template
1614
+
1615
+ ```javascript
1616
+ {
1617
+ "name": "mcp_action_name",
1618
+ "title": "Action Title",
1619
+ "description": "What this does",
1620
+ "node_type_name": "mcp_run_action",
1621
+ "input_config": {
1622
+ "action": "SERVICE-ACTION-NAME",
1623
+ "input_params": {
1624
+ "instruction": "Clear instruction with {{variables}}"
1625
+ }
1626
+ },
1627
+ "output_mapping": {},
1628
+ "connection": "{{__app_connections__['connection-uuid']}}"
1629
+ }
1630
+ ```
1631
+
1632
+ ---
1633
+
1634
+ **Next Steps:**
1635
+ - Check `references/mcp_integrations.md` for full list
1636
+ - See `references/examples/workflows/` for MCP usage examples
1637
+ - Review workflow patterns in `references/workflow_guide.md`
1638
+ # Technical Requirements & Common Fixes
1639
+
1640
+ Complete technical reference for creating valid AgenticFlow workflows with proper field formats and structures.
1641
+
1642
+ ## 🔧 Node Structure Requirements
1643
+
1644
+ ### Complete Node Template
1645
+
1646
+ Every node in a workflow must have these fields:
1647
+
1648
+ ```javascript
1649
+ {
1650
+ "name": "unique_node_name", // Required: string, unique within workflow
1651
+ "title": "Display Title", // Optional but recommended: string
1652
+ "description": "What this node does", // Optional but recommended: string
1653
+ "node_type_name": "exact_node_type", // Required: exact match from API
1654
+ "input_config": {}, // Required: object (can be empty {})
1655
+ "output_mapping": {}, // Required: object (NEVER null, use {})
1656
+ "connection": "" // Required: string (NEVER null, use "")
1657
+ }
1658
+ ```
1659
+
1660
+ ### Field-by-Field Breakdown
1661
+
1662
+ #### 1. `name` (REQUIRED)
1663
+ - **Type:** string
1664
+ - **Rules:**
1665
+ - Must be unique within workflow
1666
+ - Use snake_case: `get_customer_data`, `send_notification`
1667
+ - Descriptive and meaningful
1668
+ - No spaces or special characters except underscore
1669
+ - **Examples:**
1670
+ ```javascript
1671
+ "name": "scrape_competitor_prices"
1672
+ "name": "analyze_with_llm"
1673
+ "name": "send_slack_alert"
1674
+ ```
1675
+
1676
+ #### 2. `title` (OPTIONAL but recommended)
1677
+ - **Type:** string
1678
+ - **Purpose:** Human-readable display name
1679
+ - **Examples:**
1680
+ ```javascript
1681
+ "title": "Scrape Competitor Prices"
1682
+ "title": "Analyze with AI"
1683
+ "title": "Send Slack Alert"
1684
+ ```
1685
+
1686
+ #### 3. `description` (OPTIONAL but recommended)
1687
+ - **Type:** string
1688
+ - **Purpose:** Explain what this node does
1689
+ - **Examples:**
1690
+ ```javascript
1691
+ "description": "Scrapes pricing data from competitor websites"
1692
+ "description": "Uses LLM to analyze pricing trends"
1693
+ "description": "Notifies team in Slack channel"
1694
+ ```
1695
+
1696
+ #### 4. `node_type_name` (REQUIRED)
1697
+ - **Type:** string
1698
+ - **Rules:**
1699
+ - MUST be exact match from `agenticflow_list_node_types()`
1700
+ - Case-sensitive
1701
+ - Check spelling carefully
1702
+ - **How to verify:**
1703
+ ```javascript
1704
+ // Search for the node type
1705
+ agenticflow_search_node_types({name: 'llm'})
1706
+
1707
+ // Or list all to find exact name
1708
+ agenticflow_list_node_types({limit: 200})
1709
+ ```
1710
+ - **Common node types:**
1711
+ ```javascript
1712
+ "node_type_name": "llm"
1713
+ "node_type_name": "web_scraping"
1714
+ "node_type_name": "perplexity_search"
1715
+ "node_type_name": "mcp_run_action"
1716
+ "node_type_name": "openai_extract_structured_data"
1717
+ "node_type_name": "generate_image"
1718
+ ```
1719
+
1720
+ #### 5. `input_config` (REQUIRED)
1721
+ - **Type:** object
1722
+ - **Rules:**
1723
+ - NEVER null
1724
+ - Can be empty `{}`
1725
+ - Must match node type's input schema
1726
+ - Check `references/complete_node_types.md` for required fields
1727
+ - **Examples:**
1728
+ ```javascript
1729
+ // LLM node
1730
+ "input_config": {
1731
+ "model": "DeepSeek V3",
1732
+ "temperature": 0.3,
1733
+ "max_tokens": 4000,
1734
+ "human_message": "Analyze this data: {{previous_node.output}}",
1735
+ "system_message": "You are an expert analyst"
1736
+ }
1737
+
1738
+ // Web scraping node
1739
+ "input_config": {
1740
+ "web_url": "{{target_url}}",
1741
+ "max_tokens": 10000,
1742
+ "include_images": false
1743
+ }
1744
+
1745
+ // MCP action node
1746
+ "input_config": {
1747
+ "action": "GMAIL-SEND-EMAIL",
1748
+ "input_params": {
1749
+ "instruction": "Send email to {{recipient}} with content: {{content}}"
1750
+ }
1751
+ }
1752
+ ```
1753
+
1754
+ #### 6. `output_mapping` (REQUIRED)
1755
+ - **Type:** object
1756
+ - **Rules:**
1757
+ - NEVER null (use `{}` instead)
1758
+ - Maps node outputs to custom names
1759
+ - Usually empty `{}` unless custom mapping needed
1760
+ - **Examples:**
1761
+ ```javascript
1762
+ // Usually empty
1763
+ "output_mapping": {}
1764
+
1765
+ // Custom mapping (rare)
1766
+ "output_mapping": {
1767
+ "custom_name": "{{node_name.field}}"
1768
+ }
1769
+ ```
1770
+
1771
+ #### 7. `connection` (REQUIRED)
1772
+ - **Type:** string
1773
+ - **Rules:**
1774
+ - NEVER null (use `""` instead)
1775
+ - Empty string `""` if no connection needed
1776
+ - MCP connection reference: `{{__app_connections__['uuid']}}`
1777
+ - **Examples:**
1778
+ ```javascript
1779
+ // No connection needed
1780
+ "connection": ""
1781
+
1782
+ // MCP connection
1783
+ "connection": "{{__app_connections__['gmail-connection-id']}}"
1784
+ ```
1785
+
1786
+ ---
1787
+
1788
+ ## ⚠️ Common Errors & Fixes
1789
+
1790
+ ### Error 1: Null Values
1791
+
1792
+ ❌ **WRONG:**
1793
+ ```javascript
1794
+ {
1795
+ "output_mapping": null,
1796
+ "connection": null
1797
+ }
1798
+ ```
1799
+
1800
+ ✅ **CORRECT:**
1801
+ ```javascript
1802
+ {
1803
+ "output_mapping": {},
1804
+ "connection": ""
1805
+ }
1806
+ ```
1807
+
1808
+ ### Error 2: Missing Required Fields
1809
+
1810
+ ❌ **WRONG:**
1811
+ ```javascript
1812
+ {
1813
+ "name": "my_node",
1814
+ "node_type_name": "llm"
1815
+ // Missing input_config, output_mapping, connection
1816
+ }
1817
+ ```
1818
+
1819
+ ✅ **CORRECT:**
1820
+ ```javascript
1821
+ {
1822
+ "name": "my_node",
1823
+ "node_type_name": "llm",
1824
+ "input_config": {
1825
+ "model": "DeepSeek V3",
1826
+ "human_message": "Process this data"
1827
+ },
1828
+ "output_mapping": {},
1829
+ "connection": ""
1830
+ }
1831
+ ```
1832
+
1833
+ ### Error 3: Wrong Node Type Name
1834
+
1835
+ ❌ **WRONG:**
1836
+ ```javascript
1837
+ {
1838
+ "node_type_name": "LLM" // Wrong case
1839
+ }
1840
+ ```
1841
+
1842
+ ```javascript
1843
+ {
1844
+ "node_type_name": "llm_node" // Wrong name
1845
+ }
1846
+ ```
1847
+
1848
+ ✅ **CORRECT:**
1849
+ ```javascript
1850
+ {
1851
+ "node_type_name": "llm" // Exact match from API
1852
+ }
1853
+ ```
1854
+
1855
+ ### Error 4: Invalid Template Variables
1856
+
1857
+ ❌ **WRONG:**
1858
+ ```javascript
1859
+ {
1860
+ "human_message": "Process ${previous_node.output}" // Wrong syntax
1861
+ }
1862
+ ```
1863
+
1864
+ ```javascript
1865
+ {
1866
+ "human_message": "Process {{nonexistent_node.data}}" // Node doesn't exist
1867
+ }
1868
+ ```
1869
+
1870
+ ✅ **CORRECT:**
1871
+ ```javascript
1872
+ {
1873
+ "human_message": "Process {{previous_node.output}}" // Correct syntax and existing node
1874
+ }
1875
+ ```
1876
+
1877
+ ### Error 5: Missing Input Config Fields
1878
+
1879
+ ❌ **WRONG:**
1880
+ ```javascript
1881
+ {
1882
+ "node_type_name": "llm",
1883
+ "input_config": {
1884
+ "human_message": "Process this"
1885
+ // Missing required 'model' field
1886
+ }
1887
+ }
1888
+ ```
1889
+
1890
+ ✅ **CORRECT:**
1891
+ ```javascript
1892
+ {
1893
+ "node_type_name": "llm",
1894
+ "input_config": {
1895
+ "model": "DeepSeek V3",
1896
+ "human_message": "Process this"
1897
+ }
1898
+ }
1899
+ ```
1900
+
1901
+ ---
1902
+
1903
+ ## 🔗 Template Variables
1904
+
1905
+ ### Syntax Rules
1906
+
1907
+ **Correct Format:**
1908
+ ```javascript
1909
+ {{node_name.field}}
1910
+ {{input_parameter}}
1911
+ {{__app_connections__['connection-id']}}
1912
+ ```
1913
+
1914
+ **Common Mistakes:**
1915
+ ```javascript
1916
+ ${node_name.field} // Wrong - not JavaScript template literal
1917
+ {node_name.field} // Wrong - single braces
1918
+ {{ node_name.field }} // Wrong - spaces inside braces
1919
+ {{node_name}} // Incomplete - needs field
1920
+ ```
1921
+
1922
+ ### Output Field Reference
1923
+
1924
+ | Node Type | Primary Output Field |
1925
+ |-----------|---------------------|
1926
+ | `llm` | `.content` |
1927
+ | `claude_ask` | `.answer` |
1928
+ | `openai_ask_chat_gpt` | `.response` |
1929
+ | `perplexity_search` | `.response` |
1930
+ | `google_search` | `.organic_results` |
1931
+ | `web_scraping` | `.scraped_content` |
1932
+ | `openai_extract_structured_data` | `.extracted_data` |
1933
+ | `generate_image` | `.image_url` |
1934
+ | `describe_image` | `.description` |
1935
+ | `mcp_run_action` | `.output` |
1936
+ | `api_call` | `.response` |
1937
+
1938
+ ### Accessing Nested Fields
1939
+
1940
+ ```javascript
1941
+ // Simple field
1942
+ {{node_name.content}}
1943
+
1944
+ // Nested object
1945
+ {{node_name.response.data.items}}
1946
+
1947
+ // Array element
1948
+ {{node_name.results[0].title}}
1949
+
1950
+ // Deep nesting
1951
+ {{node_name.response.data.items[0].properties.name}}
1952
+ ```
1953
+
1954
+ ### Input Parameters
1955
+
1956
+ ```javascript
1957
+ // Direct input variable
1958
+ {{company_name}}
1959
+ {{user_email}}
1960
+ {{search_query}}
1961
+
1962
+ // In input_schema
1963
+ {
1964
+ "input_schema": {
1965
+ "properties": {
1966
+ "company_name": {
1967
+ "type": "string"
1968
+ }
1969
+ }
1970
+ }
1971
+ }
1972
+
1973
+ // Use in node
1974
+ {
1975
+ "input_config": {
1976
+ "human_message": "Research company: {{company_name}}"
1977
+ }
1978
+ }
1979
+ ```
1980
+
1981
+ ---
1982
+
1983
+ ## 📝 Workflow-Level Requirements
1984
+
1985
+ ### Complete Workflow Structure
1986
+
1987
+ ```javascript
1988
+ {
1989
+ "name": "Workflow Name",
1990
+ "description": "What this workflow does",
1991
+ "nodes": [
1992
+ // Array of node objects
1993
+ {
1994
+ "name": "node1",
1995
+ "node_type_name": "llm",
1996
+ "input_config": {},
1997
+ "output_mapping": {},
1998
+ "connection": ""
1999
+ },
2000
+ {
2001
+ "name": "node2",
2002
+ "node_type_name": "web_scraping",
2003
+ "input_config": {},
2004
+ "output_mapping": {},
2005
+ "connection": ""
2006
+ }
2007
+ ],
2008
+ "input_schema": {
2009
+ "type": "object",
2010
+ "title": "User inputs",
2011
+ "required": [],
2012
+ "properties": {
2013
+ // Input field definitions
2014
+ }
2015
+ },
2016
+ "output_mapping": {
2017
+ // Final workflow outputs
2018
+ }
2019
+ }
2020
+ ```
2021
+
2022
+ ### Input Schema Structure
2023
+
2024
+ ```javascript
2025
+ {
2026
+ "input_schema": {
2027
+ "type": "object",
2028
+ "title": "User inputs",
2029
+ "description": "Inputs for the workflow",
2030
+ "required": ["required_field"],
2031
+ "properties": {
2032
+ "field_name": {
2033
+ "type": "string", // string, number, boolean, array, object
2034
+ "title": "Display Label",
2035
+ "description": "Help text",
2036
+ "ui_metadata": {
2037
+ "type": "short_text", // short_text, long_text, dropdown, multi_select
2038
+ "order": 0,
2039
+ "placeholder": "Example...",
2040
+ "value": "default_value"
2041
+ }
2042
+ }
2043
+ }
2044
+ }
2045
+ }
2046
+ ```
2047
+
2048
+ ### UI Metadata Field Types
2049
+
2050
+ **`short_text`** - Single line text input
2051
+ ```javascript
2052
+ {
2053
+ "type": "string",
2054
+ "ui_metadata": {
2055
+ "type": "short_text",
2056
+ "placeholder": "Enter company name"
2057
+ }
2058
+ }
2059
+ ```
2060
+
2061
+ **`long_text`** - Multi-line text area
2062
+ ```javascript
2063
+ {
2064
+ "type": "string",
2065
+ "ui_metadata": {
2066
+ "type": "long_text",
2067
+ "placeholder": "Enter detailed description..."
2068
+ }
2069
+ }
2070
+ ```
2071
+
2072
+ **`dropdown`** - Single selection dropdown
2073
+ ```javascript
2074
+ {
2075
+ "type": "string",
2076
+ "ui_metadata": {
2077
+ "type": "dropdown",
2078
+ "options": ["Option 1", "Option 2", "Option 3"],
2079
+ "value": "Option 1"
2080
+ }
2081
+ }
2082
+ ```
2083
+
2084
+ **`multi_select`** - Multiple selection
2085
+ ```javascript
2086
+ {
2087
+ "type": "array",
2088
+ "items": {"type": "string"},
2089
+ "ui_metadata": {
2090
+ "type": "multi_select",
2091
+ "options": ["Tag1", "Tag2", "Tag3"],
2092
+ "value": ["Tag1"]
2093
+ }
2094
+ }
2095
+ ```
2096
+
2097
+ ---
2098
+
2099
+ ## 🔄 Execution Order & Dependencies
2100
+
2101
+ ### Sequential Execution
2102
+
2103
+ Nodes execute in array order by default:
2104
+
2105
+ ```javascript
2106
+ {
2107
+ "nodes": [
2108
+ {"name": "step1", ...}, // Executes first
2109
+ {"name": "step2", ...}, // Executes second
2110
+ {"name": "step3", ...} // Executes third
2111
+ ]
2112
+ }
2113
+ ```
2114
+
2115
+ ### Parallel Execution with `prevNodeName`
2116
+
2117
+ **For workflow building only** (not for `agenticflow_create_workflow`):
2118
+
2119
+ ```javascript
2120
+ {
2121
+ "nodes": [
2122
+ {
2123
+ "name": "start",
2124
+ "prevNodeName": null // First node
2125
+ },
2126
+ {
2127
+ "name": "parallel1",
2128
+ "prevNodeName": "start" // Waits for start
2129
+ },
2130
+ {
2131
+ "name": "parallel2",
2132
+ "prevNodeName": "start" // Also waits for start, runs parallel to parallel1
2133
+ },
2134
+ {
2135
+ "name": "final",
2136
+ "prevNodeName": "parallel2" // Waits for both parallel nodes
2137
+ }
2138
+ ]
2139
+ }
2140
+ ```
2141
+
2142
+ ---
2143
+
2144
+ ## ✅ Pre-Flight Checklist
2145
+
2146
+ Before creating a workflow, verify:
2147
+
2148
+ **Node Level:**
2149
+ - [ ] All nodes have unique names
2150
+ - [ ] `node_type_name` exactly matches API
2151
+ - [ ] `input_config` has all required fields
2152
+ - [ ] `output_mapping` is `{}` not `null`
2153
+ - [ ] `connection` is `""` not `null` (or proper UUID if needed)
2154
+ - [ ] Template variables reference existing nodes
2155
+ - [ ] Template variables use correct output fields
2156
+
2157
+ **Workflow Level:**
2158
+ - [ ] `name` is descriptive and clear
2159
+ - [ ] `description` explains purpose
2160
+ - [ ] `nodes` array is not empty
2161
+ - [ ] `input_schema` properly structured
2162
+ - [ ] `input_schema` has `ui_metadata` for user experience
2163
+ - [ ] `output_mapping` configured for final results
2164
+ - [ ] All MCP connections documented
2165
+
2166
+ **Data Flow:**
2167
+ - [ ] Each node has the data it needs from previous nodes
2168
+ - [ ] No circular dependencies
2169
+ - [ ] Output fields correctly referenced
2170
+ - [ ] Input parameters defined in schema
2171
+
2172
+ ---
2173
+
2174
+ ## 🚀 Quick Validation
2175
+
2176
+ ### Minimal Valid Node
2177
+
2178
+ ```javascript
2179
+ {
2180
+ "name": "test_node",
2181
+ "node_type_name": "llm",
2182
+ "input_config": {
2183
+ "model": "DeepSeek V3",
2184
+ "human_message": "Test"
2185
+ },
2186
+ "output_mapping": {},
2187
+ "connection": ""
2188
+ }
2189
+ ```
2190
+
2191
+ ### Minimal Valid Workflow
2192
+
2193
+ ```javascript
2194
+ {
2195
+ "name": "Test Workflow",
2196
+ "description": "Simple test",
2197
+ "nodes": [
2198
+ {
2199
+ "name": "test_node",
2200
+ "node_type_name": "llm",
2201
+ "input_config": {
2202
+ "model": "DeepSeek V3",
2203
+ "human_message": "{{user_input}}"
2204
+ },
2205
+ "output_mapping": {},
2206
+ "connection": ""
2207
+ }
2208
+ ],
2209
+ "input_schema": {
2210
+ "type": "object",
2211
+ "properties": {
2212
+ "user_input": {
2213
+ "type": "string",
2214
+ "title": "Your Input"
2215
+ }
2216
+ }
2217
+ },
2218
+ "output_mapping": {}
2219
+ }
2220
+ ```
2221
+
2222
+ ---
2223
+
2224
+ ### Phase 8: Building the AI Agent (The Master Layer)
2225
+
2226
+ **Goal:** Create a specialized AI entity that uses your workflows as tools to interact with users.
2227
+
2228
+ **Build Steps:**
2229
+
2230
+ 1. **Define Identity:**
2231
+ - **Name**: Clear role-based name (e.g., "Customer Support Agent").
2232
+ - **Instructions**: Detailed system prompt defining personality, constraints, and how to use tools.
2233
+
2234
+ 2. **Select Tools (Workflows):**
2235
+ - Identify which `workflow_id`s this agent should be able to trigger.
2236
+ - Map user intents to specific workflows.
2237
+
2238
+ 3. **Creation Call:**
2239
+ ```javascript
2240
+ // Call after creating the necessary workflows
2241
+ agenticflow_create_agent({
2242
+ name: "Price Monitor Agent",
2243
+ instructions: "You are a price monitoring expert. Use the 'scr_price_wf' tool to check prices when users ask...",
2244
+ data: {
2245
+ tools: ["workflow-uuid-1", "workflow-uuid-2"],
2246
+ knowledge_sets: []
2247
+ },
2248
+ email: "user@example.com"
2249
+ })
2250
+ ```
2251
+
2252
+ ---
2253
+
2254
+ ## 📚 Reference Priority
2255
+
2256
+ When building solutions, check references in this order:
2257
+
2258
+ 1. **`references/node_types.md`** - Choose right node type & field overview
2259
+ 2. **`references/mcp_integrations.md`** - Find external service actions
2260
+ 3. **`references/workflow_guide.md`** - Real world patterns & examples
2261
+ 4. **This guide (`GUIDES.md`)** - Creation process & technical requirements
2262
+ 5. **`OPTIMIZATION.md`** - System philosophy & architecture
2263
+
2264
+ ---
2265
+
2266
+ **Next Steps:**
2267
+ - Validate workflows before creation using `agenticflow_validate_workflow()`
2268
+ - Call `agenticflow_create_agent()` after creating tools (workflows)
2269
+ - Test your solution in the AgenticFlow dashboard