bps-kit 1.2.2 → 1.3.1

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 (51) hide show
  1. package/.bps-kit.json +4 -4
  2. package/README.md +3 -0
  3. package/implementation_plan.md.resolved +37 -0
  4. package/package.json +2 -2
  5. package/templates/agents-template/ARCHITECTURE.md +21 -9
  6. package/templates/agents-template/agents/automation-specialist.md +157 -0
  7. package/templates/agents-template/rules/GEMINI.md +2 -10
  8. package/templates/agents-template/workflows/automate.md +153 -0
  9. package/templates/skills_normal/n8n-code-javascript/BUILTIN_FUNCTIONS.md +764 -0
  10. package/templates/skills_normal/n8n-code-javascript/COMMON_PATTERNS.md +1110 -0
  11. package/templates/skills_normal/n8n-code-javascript/DATA_ACCESS.md +782 -0
  12. package/templates/skills_normal/n8n-code-javascript/ERROR_PATTERNS.md +763 -0
  13. package/templates/skills_normal/n8n-code-javascript/README.md +350 -0
  14. package/templates/skills_normal/n8n-code-javascript/SKILL.md +699 -0
  15. package/templates/skills_normal/n8n-code-python/COMMON_PATTERNS.md +794 -0
  16. package/templates/skills_normal/n8n-code-python/DATA_ACCESS.md +702 -0
  17. package/templates/skills_normal/n8n-code-python/ERROR_PATTERNS.md +601 -0
  18. package/templates/skills_normal/n8n-code-python/README.md +386 -0
  19. package/templates/skills_normal/n8n-code-python/SKILL.md +748 -0
  20. package/templates/skills_normal/n8n-code-python/STANDARD_LIBRARY.md +974 -0
  21. package/templates/skills_normal/n8n-expression-syntax/COMMON_MISTAKES.md +393 -0
  22. package/templates/skills_normal/n8n-expression-syntax/EXAMPLES.md +483 -0
  23. package/templates/skills_normal/n8n-expression-syntax/README.md +93 -0
  24. package/templates/skills_normal/n8n-expression-syntax/SKILL.md +516 -0
  25. package/templates/skills_normal/n8n-mcp-tools-expert/README.md +99 -0
  26. package/templates/skills_normal/n8n-mcp-tools-expert/SEARCH_GUIDE.md +374 -0
  27. package/templates/skills_normal/n8n-mcp-tools-expert/SKILL.md +642 -0
  28. package/templates/skills_normal/n8n-mcp-tools-expert/VALIDATION_GUIDE.md +442 -0
  29. package/templates/skills_normal/n8n-mcp-tools-expert/WORKFLOW_GUIDE.md +618 -0
  30. package/templates/skills_normal/n8n-node-configuration/DEPENDENCIES.md +789 -0
  31. package/templates/skills_normal/n8n-node-configuration/OPERATION_PATTERNS.md +913 -0
  32. package/templates/skills_normal/n8n-node-configuration/README.md +364 -0
  33. package/templates/skills_normal/n8n-node-configuration/SKILL.md +785 -0
  34. package/templates/skills_normal/n8n-validation-expert/ERROR_CATALOG.md +943 -0
  35. package/templates/skills_normal/n8n-validation-expert/FALSE_POSITIVES.md +720 -0
  36. package/templates/skills_normal/n8n-validation-expert/README.md +290 -0
  37. package/templates/skills_normal/n8n-validation-expert/SKILL.md +689 -0
  38. package/templates/skills_normal/n8n-workflow-patterns/README.md +251 -0
  39. package/templates/skills_normal/n8n-workflow-patterns/SKILL.md +411 -0
  40. package/templates/skills_normal/n8n-workflow-patterns/ai_agent_workflow.md +784 -0
  41. package/templates/skills_normal/n8n-workflow-patterns/database_operations.md +785 -0
  42. package/templates/skills_normal/n8n-workflow-patterns/http_api_integration.md +734 -0
  43. package/templates/skills_normal/n8n-workflow-patterns/scheduled_tasks.md +773 -0
  44. package/templates/skills_normal/n8n-workflow-patterns/webhook_processing.md +545 -0
  45. package/templates/vault/n8n-code-javascript/SKILL.md +10 -10
  46. package/templates/vault/n8n-code-python/SKILL.md +11 -11
  47. package/templates/vault/n8n-expression-syntax/SKILL.md +4 -4
  48. package/templates/vault/n8n-mcp-tools-expert/SKILL.md +9 -9
  49. package/templates/vault/n8n-node-configuration/SKILL.md +2 -2
  50. package/templates/vault/n8n-validation-expert/SKILL.md +3 -3
  51. package/templates/vault/n8n-workflow-patterns/SKILL.md +11 -11
@@ -0,0 +1,251 @@
1
+ # n8n Workflow Patterns
2
+
3
+ Proven architectural patterns for building n8n workflows.
4
+
5
+ ---
6
+
7
+ ## Purpose
8
+
9
+ Teaches architectural patterns for building n8n workflows. Provides structure, best practices, and proven approaches for common use cases.
10
+
11
+ ## Activates On
12
+
13
+ - build workflow
14
+ - workflow pattern
15
+ - workflow architecture
16
+ - workflow structure
17
+ - webhook processing
18
+ - http api
19
+ - api integration
20
+ - database sync
21
+ - ai agent
22
+ - chatbot
23
+ - scheduled task
24
+ - automation pattern
25
+
26
+ ## File Count
27
+
28
+ 7 files, ~3,700 lines total
29
+
30
+ ## Priority
31
+
32
+ **HIGH** - Addresses 813 webhook searches (most common use case)
33
+
34
+ ## Dependencies
35
+
36
+ **n8n-mcp tools**:
37
+ - search_nodes (find nodes for patterns)
38
+ - get_node (understand node operations)
39
+ - search_templates (find example workflows)
40
+ - ai_agents_guide (AI pattern guidance)
41
+
42
+ **Related skills**:
43
+ - n8n MCP Tools Expert (find and configure nodes)
44
+ - n8n Expression Syntax (write expressions in patterns)
45
+ - n8n Node Configuration (configure pattern nodes)
46
+ - n8n Validation Expert (validate pattern implementations)
47
+
48
+ ## Coverage
49
+
50
+ ### The 5 Core Patterns
51
+
52
+ 1. **Webhook Processing** (Most Common - 813 searches)
53
+ - Receive HTTP requests → Process → Respond
54
+ - Critical gotcha: Data under $json.body
55
+ - Authentication, validation, error handling
56
+
57
+ 2. **HTTP API Integration** (892 templates)
58
+ - Fetch from REST APIs → Transform → Store/Use
59
+ - Authentication methods, pagination, rate limiting
60
+ - Error handling and retries
61
+
62
+ 3. **Database Operations** (456 templates)
63
+ - Read/Write/Sync database data
64
+ - Batch processing, transactions, performance
65
+ - Security: parameterized queries, read-only access
66
+
67
+ 4. **AI Agent Workflow** (234 templates, 270 AI nodes)
68
+ - AI agents with tool access and memory
69
+ - 8 AI connection types
70
+ - ANY node can be an AI tool
71
+
72
+ 5. **Scheduled Tasks** (28% of all workflows)
73
+ - Recurring automation workflows
74
+ - Cron schedules, timezone handling
75
+ - Monitoring and error handling
76
+
77
+ ### Cross-Cutting Concerns
78
+
79
+ - Data flow patterns (linear, branching, parallel, loops)
80
+ - Error handling strategies
81
+ - Performance optimization
82
+ - Security best practices
83
+ - Testing approaches
84
+ - Monitoring and logging
85
+
86
+ ## Evaluations
87
+
88
+ 5 scenarios (100% coverage expected):
89
+ 1. **eval-001**: Webhook workflow structure
90
+ 2. **eval-002**: HTTP API integration pattern
91
+ 3. **eval-003**: Database sync pattern
92
+ 4. **eval-004**: AI agent workflow with tools
93
+ 5. **eval-005**: Scheduled report generation
94
+
95
+ ## Key Features
96
+
97
+ ✅ **5 Proven Patterns**: Webhook, HTTP API, Database, AI Agent, Scheduled tasks
98
+ ✅ **Complete Examples**: Working workflow configurations for each pattern
99
+ ✅ **Best Practices**: Proven approaches from real-world n8n usage
100
+ ✅ **Common Gotchas**: Documented mistakes and their fixes
101
+ ✅ **Integration Guide**: How patterns work with other skills
102
+ ✅ **Template Examples**: Real examples from 2,653+ n8n templates
103
+
104
+ ## Files
105
+
106
+ - **SKILL.md** (486 lines) - Pattern overview, selection guide, checklist
107
+ - **webhook_processing.md** (554 lines) - Webhook patterns, data structure, auth
108
+ - **http_api_integration.md** (763 lines) - REST APIs, pagination, rate limiting
109
+ - **database_operations.md** (854 lines) - DB operations, batch processing, security
110
+ - **ai_agent_workflow.md** (918 lines) - AI agents, tools, memory, 8 connection types
111
+ - **scheduled_tasks.md** (845 lines) - Cron schedules, timezone, monitoring
112
+ - **README.md** (this file) - Skill metadata
113
+
114
+ ## Success Metrics
115
+
116
+ **Expected outcomes**:
117
+ - Users select appropriate pattern for their use case
118
+ - Workflows follow proven structural patterns
119
+ - Common gotchas avoided (webhook $json.body, SQL injection, etc.)
120
+ - Proper error handling implemented
121
+ - Security best practices followed
122
+
123
+ ## Pattern Selection Stats
124
+
125
+ Common workflow composition:
126
+
127
+ **Trigger Distribution**:
128
+ - Webhook: 35% (most common)
129
+ - Schedule: 28%
130
+ - Manual: 22%
131
+ - Service triggers: 15%
132
+
133
+ **Transformation Nodes**:
134
+ - Set: 68%
135
+ - Code: 42%
136
+ - IF: 38%
137
+ - Switch: 18%
138
+
139
+ **Output Channels**:
140
+ - HTTP Request: 45%
141
+ - Slack: 32%
142
+ - Database: 28%
143
+ - Email: 24%
144
+
145
+ **Complexity**:
146
+ - Simple (3-5 nodes): 42%
147
+ - Medium (6-10 nodes): 38%
148
+ - Complex (11+ nodes): 20%
149
+
150
+ ## Critical Insights
151
+
152
+ **Webhook Processing**:
153
+ - 813 searches (most common use case!)
154
+ - #1 gotcha: Data under $json.body (not $json directly)
155
+ - Must choose response mode: onReceived vs lastNode
156
+
157
+ **API Integration**:
158
+ - Authentication via credentials (never hardcode!)
159
+ - Pagination essential for large datasets
160
+ - Rate limiting prevents API bans
161
+ - continueOnFail: true for error handling
162
+
163
+ **Database Operations**:
164
+ - Always use parameterized queries (SQL injection prevention)
165
+ - Batch processing for large datasets
166
+ - Read-only access for AI tools
167
+ - Transaction handling for multi-step operations
168
+
169
+ **AI Agents**:
170
+ - 8 AI connection types (ai_languageModel, ai_tool, ai_memory, etc.)
171
+ - ANY node can be an AI tool (connect to ai_tool port)
172
+ - Memory essential for conversations (Window Buffer recommended)
173
+ - Tool descriptions critical (AI uses them to decide when to call)
174
+
175
+ **Scheduled Tasks**:
176
+ - Set workflow timezone explicitly (DST handling)
177
+ - Prevent overlapping executions (use locks)
178
+ - Error Trigger workflow for alerts
179
+ - Batch processing for large data
180
+
181
+ ## Workflow Creation Checklist
182
+
183
+ Every pattern follows this checklist:
184
+
185
+ ### Planning Phase
186
+ - [ ] Identify the pattern (webhook, API, database, AI, scheduled)
187
+ - [ ] List required nodes (use search_nodes)
188
+ - [ ] Understand data flow (input → transform → output)
189
+ - [ ] Plan error handling strategy
190
+
191
+ ### Implementation Phase
192
+ - [ ] Create workflow with appropriate trigger
193
+ - [ ] Add data source nodes
194
+ - [ ] Configure authentication/credentials
195
+ - [ ] Add transformation nodes (Set, Code, IF)
196
+ - [ ] Add output/action nodes
197
+ - [ ] Configure error handling
198
+
199
+ ### Validation Phase
200
+ - [ ] Validate each node configuration
201
+ - [ ] Validate complete workflow
202
+ - [ ] Test with sample data
203
+ - [ ] Handle edge cases
204
+
205
+ ### Deployment Phase
206
+ - [ ] Review workflow settings
207
+ - [ ] Activate workflow
208
+ - [ ] Monitor first executions
209
+ - [ ] Document workflow
210
+
211
+ ## Real Template Examples
212
+
213
+ **Weather to Slack** (Template #2947):
214
+ ```
215
+ Schedule (daily 8 AM) → HTTP Request (weather) → Set → Slack
216
+ ```
217
+
218
+ **Webhook Processing**: 1,085 templates
219
+ **HTTP API Integration**: 892 templates
220
+ **Database Operations**: 456 templates
221
+ **AI Workflows**: 234 templates
222
+
223
+ Use `search_templates` to find examples for your use case!
224
+
225
+ ## Integration with Other Skills
226
+
227
+ **Pattern Selection** (this skill):
228
+ 1. Identify use case
229
+ 2. Select appropriate pattern
230
+ 3. Follow pattern structure
231
+
232
+ **Node Discovery** (n8n MCP Tools Expert):
233
+ 4. Find nodes for pattern (search_nodes)
234
+ 5. Understand node operations (get_node)
235
+
236
+ **Implementation** (n8n Expression Syntax + Node Configuration):
237
+ 6. Write expressions ({{$json.body.field}})
238
+ 7. Configure nodes properly
239
+
240
+ **Validation** (n8n Validation Expert):
241
+ 8. Validate workflow structure
242
+ 9. Fix validation errors
243
+
244
+ ## Last Updated
245
+
246
+ 2025-10-20
247
+
248
+ ---
249
+
250
+ **Part of**: n8n-skills repository
251
+ **Conceived by**: Romuald Członkowski - [www.aiadvisors.pl/en](https://www.aiadvisors.pl/en)
@@ -0,0 +1,411 @@
1
+ ---
2
+ name: n8n-workflow-patterns
3
+ description: Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, or scheduled tasks.
4
+ ---
5
+
6
+ # n8n Workflow Patterns
7
+
8
+ Proven architectural patterns for building n8n workflows.
9
+
10
+ ---
11
+
12
+ ## The 5 Core Patterns
13
+
14
+ Based on analysis of real workflow usage:
15
+
16
+ 1. **[Webhook Processing](webhook_processing.md)** (Most Common)
17
+ - Receive HTTP requests → Process → Output
18
+ - Pattern: Webhook → Validate → Transform → Respond/Notify
19
+
20
+ 2. **[HTTP API Integration](http_api_integration.md)**
21
+ - Fetch from REST APIs → Transform → Store/Use
22
+ - Pattern: Trigger → HTTP Request → Transform → Action → Error Handler
23
+
24
+ 3. **[Database Operations](database_operations.md)**
25
+ - Read/Write/Sync database data
26
+ - Pattern: Schedule → Query → Transform → Write → Verify
27
+
28
+ 4. **[AI Agent Workflow](ai_agent_workflow.md)**
29
+ - AI agents with tools and memory
30
+ - Pattern: Trigger → AI Agent (Model + Tools + Memory) → Output
31
+
32
+ 5. **[Scheduled Tasks](scheduled_tasks.md)**
33
+ - Recurring automation workflows
34
+ - Pattern: Schedule → Fetch → Process → Deliver → Log
35
+
36
+ ---
37
+
38
+ ## Pattern Selection Guide
39
+
40
+ ### When to use each pattern:
41
+
42
+ **Webhook Processing** - Use when:
43
+ - Receiving data from external systems
44
+ - Building integrations (Slack commands, form submissions, GitHub webhooks)
45
+ - Need instant response to events
46
+ - Example: "Receive Stripe payment webhook → Update database → Send confirmation"
47
+
48
+ **HTTP API Integration** - Use when:
49
+ - Fetching data from external APIs
50
+ - Synchronizing with third-party services
51
+ - Building data pipelines
52
+ - Example: "Fetch GitHub issues → Transform → Create Jira tickets"
53
+
54
+ **Database Operations** - Use when:
55
+ - Syncing between databases
56
+ - Running database queries on schedule
57
+ - ETL workflows
58
+ - Example: "Read Postgres records → Transform → Write to MySQL"
59
+
60
+ **AI Agent Workflow** - Use when:
61
+ - Building conversational AI
62
+ - Need AI with tool access
63
+ - Multi-step reasoning tasks
64
+ - Example: "Chat with AI that can search docs, query database, send emails"
65
+
66
+ **Scheduled Tasks** - Use when:
67
+ - Recurring reports or summaries
68
+ - Periodic data fetching
69
+ - Maintenance tasks
70
+ - Example: "Daily: Fetch analytics → Generate report → Email team"
71
+
72
+ ---
73
+
74
+ ## Common Workflow Components
75
+
76
+ All patterns share these building blocks:
77
+
78
+ ### 1. Triggers
79
+ - **Webhook** - HTTP endpoint (instant)
80
+ - **Schedule** - Cron-based timing (periodic)
81
+ - **Manual** - Click to execute (testing)
82
+ - **Polling** - Check for changes (intervals)
83
+
84
+ ### 2. Data Sources
85
+ - **HTTP Request** - REST APIs
86
+ - **Database nodes** - Postgres, MySQL, MongoDB
87
+ - **Service nodes** - Slack, Google Sheets, etc.
88
+ - **Code** - Custom JavaScript/Python
89
+
90
+ ### 3. Transformation
91
+ - **Set** - Map/transform fields
92
+ - **Code** - Complex logic
93
+ - **IF/Switch** - Conditional routing
94
+ - **Merge** - Combine data streams
95
+
96
+ ### 4. Outputs
97
+ - **HTTP Request** - Call APIs
98
+ - **Database** - Write data
99
+ - **Communication** - Email, Slack, Discord
100
+ - **Storage** - Files, cloud storage
101
+
102
+ ### 5. Error Handling
103
+ - **Error Trigger** - Catch workflow errors
104
+ - **IF** - Check for error conditions
105
+ - **Stop and Error** - Explicit failure
106
+ - **Continue On Fail** - Per-node setting
107
+
108
+ ---
109
+
110
+ ## Workflow Creation Checklist
111
+
112
+ When building ANY workflow, follow this checklist:
113
+
114
+ ### Planning Phase
115
+ - [ ] Identify the pattern (webhook, API, database, AI, scheduled)
116
+ - [ ] List required nodes (use search_nodes)
117
+ - [ ] Understand data flow (input → transform → output)
118
+ - [ ] Plan error handling strategy
119
+
120
+ ### Implementation Phase
121
+ - [ ] Create workflow with appropriate trigger
122
+ - [ ] Add data source nodes
123
+ - [ ] Configure authentication/credentials
124
+ - [ ] Add transformation nodes (Set, Code, IF)
125
+ - [ ] Add output/action nodes
126
+ - [ ] Configure error handling
127
+
128
+ ### Validation Phase
129
+ - [ ] Validate each node configuration (validate_node)
130
+ - [ ] Validate complete workflow (validate_workflow)
131
+ - [ ] Test with sample data
132
+ - [ ] Handle edge cases (empty data, errors)
133
+
134
+ ### Deployment Phase
135
+ - [ ] Review workflow settings (execution order, timeout, error handling)
136
+ - [ ] Activate workflow using `activateWorkflow` operation
137
+ - [ ] Monitor first executions
138
+ - [ ] Document workflow purpose and data flow
139
+
140
+ ---
141
+
142
+ ## Data Flow Patterns
143
+
144
+ ### Linear Flow
145
+ ```
146
+ Trigger → Transform → Action → End
147
+ ```
148
+ **Use when**: Simple workflows with single path
149
+
150
+ ### Branching Flow
151
+ ```
152
+ Trigger → IF → [True Path]
153
+ └→ [False Path]
154
+ ```
155
+ **Use when**: Different actions based on conditions
156
+
157
+ ### Parallel Processing
158
+ ```
159
+ Trigger → [Branch 1] → Merge
160
+ └→ [Branch 2] ↗
161
+ ```
162
+ **Use when**: Independent operations that can run simultaneously
163
+
164
+ ### Loop Pattern
165
+ ```
166
+ Trigger → Split in Batches → Process → Loop (until done)
167
+ ```
168
+ **Use when**: Processing large datasets in chunks
169
+
170
+ ### Error Handler Pattern
171
+ ```
172
+ Main Flow → [Success Path]
173
+ └→ [Error Trigger → Error Handler]
174
+ ```
175
+ **Use when**: Need separate error handling workflow
176
+
177
+ ---
178
+
179
+ ## Common Gotchas
180
+
181
+ ### 1. Webhook Data Structure
182
+ **Problem**: Can't access webhook payload data
183
+
184
+ **Solution**: Data is nested under `$json.body`
185
+ ```javascript
186
+ ❌ {{$json.email}}
187
+ ✅ {{$json.body.email}}
188
+ ```
189
+ See: n8n Expression Syntax skill
190
+
191
+ ### 2. Multiple Input Items
192
+ **Problem**: Node processes all input items, but I only want one
193
+
194
+ **Solution**: Use "Execute Once" mode or process first item only
195
+ ```javascript
196
+ {{$json[0].field}} // First item only
197
+ ```
198
+
199
+ ### 3. Authentication Issues
200
+ **Problem**: API calls failing with 401/403
201
+
202
+ **Solution**:
203
+ - Configure credentials properly
204
+ - Use the "Credentials" section, not parameters
205
+ - Test credentials before workflow activation
206
+
207
+ ### 4. Node Execution Order
208
+ **Problem**: Nodes executing in unexpected order
209
+
210
+ **Solution**: Check workflow settings → Execution Order
211
+ - v0: Top-to-bottom (legacy)
212
+ - v1: Connection-based (recommended)
213
+
214
+ ### 5. Expression Errors
215
+ **Problem**: Expressions showing as literal text
216
+
217
+ **Solution**: Use {{}} around expressions
218
+ - See n8n Expression Syntax skill for details
219
+
220
+ ---
221
+
222
+ ## Integration with Other Skills
223
+
224
+ These skills work together with Workflow Patterns:
225
+
226
+ **n8n MCP Tools Expert** - Use to:
227
+ - Find nodes for your pattern (search_nodes)
228
+ - Understand node operations (get_node)
229
+ - Create workflows (n8n_create_workflow)
230
+ - Deploy templates (n8n_deploy_template)
231
+ - Use ai_agents_guide for AI pattern guidance
232
+
233
+ **n8n Expression Syntax** - Use to:
234
+ - Write expressions in transformation nodes
235
+ - Access webhook data correctly ({{$json.body.field}})
236
+ - Reference previous nodes ({{$node["Node Name"].json.field}})
237
+
238
+ **n8n Node Configuration** - Use to:
239
+ - Configure specific operations for pattern nodes
240
+ - Understand node-specific requirements
241
+
242
+ **n8n Validation Expert** - Use to:
243
+ - Validate workflow structure
244
+ - Fix validation errors
245
+ - Ensure workflow correctness before deployment
246
+
247
+ ---
248
+
249
+ ## Pattern Statistics
250
+
251
+ Common workflow patterns:
252
+
253
+ **Most Common Triggers**:
254
+ 1. Webhook - 35%
255
+ 2. Schedule (periodic tasks) - 28%
256
+ 3. Manual (testing/admin) - 22%
257
+ 4. Service triggers (Slack, email, etc.) - 15%
258
+
259
+ **Most Common Transformations**:
260
+ 1. Set (field mapping) - 68%
261
+ 2. Code (custom logic) - 42%
262
+ 3. IF (conditional routing) - 38%
263
+ 4. Switch (multi-condition) - 18%
264
+
265
+ **Most Common Outputs**:
266
+ 1. HTTP Request (APIs) - 45%
267
+ 2. Slack - 32%
268
+ 3. Database writes - 28%
269
+ 4. Email - 24%
270
+
271
+ **Average Workflow Complexity**:
272
+ - Simple (3-5 nodes): 42%
273
+ - Medium (6-10 nodes): 38%
274
+ - Complex (11+ nodes): 20%
275
+
276
+ ---
277
+
278
+ ## Quick Start Examples
279
+
280
+ ### Example 1: Simple Webhook → Slack
281
+ ```
282
+ 1. Webhook (path: "form-submit", POST)
283
+ 2. Set (map form fields)
284
+ 3. Slack (post message to #notifications)
285
+ ```
286
+
287
+ ### Example 2: Scheduled Report
288
+ ```
289
+ 1. Schedule (daily at 9 AM)
290
+ 2. HTTP Request (fetch analytics)
291
+ 3. Code (aggregate data)
292
+ 4. Email (send formatted report)
293
+ 5. Error Trigger → Slack (notify on failure)
294
+ ```
295
+
296
+ ### Example 3: Database Sync
297
+ ```
298
+ 1. Schedule (every 15 minutes)
299
+ 2. Postgres (query new records)
300
+ 3. IF (check if records exist)
301
+ 4. MySQL (insert records)
302
+ 5. Postgres (update sync timestamp)
303
+ ```
304
+
305
+ ### Example 4: AI Assistant
306
+ ```
307
+ 1. Webhook (receive chat message)
308
+ 2. AI Agent
309
+ ├─ OpenAI Chat Model (ai_languageModel)
310
+ ├─ HTTP Request Tool (ai_tool)
311
+ ├─ Database Tool (ai_tool)
312
+ └─ Window Buffer Memory (ai_memory)
313
+ 3. Webhook Response (send AI reply)
314
+ ```
315
+
316
+ ### Example 5: API Integration
317
+ ```
318
+ 1. Manual Trigger (for testing)
319
+ 2. HTTP Request (GET /api/users)
320
+ 3. Split In Batches (process 100 at a time)
321
+ 4. Set (transform user data)
322
+ 5. Postgres (upsert users)
323
+ 6. Loop (back to step 3 until done)
324
+ ```
325
+
326
+ ---
327
+
328
+ ## Detailed Pattern Files
329
+
330
+ For comprehensive guidance on each pattern:
331
+
332
+ - **[webhook_processing.md](webhook_processing.md)** - Webhook patterns, data structure, response handling
333
+ - **[http_api_integration.md](http_api_integration.md)** - REST APIs, authentication, pagination, retries
334
+ - **[database_operations.md](database_operations.md)** - Queries, sync, transactions, batch processing
335
+ - **[ai_agent_workflow.md](ai_agent_workflow.md)** - AI agents, tools, memory, langchain nodes
336
+ - **[scheduled_tasks.md](scheduled_tasks.md)** - Cron schedules, reports, maintenance tasks
337
+
338
+ ---
339
+
340
+ ## Real Template Examples
341
+
342
+ From n8n template library:
343
+
344
+ **Template #2947**: Weather to Slack
345
+ - Pattern: Scheduled Task
346
+ - Nodes: Schedule → HTTP Request (weather API) → Set → Slack
347
+ - Complexity: Simple (4 nodes)
348
+
349
+ **Webhook Processing**: Most common pattern
350
+ - Most common: Form submissions, payment webhooks, chat integrations
351
+
352
+ **HTTP API**: Common pattern
353
+ - Most common: Data fetching, third-party integrations
354
+
355
+ **Database Operations**: Common pattern
356
+ - Most common: ETL, data sync, backup workflows
357
+
358
+ **AI Agents**: Growing in usage
359
+ - Most common: Chatbots, content generation, data analysis
360
+
361
+ Use `search_templates` and `get_template` from n8n-mcp tools to find examples!
362
+
363
+ ---
364
+
365
+ ## Best Practices
366
+
367
+ ### ✅ Do
368
+
369
+ - Start with the simplest pattern that solves your problem
370
+ - Plan your workflow structure before building
371
+ - Use error handling on all workflows
372
+ - Test with sample data before activation
373
+ - Follow the workflow creation checklist
374
+ - Use descriptive node names
375
+ - Document complex workflows (notes field)
376
+ - Monitor workflow executions after deployment
377
+
378
+ ### ❌ Don't
379
+
380
+ - Build workflows in one shot (iterate! avg 56s between edits)
381
+ - Skip validation before activation
382
+ - Ignore error scenarios
383
+ - Use complex patterns when simple ones suffice
384
+ - Hardcode credentials in parameters
385
+ - Forget to handle empty data cases
386
+ - Mix multiple patterns without clear boundaries
387
+ - Deploy without testing
388
+
389
+ ---
390
+
391
+ ## Summary
392
+
393
+ **Key Points**:
394
+ 1. **5 core patterns** cover 90%+ of workflow use cases
395
+ 2. **Webhook processing** is the most common pattern
396
+ 3. Use the **workflow creation checklist** for every workflow
397
+ 4. **Plan pattern** → **Select nodes** → **Build** → **Validate** → **Deploy**
398
+ 5. Integrate with other skills for complete workflow development
399
+
400
+ **Next Steps**:
401
+ 1. Identify your use case pattern
402
+ 2. Read the detailed pattern file
403
+ 3. Use n8n MCP Tools Expert to find nodes
404
+ 4. Follow the workflow creation checklist
405
+ 5. Use n8n Validation Expert to validate
406
+
407
+ **Related Skills**:
408
+ - n8n MCP Tools Expert - Find and configure nodes
409
+ - n8n Expression Syntax - Write expressions correctly
410
+ - n8n Validation Expert - Validate and fix errors
411
+ - n8n Node Configuration - Configure specific operations