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,393 @@
1
+ # Common n8n Expression Mistakes
2
+
3
+ Complete catalog of expression errors with explanations and fixes.
4
+
5
+ ---
6
+
7
+ ## 1. Missing Curly Braces
8
+
9
+ **Problem**: Expression not recognized, shows as literal text
10
+
11
+ ❌ **Wrong**:
12
+ ```
13
+ $json.email
14
+ ```
15
+
16
+ ✅ **Correct**:
17
+ ```
18
+ {{$json.email}}
19
+ ```
20
+
21
+ **Why it fails**: n8n treats text without {{ }} as a literal string. Expressions must be wrapped to be evaluated.
22
+
23
+ **How to identify**: Field shows exact text like "$json.email" instead of actual value.
24
+
25
+ ---
26
+
27
+ ## 2. Webhook Body Access
28
+
29
+ **Problem**: Undefined values when accessing webhook data
30
+
31
+ ❌ **Wrong**:
32
+ ```
33
+ {{$json.name}}
34
+ {{$json.email}}
35
+ {{$json.message}}
36
+ ```
37
+
38
+ ✅ **Correct**:
39
+ ```
40
+ {{$json.body.name}}
41
+ {{$json.body.email}}
42
+ {{$json.body.message}}
43
+ ```
44
+
45
+ **Why it fails**: Webhook node wraps incoming data under `.body` property. The root `$json` contains headers, params, query, and body.
46
+
47
+ **Webhook structure**:
48
+ ```javascript
49
+ {
50
+ "headers": {...},
51
+ "params": {...},
52
+ "query": {...},
53
+ "body": { // User data is HERE!
54
+ "name": "John",
55
+ "email": "john@example.com"
56
+ }
57
+ }
58
+ ```
59
+
60
+ **How to identify**: Webhook workflow shows "undefined" for fields that are definitely being sent.
61
+
62
+ ---
63
+
64
+ ## 3. Spaces in Field Names
65
+
66
+ **Problem**: Syntax error or undefined value
67
+
68
+ ❌ **Wrong**:
69
+ ```
70
+ {{$json.first name}}
71
+ {{$json.user data.email}}
72
+ ```
73
+
74
+ ✅ **Correct**:
75
+ ```
76
+ {{$json['first name']}}
77
+ {{$json['user data'].email}}
78
+ ```
79
+
80
+ **Why it fails**: Spaces break dot notation. JavaScript interprets space as end of property name.
81
+
82
+ **How to identify**: Error message about unexpected token, or undefined when field exists.
83
+
84
+ ---
85
+
86
+ ## 4. Spaces in Node Names
87
+
88
+ **Problem**: Cannot access other node's data
89
+
90
+ ❌ **Wrong**:
91
+ ```
92
+ {{$node.HTTP Request.json.data}}
93
+ {{$node.Respond to Webhook.json}}
94
+ ```
95
+
96
+ ✅ **Correct**:
97
+ ```
98
+ {{$node["HTTP Request"].json.data}}
99
+ {{$node["Respond to Webhook"].json}}
100
+ ```
101
+
102
+ **Why it fails**: Node names are treated as object property names and need quotes when they contain spaces.
103
+
104
+ **How to identify**: Error like "Cannot read property 'Request' of undefined"
105
+
106
+ ---
107
+
108
+ ## 5. Incorrect Node Reference Case
109
+
110
+ **Problem**: Undefined or wrong data returned
111
+
112
+ ❌ **Wrong**:
113
+ ```
114
+ {{$node["http request"].json.data}} // lowercase
115
+ {{$node["Http Request"].json.data}} // wrong capitalization
116
+ ```
117
+
118
+ ✅ **Correct**:
119
+ ```
120
+ {{$node["HTTP Request"].json.data}} // exact match
121
+ ```
122
+
123
+ **Why it fails**: Node names are **case-sensitive**. Must match exactly as shown in workflow.
124
+
125
+ **How to identify**: Undefined value even though node exists and has data.
126
+
127
+ ---
128
+
129
+ ## 6. Double Wrapping
130
+
131
+ **Problem**: Literal {{ }} appears in output
132
+
133
+ ❌ **Wrong**:
134
+ ```
135
+ {{{$json.field}}}
136
+ ```
137
+
138
+ ✅ **Correct**:
139
+ ```
140
+ {{$json.field}}
141
+ ```
142
+
143
+ **Why it fails**: Only one set of {{ }} is needed. Extra braces are treated as literal characters.
144
+
145
+ **How to identify**: Output shows "{{value}}" instead of just "value".
146
+
147
+ ---
148
+
149
+ ## 7. Array Access with Dots
150
+
151
+ **Problem**: Syntax error or undefined
152
+
153
+ ❌ **Wrong**:
154
+ ```
155
+ {{$json.items.0.name}}
156
+ {{$json.users.1.email}}
157
+ ```
158
+
159
+ ✅ **Correct**:
160
+ ```
161
+ {{$json.items[0].name}}
162
+ {{$json.users[1].email}}
163
+ ```
164
+
165
+ **Why it fails**: Array indices require brackets, not dots. Number after dot is invalid JavaScript.
166
+
167
+ **How to identify**: Syntax error or "Cannot read property '0' of undefined"
168
+
169
+ ---
170
+
171
+ ## 8. Using Expressions in Code Nodes
172
+
173
+ **Problem**: Literal string instead of value, or errors
174
+
175
+ ❌ **Wrong (in Code node)**:
176
+ ```javascript
177
+ const email = '{{$json.email}}';
178
+ const name = '={{$json.body.name}}';
179
+ ```
180
+
181
+ ✅ **Correct (in Code node)**:
182
+ ```javascript
183
+ const email = $json.email;
184
+ const name = $json.body.name;
185
+
186
+ // Or using Code node API
187
+ const email = $input.item.json.email;
188
+ const allItems = $input.all();
189
+ ```
190
+
191
+ **Why it fails**: Code nodes have **direct access** to data. The {{ }} syntax is for expression fields in other nodes, not for JavaScript code.
192
+
193
+ **How to identify**: Literal string "{{$json.email}}" appears in Code node output instead of actual value.
194
+
195
+ ---
196
+
197
+ ## 9. Missing Quotes in $node Reference
198
+
199
+ **Problem**: Syntax error
200
+
201
+ ❌ **Wrong**:
202
+ ```
203
+ {{$node[HTTP Request].json.data}}
204
+ ```
205
+
206
+ ✅ **Correct**:
207
+ ```
208
+ {{$node["HTTP Request"].json.data}}
209
+ ```
210
+
211
+ **Why it fails**: Node names must be quoted strings inside brackets.
212
+
213
+ **How to identify**: Syntax error "Unexpected identifier"
214
+
215
+ ---
216
+
217
+ ## 10. Incorrect Property Path
218
+
219
+ **Problem**: Undefined value
220
+
221
+ ❌ **Wrong**:
222
+ ```
223
+ {{$json.data.items.name}} // items is an array
224
+ {{$json.user.email}} // user doesn't exist, it's userData
225
+ ```
226
+
227
+ ✅ **Correct**:
228
+ ```
229
+ {{$json.data.items[0].name}} // access array element
230
+ {{$json.userData.email}} // correct property name
231
+ ```
232
+
233
+ **Why it fails**: Wrong path to data. Arrays need index, property names must be exact.
234
+
235
+ **How to identify**: Check actual data structure using expression editor preview.
236
+
237
+ ---
238
+
239
+ ## 11. Using = Prefix Outside JSON
240
+
241
+ **Problem**: Literal "=" appears in output
242
+
243
+ ❌ **Wrong (in text field)**:
244
+ ```
245
+ Email: ={{$json.email}}
246
+ ```
247
+
248
+ ✅ **Correct (in text field)**:
249
+ ```
250
+ Email: {{$json.email}}
251
+ ```
252
+
253
+ **Note**: The `=` prefix is **only** needed in JSON mode or when you want to set entire field value to expression result:
254
+
255
+ ```javascript
256
+ // JSON mode (set property to expression)
257
+ {
258
+ "email": "={{$json.body.email}}"
259
+ }
260
+
261
+ // Text mode (no = needed)
262
+ Hello {{$json.body.name}}!
263
+ ```
264
+
265
+ **Why it fails**: The `=` is parsed as literal text in non-JSON contexts.
266
+
267
+ **How to identify**: Output shows "=john@example.com" instead of "john@example.com"
268
+
269
+ ---
270
+
271
+ ## 12. Expressions in Webhook Path
272
+
273
+ **Problem**: Path doesn't update, validation error
274
+
275
+ ❌ **Wrong**:
276
+ ```
277
+ path: "{{$json.user_id}}/webhook"
278
+ path: "users/={{$env.TENANT_ID}}"
279
+ ```
280
+
281
+ ✅ **Correct**:
282
+ ```
283
+ path: "my-webhook" // Static paths only
284
+ path: "user-webhook/:userId" // Use dynamic URL parameters instead
285
+ ```
286
+
287
+ **Why it fails**: Webhook paths must be static. Use dynamic URL parameters (`:paramName`) instead of expressions.
288
+
289
+ **How to identify**: Webhook path doesn't change or validation warns about invalid path.
290
+
291
+ ---
292
+
293
+ ## 13. Forgetting .json in $node Reference
294
+
295
+ **Problem**: Undefined or wrong data
296
+
297
+ ❌ **Wrong**:
298
+ ```
299
+ {{$node["HTTP Request"].data}} // Missing .json
300
+ {{$node["Webhook"].body.email}} // Missing .json
301
+ ```
302
+
303
+ ✅ **Correct**:
304
+ ```
305
+ {{$node["HTTP Request"].json.data}}
306
+ {{$node["Webhook"].json.body.email}}
307
+ ```
308
+
309
+ **Why it fails**: Node data is always under `.json` property (or `.binary` for binary data).
310
+
311
+ **How to identify**: Undefined value when you know the node has data.
312
+
313
+ ---
314
+
315
+ ## 14. String Concatenation Confusion
316
+
317
+ **Problem**: Attempting JavaScript template literals
318
+
319
+ ❌ **Wrong**:
320
+ ```
321
+ `Hello ${$json.name}!` // Template literal syntax
322
+ "Hello " + $json.name + "!" // String concatenation
323
+ ```
324
+
325
+ ✅ **Correct**:
326
+ ```
327
+ Hello {{$json.name}}! // n8n expressions auto-concatenate
328
+ ```
329
+
330
+ **Why it fails**: n8n expressions don't use JavaScript template literal syntax. Adjacent text and expressions are automatically concatenated.
331
+
332
+ **How to identify**: Literal backticks or + symbols appear in output.
333
+
334
+ ---
335
+
336
+ ## 15. Empty Expression Brackets
337
+
338
+ **Problem**: Literal {{}} in output
339
+
340
+ ❌ **Wrong**:
341
+ ```
342
+ {{}}
343
+ {{ }}
344
+ ```
345
+
346
+ ✅ **Correct**:
347
+ ```
348
+ {{$json.field}} // Include expression content
349
+ ```
350
+
351
+ **Why it fails**: Empty expression brackets have nothing to evaluate.
352
+
353
+ **How to identify**: Literal "{{ }}" text appears in output.
354
+
355
+ ---
356
+
357
+ ## Quick Reference Table
358
+
359
+ | Error | Symptom | Fix |
360
+ |-------|---------|-----|
361
+ | No {{ }} | Literal text | Add {{ }} |
362
+ | Webhook data | Undefined | Add `.body` |
363
+ | Space in field | Syntax error | Use `['field name']` |
364
+ | Space in node | Undefined | Use `["Node Name"]` |
365
+ | Wrong case | Undefined | Match exact case |
366
+ | Double {{ }} | Literal braces | Remove extra {{ }} |
367
+ | .0 array | Syntax error | Use [0] |
368
+ | {{ }} in Code | Literal string | Remove {{ }} |
369
+ | No quotes in $node | Syntax error | Add quotes |
370
+ | Wrong path | Undefined | Check data structure |
371
+ | = in text | Literal = | Remove = prefix |
372
+ | Dynamic path | Doesn't work | Use static path |
373
+ | Missing .json | Undefined | Add .json |
374
+ | Template literals | Literal text | Use {{ }} |
375
+ | Empty {{ }} | Literal braces | Add expression |
376
+
377
+ ---
378
+
379
+ ## Debugging Process
380
+
381
+ When expression doesn't work:
382
+
383
+ 1. **Check braces**: Is it wrapped in {{ }}?
384
+ 2. **Check data source**: Is it webhook data? Add `.body`
385
+ 3. **Check spaces**: Field or node name has spaces? Use brackets
386
+ 4. **Check case**: Does node name match exactly?
387
+ 5. **Check path**: Is the property path correct?
388
+ 6. **Use expression editor**: Preview shows actual result
389
+ 7. **Check context**: Is it a Code node? Remove {{ }}
390
+
391
+ ---
392
+
393
+ **Related**: See [EXAMPLES.md](EXAMPLES.md) for working examples of correct syntax.