@awesomate/hosting-mcp 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/index.js +204 -8
  2. package/package.json +2 -2
  3. package/skill/awesomate-app-builder/SKILL.md +5 -1
  4. package/skill/awesomate-credentials/SKILL.md +1 -1
  5. package/skill/awesomate-hosting/SKILL.md +50 -159
  6. package/skill/awesomate-hosting/references/connect-troubleshooting.md +77 -0
  7. package/skill/awesomate-hosting/references/multi-account.md +33 -0
  8. package/skill/awesomate-hosting/references/rest-fallback.md +30 -0
  9. package/skill/awesomate-hosting/scripts/bootstrap.mjs +27 -7
  10. package/skill/awesomate-n8n/SKILL.md +153 -147
  11. package/skill/awesomate-n8n/evals/ai-agent-build/graders/grader.md +31 -0
  12. package/skill/awesomate-n8n/evals/ai-agent-build/prompt.md +1 -0
  13. package/skill/awesomate-n8n/evals/build-form-email/graders/grader.md +30 -0
  14. package/skill/awesomate-n8n/evals/build-form-email/prompt.md +1 -0
  15. package/skill/awesomate-n8n/evals/datatable-dedupe/graders/grader.md +32 -0
  16. package/skill/awesomate-n8n/evals/datatable-dedupe/prompt.md +2 -0
  17. package/skill/awesomate-n8n/evals/diagnose-failure/graders/grader.md +27 -0
  18. package/skill/awesomate-n8n/evals/diagnose-failure/prompt.md +2 -0
  19. package/skill/awesomate-n8n/evals/essentials-upsell/graders/grader.md +27 -0
  20. package/skill/awesomate-n8n/evals/essentials-upsell/prompt.md +2 -0
  21. package/skill/awesomate-n8n/evals/live-change-promote/graders/grader.md +35 -0
  22. package/skill/awesomate-n8n/evals/live-change-promote/prompt.md +2 -0
  23. package/skill/awesomate-n8n/evals/possibilities-grounded/graders/grader.md +28 -0
  24. package/skill/awesomate-n8n/evals/possibilities-grounded/prompt.md +1 -0
  25. package/skill/awesomate-n8n/evals/validated-not-done/graders/grader.md +27 -0
  26. package/skill/awesomate-n8n/evals/validated-not-done/prompt.md +2 -0
  27. package/skill/awesomate-n8n/evals/vars-not-env/graders/grader.md +26 -0
  28. package/skill/awesomate-n8n/evals/vars-not-env/prompt.md +2 -0
  29. package/skill/awesomate-n8n/evals/webhook-body-fix/graders/grader.md +26 -0
  30. package/skill/awesomate-n8n/evals/webhook-body-fix/prompt.md +3 -0
  31. package/skill/awesomate-n8n/references/ai-agents.md +135 -0
  32. package/skill/awesomate-n8n/references/datatables.md +105 -0
  33. package/skill/awesomate-n8n/references/{node-recipes.md → platform-notes.md} +56 -7
  34. package/skill/awesomate-n8n/references/possibilities.md +83 -0
  35. package/skill/awesomate-n8n/references/testing-policy.md +115 -0
  36. package/skill/awesomate-n8n/references/troubleshooting.md +69 -0
  37. package/skill/awesomate-n8n/references/upgrade-loop.md +98 -0
  38. package/skill/awesomate-n8n/references/vendor/MANIFEST.json +26 -0
  39. package/skill/awesomate-n8n/references/vendor/code-node/BUILTIN_FUNCTIONS.md +779 -0
  40. package/skill/awesomate-n8n/references/vendor/code-node/COMMON_PATTERNS.md +1123 -0
  41. package/skill/awesomate-n8n/references/vendor/code-node/DATA_ACCESS.md +797 -0
  42. package/skill/awesomate-n8n/references/vendor/code-node/ERROR_PATTERNS.md +776 -0
  43. package/skill/awesomate-n8n/references/vendor/code-node/SKILL.md +703 -0
  44. package/skill/awesomate-n8n/references/vendor/expressions/COMMON_MISTAKES.md +406 -0
  45. package/skill/awesomate-n8n/references/vendor/expressions/EXAMPLES.md +496 -0
  46. package/skill/awesomate-n8n/references/vendor/expressions/SKILL.md +525 -0
  47. package/skill/awesomate-n8n/references/vendor/node-configuration/DEPENDENCIES.md +743 -0
  48. package/skill/awesomate-n8n/references/vendor/node-configuration/OPERATION_PATTERNS.md +926 -0
  49. package/skill/awesomate-n8n/references/vendor/node-configuration/SKILL.md +583 -0
  50. package/skill/awesomate-n8n/references/vendor/validation/ERROR_CATALOG.md +781 -0
  51. package/skill/awesomate-n8n/references/vendor/validation/FALSE_POSITIVES.md +695 -0
  52. package/skill/awesomate-n8n/references/vendor/validation/SKILL.md +414 -0
  53. package/skill/awesomate-n8n/references/vendor/workflow-patterns/SKILL.md +413 -0
  54. package/skill/awesomate-n8n/references/vendor/workflow-patterns/ai_agent_workflow.md +797 -0
  55. package/skill/awesomate-n8n/references/vendor/workflow-patterns/database_operations.md +798 -0
  56. package/skill/awesomate-n8n/references/vendor/workflow-patterns/http_api_integration.md +747 -0
  57. package/skill/awesomate-n8n/references/vendor/workflow-patterns/scheduled_tasks.md +786 -0
  58. package/skill/awesomate-n8n/references/vendor/workflow-patterns/webhook_processing.md +558 -0
@@ -0,0 +1,413 @@
1
+ <!--
2
+ VENDORED from n8n-builder@d293559 (n8n-workflow-patterns/SKILL.md) — DO NOT EDIT HERE.
3
+ Edit the source in ~/Projects/n8n-builder, then re-run:
4
+ node mcp/scripts/sync-n8n-references.mjs --write
5
+
6
+ Awesomate platform overrides — where this file conflicts with
7
+ ../platform-notes.md, platform-notes wins:
8
+ - $env is BLOCKED fleet-wide → use {{ $vars.key || 'fallback' }}
9
+ - Task runners are ON → no $helpers in Code nodes; use HTTP Request nodes
10
+ - Webhook payloads live at $json.body
11
+ - saveExecutionProgress must stay false
12
+ -->
13
+
14
+ # n8n Workflow Patterns
15
+
16
+ Proven architectural patterns for building n8n workflows.
17
+
18
+ **Deliverable**: complete, importable workflow JSON. The user imports it via the n8n UI (Workflow menu → Import from File / Import from Clipboard), connects credentials, opens each node to fix warnings, and executes with test data.
19
+
20
+ ---
21
+
22
+ ## The 5 Core Patterns
23
+
24
+ Based on analysis of real workflow usage:
25
+
26
+ 1. **[Webhook Processing](webhook_processing.md)** (Most Common)
27
+ - Receive HTTP requests → Process → Output
28
+ - Pattern: Webhook → Validate → Transform → Respond/Notify
29
+
30
+ 2. **[HTTP API Integration](http_api_integration.md)**
31
+ - Fetch from REST APIs → Transform → Store/Use
32
+ - Pattern: Trigger → HTTP Request → Transform → Action → Error Handler
33
+
34
+ 3. **[Database Operations](database_operations.md)**
35
+ - Read/Write/Sync database data
36
+ - Pattern: Schedule → Query → Transform → Write → Verify
37
+
38
+ 4. **[AI Agent Workflow](ai_agent_workflow.md)**
39
+ - AI agents with tools and memory
40
+ - Pattern: Trigger → AI Agent (Model + Tools + Memory) → Output
41
+
42
+ 5. **[Scheduled Tasks](scheduled_tasks.md)**
43
+ - Recurring automation workflows
44
+ - Pattern: Schedule → Fetch → Process → Deliver → Log
45
+
46
+ ---
47
+
48
+ ## Pattern Selection Guide
49
+
50
+ ### When to use each pattern:
51
+
52
+ **Webhook Processing** - Use when:
53
+ - Receiving data from external systems
54
+ - Building integrations (Slack commands, form submissions, GitHub webhooks)
55
+ - Need instant response to events
56
+ - Example: "Receive Stripe payment webhook → Update database → Send confirmation"
57
+
58
+ **HTTP API Integration** - Use when:
59
+ - Fetching data from external APIs
60
+ - Synchronizing with third-party services
61
+ - Building data pipelines
62
+ - Example: "Fetch GitHub issues → Transform → Create Jira tickets"
63
+
64
+ **Database Operations** - Use when:
65
+ - Syncing between databases
66
+ - Running database queries on schedule
67
+ - ETL workflows
68
+ - Example: "Read Postgres records → Transform → Write to MySQL"
69
+
70
+ **AI Agent Workflow** - Use when:
71
+ - Building conversational AI
72
+ - Need AI with tool access
73
+ - Multi-step reasoning tasks
74
+ - Example: "Chat with AI that can search docs, query database, send emails"
75
+
76
+ **Scheduled Tasks** - Use when:
77
+ - Recurring reports or summaries
78
+ - Periodic data fetching
79
+ - Maintenance tasks
80
+ - Example: "Daily: Fetch analytics → Generate report → Email team"
81
+
82
+ ---
83
+
84
+ ## Common Workflow Components
85
+
86
+ All patterns share these building blocks:
87
+
88
+ ### 1. Triggers
89
+ - **Webhook** - HTTP endpoint (instant)
90
+ - **Schedule** - Cron-based timing (periodic)
91
+ - **Manual** - Click to execute (testing)
92
+ - **Polling** - Check for changes (intervals)
93
+
94
+ ### 2. Data Sources
95
+ - **HTTP Request** - REST APIs
96
+ - **Database nodes** - Postgres, MySQL, MongoDB
97
+ - **Service nodes** - Slack, Google Sheets, etc.
98
+ - **Code** - Custom JavaScript/Python
99
+
100
+ ### 3. Transformation
101
+ - **Set** - Map/transform fields
102
+ - **Code** - Complex logic
103
+ - **IF/Switch** - Conditional routing
104
+ - **Merge** - Combine data streams
105
+
106
+ ### 4. Outputs
107
+ - **HTTP Request** - Call APIs
108
+ - **Database** - Write data
109
+ - **Communication** - Email, Slack, Discord
110
+ - **Storage** - Files, cloud storage
111
+
112
+ ### 5. Error Handling
113
+ - **Error Trigger** - Catch workflow errors
114
+ - **IF** - Check for error conditions
115
+ - **Stop and Error** - Explicit failure
116
+ - **Continue On Fail** - Per-node setting
117
+
118
+ ---
119
+
120
+ ## Workflow Creation Checklist
121
+
122
+ When building ANY workflow, follow this checklist:
123
+
124
+ ### Planning Phase
125
+ - [ ] Identify the pattern (webhook, API, database, AI, scheduled)
126
+ - [ ] List required nodes
127
+ - [ ] Understand data flow (input → transform → output)
128
+ - [ ] Plan error handling strategy
129
+
130
+ ### Implementation Phase
131
+ - [ ] Build complete workflow JSON with appropriate trigger
132
+ - [ ] Add data source nodes
133
+ - [ ] Reference credentials by name (user connects them after import)
134
+ - [ ] Add transformation nodes (Set, Code, IF)
135
+ - [ ] Add output/action nodes
136
+ - [ ] Configure error handling
137
+
138
+ ### Import & Validation Phase
139
+ - [ ] User imports JSON via n8n UI (Workflow menu → Import from File / Import from Clipboard)
140
+ - [ ] Open each node in the editor and fix any warnings
141
+ - [ ] Connect credentials
142
+ - [ ] Execute with sample data and inspect each node's output
143
+ - [ ] Handle edge cases (empty data, errors)
144
+
145
+ ### Deployment Phase
146
+ - [ ] Review workflow settings (execution order, timeout, error handling)
147
+ - [ ] Activate workflow (toggle in the n8n editor)
148
+ - [ ] Monitor first executions
149
+ - [ ] Document workflow purpose and data flow
150
+
151
+ ---
152
+
153
+ ## Data Flow Patterns
154
+
155
+ ### Linear Flow
156
+ ```
157
+ Trigger → Transform → Action → End
158
+ ```
159
+ **Use when**: Simple workflows with single path
160
+
161
+ ### Branching Flow
162
+ ```
163
+ Trigger → IF → [True Path]
164
+ └→ [False Path]
165
+ ```
166
+ **Use when**: Different actions based on conditions
167
+
168
+ ### Parallel Processing
169
+ ```
170
+ Trigger → [Branch 1] → Merge
171
+ └→ [Branch 2] ↗
172
+ ```
173
+ **Use when**: Independent operations that can run simultaneously
174
+
175
+ ### Loop Pattern
176
+ ```
177
+ Trigger → Split in Batches → Process → Loop (until done)
178
+ ```
179
+ **Use when**: Processing large datasets in chunks
180
+
181
+ ### Error Handler Pattern
182
+ ```
183
+ Main Flow → [Success Path]
184
+ └→ [Error Trigger → Error Handler]
185
+ ```
186
+ **Use when**: Need separate error handling workflow
187
+
188
+ ---
189
+
190
+ ## Common Gotchas
191
+
192
+ ### 1. Webhook Data Structure
193
+ **Problem**: Can't access webhook payload data
194
+
195
+ **Solution**: Data is nested under `$json.body`
196
+ ```javascript
197
+ ❌ {{$json.email}}
198
+ ✅ {{$json.body.email}}
199
+ ```
200
+ See: n8n Expression Syntax skill
201
+
202
+ ### 2. Multiple Input Items
203
+ **Problem**: Node processes all input items, but I only want one
204
+
205
+ **Solution**: Use "Execute Once" mode or process first item only
206
+ ```javascript
207
+ {{$json[0].field}} // First item only
208
+ ```
209
+
210
+ ### 3. Authentication Issues
211
+ **Problem**: API calls failing with 401/403
212
+
213
+ **Solution**:
214
+ - Configure credentials properly
215
+ - Use the "Credentials" section, not parameters
216
+ - Test credentials before workflow activation
217
+
218
+ ### 4. Node Execution Order
219
+ **Problem**: Nodes executing in unexpected order
220
+
221
+ **Solution**: Check workflow settings → Execution Order
222
+ - v0: Top-to-bottom (legacy)
223
+ - v1: Connection-based (recommended)
224
+
225
+ ### 5. Expression Errors
226
+ **Problem**: Expressions showing as literal text
227
+
228
+ **Solution**: Use {{}} around expressions
229
+ - See n8n Expression Syntax skill for details
230
+
231
+ ---
232
+
233
+ ## Integration with Other Skills
234
+
235
+ These skills work together with Workflow Patterns:
236
+
237
+ **n8n Expression Syntax** - Use to:
238
+ - Write expressions in transformation nodes
239
+ - Access webhook data correctly ({{$json.body.field}})
240
+ - Reference previous nodes ({{$node["Node Name"].json.field}})
241
+
242
+ **n8n Node Configuration** - Use to:
243
+ - Configure specific operations for pattern nodes
244
+ - Understand node-specific requirements
245
+
246
+ **n8n Validation Expert** - Use to:
247
+ - Validate workflow structure
248
+ - Fix validation errors
249
+ - Ensure workflow correctness before deployment
250
+
251
+ ---
252
+
253
+ ## Pattern Statistics
254
+
255
+ Common workflow patterns:
256
+
257
+ **Most Common Triggers**:
258
+ 1. Webhook - 35%
259
+ 2. Schedule (periodic tasks) - 28%
260
+ 3. Manual (testing/admin) - 22%
261
+ 4. Service triggers (Slack, email, etc.) - 15%
262
+
263
+ **Most Common Transformations**:
264
+ 1. Set (field mapping) - 68%
265
+ 2. Code (custom logic) - 42%
266
+ 3. IF (conditional routing) - 38%
267
+ 4. Switch (multi-condition) - 18%
268
+
269
+ **Most Common Outputs**:
270
+ 1. HTTP Request (APIs) - 45%
271
+ 2. Slack - 32%
272
+ 3. Database writes - 28%
273
+ 4. Email - 24%
274
+
275
+ **Average Workflow Complexity**:
276
+ - Simple (3-5 nodes): 42%
277
+ - Medium (6-10 nodes): 38%
278
+ - Complex (11+ nodes): 20%
279
+
280
+ ---
281
+
282
+ ## Quick Start Examples
283
+
284
+ ### Example 1: Simple Webhook → Slack
285
+ ```
286
+ 1. Webhook (path: "form-submit", POST)
287
+ 2. Set (map form fields)
288
+ 3. Slack (post message to #notifications)
289
+ ```
290
+
291
+ ### Example 2: Scheduled Report
292
+ ```
293
+ 1. Schedule (daily at 9 AM)
294
+ 2. HTTP Request (fetch analytics)
295
+ 3. Code (aggregate data)
296
+ 4. Email (send formatted report)
297
+ 5. Error Trigger → Slack (notify on failure)
298
+ ```
299
+
300
+ ### Example 3: Database Sync
301
+ ```
302
+ 1. Schedule (every 15 minutes)
303
+ 2. Postgres (query new records)
304
+ 3. IF (check if records exist)
305
+ 4. MySQL (insert records)
306
+ 5. Postgres (update sync timestamp)
307
+ ```
308
+
309
+ ### Example 4: AI Assistant
310
+ ```
311
+ 1. Webhook (receive chat message)
312
+ 2. AI Agent
313
+ ├─ OpenAI Chat Model (ai_languageModel)
314
+ ├─ HTTP Request Tool (ai_tool)
315
+ ├─ Database Tool (ai_tool)
316
+ └─ Window Buffer Memory (ai_memory)
317
+ 3. Webhook Response (send AI reply)
318
+ ```
319
+
320
+ ### Example 5: API Integration
321
+ ```
322
+ 1. Manual Trigger (for testing)
323
+ 2. HTTP Request (GET /api/users)
324
+ 3. Split In Batches (process 100 at a time)
325
+ 4. Set (transform user data)
326
+ 5. Postgres (upsert users)
327
+ 6. Loop (back to step 3 until done)
328
+ ```
329
+
330
+ ---
331
+
332
+ ## Detailed Pattern Files
333
+
334
+ For comprehensive guidance on each pattern:
335
+
336
+ - **[webhook_processing.md](webhook_processing.md)** - Webhook patterns, data structure, response handling
337
+ - **[http_api_integration.md](http_api_integration.md)** - REST APIs, authentication, pagination, retries
338
+ - **[database_operations.md](database_operations.md)** - Queries, sync, transactions, batch processing
339
+ - **[ai_agent_workflow.md](ai_agent_workflow.md)** - AI agents, tools, memory, langchain nodes
340
+ - **[scheduled_tasks.md](scheduled_tasks.md)** - Cron schedules, reports, maintenance tasks
341
+
342
+ ---
343
+
344
+ ## Real Template Examples
345
+
346
+ From n8n template library:
347
+
348
+ **Template #2947**: Weather to Slack
349
+ - Pattern: Scheduled Task
350
+ - Nodes: Schedule → HTTP Request (weather API) → Set → Slack
351
+ - Complexity: Simple (4 nodes)
352
+
353
+ **Webhook Processing**: Most common pattern
354
+ - Most common: Form submissions, payment webhooks, chat integrations
355
+
356
+ **HTTP API**: Common pattern
357
+ - Most common: Data fetching, third-party integrations
358
+
359
+ **Database Operations**: Common pattern
360
+ - Most common: ETL, data sync, backup workflows
361
+
362
+ **AI Agents**: Growing in usage
363
+ - Most common: Chatbots, content generation, data analysis
364
+
365
+ Browse the n8n template library (n8n.io/workflows) to find examples!
366
+
367
+ ---
368
+
369
+ ## Best Practices
370
+
371
+ ### ✅ Do
372
+
373
+ - Start with the simplest pattern that solves your problem
374
+ - Plan your workflow structure before building
375
+ - Use error handling on all workflows
376
+ - Test with sample data before activation
377
+ - Follow the workflow creation checklist
378
+ - Use descriptive node names
379
+ - Document complex workflows (notes field)
380
+ - Monitor workflow executions after deployment
381
+
382
+ ### ❌ Don't
383
+
384
+ - Build workflows in one shot (iterate! avg 56s between edits)
385
+ - Skip validation before activation
386
+ - Ignore error scenarios
387
+ - Use complex patterns when simple ones suffice
388
+ - Hardcode credentials in parameters
389
+ - Forget to handle empty data cases
390
+ - Mix multiple patterns without clear boundaries
391
+ - Deploy without testing
392
+
393
+ ---
394
+
395
+ ## Summary
396
+
397
+ **Key Points**:
398
+ 1. **5 core patterns** cover 90%+ of workflow use cases
399
+ 2. **Webhook processing** is the most common pattern
400
+ 3. Use the **workflow creation checklist** for every workflow
401
+ 4. **Plan pattern** → **Select nodes** → **Build JSON** → **Import** → **Test**
402
+ 5. Integrate with other skills for complete workflow development
403
+
404
+ **Next Steps**:
405
+ 1. Identify your use case pattern
406
+ 2. Read the detailed pattern file
407
+ 3. Follow the workflow creation checklist
408
+ 4. Produce complete workflow JSON for the user to import and test
409
+
410
+ **Related Skills**:
411
+ - n8n Expression Syntax - Write expressions correctly
412
+ - n8n Validation Expert - Validate and fix errors
413
+ - n8n Node Configuration - Configure specific operations