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.
- package/.bps-kit.json +4 -4
- package/README.md +3 -0
- package/implementation_plan.md.resolved +37 -0
- package/package.json +2 -2
- package/templates/agents-template/ARCHITECTURE.md +21 -9
- package/templates/agents-template/agents/automation-specialist.md +157 -0
- package/templates/agents-template/rules/GEMINI.md +2 -10
- package/templates/agents-template/workflows/automate.md +153 -0
- package/templates/skills_normal/n8n-code-javascript/BUILTIN_FUNCTIONS.md +764 -0
- package/templates/skills_normal/n8n-code-javascript/COMMON_PATTERNS.md +1110 -0
- package/templates/skills_normal/n8n-code-javascript/DATA_ACCESS.md +782 -0
- package/templates/skills_normal/n8n-code-javascript/ERROR_PATTERNS.md +763 -0
- package/templates/skills_normal/n8n-code-javascript/README.md +350 -0
- package/templates/skills_normal/n8n-code-javascript/SKILL.md +699 -0
- package/templates/skills_normal/n8n-code-python/COMMON_PATTERNS.md +794 -0
- package/templates/skills_normal/n8n-code-python/DATA_ACCESS.md +702 -0
- package/templates/skills_normal/n8n-code-python/ERROR_PATTERNS.md +601 -0
- package/templates/skills_normal/n8n-code-python/README.md +386 -0
- package/templates/skills_normal/n8n-code-python/SKILL.md +748 -0
- package/templates/skills_normal/n8n-code-python/STANDARD_LIBRARY.md +974 -0
- package/templates/skills_normal/n8n-expression-syntax/COMMON_MISTAKES.md +393 -0
- package/templates/skills_normal/n8n-expression-syntax/EXAMPLES.md +483 -0
- package/templates/skills_normal/n8n-expression-syntax/README.md +93 -0
- package/templates/skills_normal/n8n-expression-syntax/SKILL.md +516 -0
- package/templates/skills_normal/n8n-mcp-tools-expert/README.md +99 -0
- package/templates/skills_normal/n8n-mcp-tools-expert/SEARCH_GUIDE.md +374 -0
- package/templates/skills_normal/n8n-mcp-tools-expert/SKILL.md +642 -0
- package/templates/skills_normal/n8n-mcp-tools-expert/VALIDATION_GUIDE.md +442 -0
- package/templates/skills_normal/n8n-mcp-tools-expert/WORKFLOW_GUIDE.md +618 -0
- package/templates/skills_normal/n8n-node-configuration/DEPENDENCIES.md +789 -0
- package/templates/skills_normal/n8n-node-configuration/OPERATION_PATTERNS.md +913 -0
- package/templates/skills_normal/n8n-node-configuration/README.md +364 -0
- package/templates/skills_normal/n8n-node-configuration/SKILL.md +785 -0
- package/templates/skills_normal/n8n-validation-expert/ERROR_CATALOG.md +943 -0
- package/templates/skills_normal/n8n-validation-expert/FALSE_POSITIVES.md +720 -0
- package/templates/skills_normal/n8n-validation-expert/README.md +290 -0
- package/templates/skills_normal/n8n-validation-expert/SKILL.md +689 -0
- package/templates/skills_normal/n8n-workflow-patterns/README.md +251 -0
- package/templates/skills_normal/n8n-workflow-patterns/SKILL.md +411 -0
- package/templates/skills_normal/n8n-workflow-patterns/ai_agent_workflow.md +784 -0
- package/templates/skills_normal/n8n-workflow-patterns/database_operations.md +785 -0
- package/templates/skills_normal/n8n-workflow-patterns/http_api_integration.md +734 -0
- package/templates/skills_normal/n8n-workflow-patterns/scheduled_tasks.md +773 -0
- package/templates/skills_normal/n8n-workflow-patterns/webhook_processing.md +545 -0
- package/templates/vault/n8n-code-javascript/SKILL.md +10 -10
- package/templates/vault/n8n-code-python/SKILL.md +11 -11
- package/templates/vault/n8n-expression-syntax/SKILL.md +4 -4
- package/templates/vault/n8n-mcp-tools-expert/SKILL.md +9 -9
- package/templates/vault/n8n-node-configuration/SKILL.md +2 -2
- package/templates/vault/n8n-validation-expert/SKILL.md +3 -3
- package/templates/vault/n8n-workflow-patterns/SKILL.md +11 -11
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: n8n-expression-syntax
|
|
3
|
+
description: Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# n8n Expression Syntax
|
|
7
|
+
|
|
8
|
+
Expert guide for writing correct n8n expressions in workflows.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Expression Format
|
|
13
|
+
|
|
14
|
+
All dynamic content in n8n uses **double curly braces**:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
{{expression}}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Examples**:
|
|
21
|
+
```
|
|
22
|
+
✅ {{$json.email}}
|
|
23
|
+
✅ {{$json.body.name}}
|
|
24
|
+
✅ {{$node["HTTP Request"].json.data}}
|
|
25
|
+
❌ $json.email (no braces - treated as literal text)
|
|
26
|
+
❌ {$json.email} (single braces - invalid)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Core Variables
|
|
32
|
+
|
|
33
|
+
### $json - Current Node Output
|
|
34
|
+
|
|
35
|
+
Access data from the current node:
|
|
36
|
+
|
|
37
|
+
```javascript
|
|
38
|
+
{{$json.fieldName}}
|
|
39
|
+
{{$json['field with spaces']}}
|
|
40
|
+
{{$json.nested.property}}
|
|
41
|
+
{{$json.items[0].name}}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### $node - Reference Other Nodes
|
|
45
|
+
|
|
46
|
+
Access data from any previous node:
|
|
47
|
+
|
|
48
|
+
```javascript
|
|
49
|
+
{{$node["Node Name"].json.fieldName}}
|
|
50
|
+
{{$node["HTTP Request"].json.data}}
|
|
51
|
+
{{$node["Webhook"].json.body.email}}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Important**:
|
|
55
|
+
- Node names **must** be in quotes
|
|
56
|
+
- Node names are **case-sensitive**
|
|
57
|
+
- Must match exact node name from workflow
|
|
58
|
+
|
|
59
|
+
### $now - Current Timestamp
|
|
60
|
+
|
|
61
|
+
Access current date/time:
|
|
62
|
+
|
|
63
|
+
```javascript
|
|
64
|
+
{{$now}}
|
|
65
|
+
{{$now.toFormat('yyyy-MM-dd')}}
|
|
66
|
+
{{$now.toFormat('HH:mm:ss')}}
|
|
67
|
+
{{$now.plus({days: 7})}}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### $env - Environment Variables
|
|
71
|
+
|
|
72
|
+
Access environment variables:
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
{{$env.API_KEY}}
|
|
76
|
+
{{$env.DATABASE_URL}}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 🚨 CRITICAL: Webhook Data Structure
|
|
82
|
+
|
|
83
|
+
**Most Common Mistake**: Webhook data is **NOT** at the root!
|
|
84
|
+
|
|
85
|
+
### Webhook Node Output Structure
|
|
86
|
+
|
|
87
|
+
```javascript
|
|
88
|
+
{
|
|
89
|
+
"headers": {...},
|
|
90
|
+
"params": {...},
|
|
91
|
+
"query": {...},
|
|
92
|
+
"body": { // ⚠️ USER DATA IS HERE!
|
|
93
|
+
"name": "John",
|
|
94
|
+
"email": "john@example.com",
|
|
95
|
+
"message": "Hello"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Correct Webhook Data Access
|
|
101
|
+
|
|
102
|
+
```javascript
|
|
103
|
+
❌ WRONG: {{$json.name}}
|
|
104
|
+
❌ WRONG: {{$json.email}}
|
|
105
|
+
|
|
106
|
+
✅ CORRECT: {{$json.body.name}}
|
|
107
|
+
✅ CORRECT: {{$json.body.email}}
|
|
108
|
+
✅ CORRECT: {{$json.body.message}}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Why**: Webhook node wraps incoming data under `.body` property to preserve headers, params, and query parameters.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Common Patterns
|
|
116
|
+
|
|
117
|
+
### Access Nested Fields
|
|
118
|
+
|
|
119
|
+
```javascript
|
|
120
|
+
// Simple nesting
|
|
121
|
+
{{$json.user.email}}
|
|
122
|
+
|
|
123
|
+
// Array access
|
|
124
|
+
{{$json.data[0].name}}
|
|
125
|
+
{{$json.items[0].id}}
|
|
126
|
+
|
|
127
|
+
// Bracket notation for spaces
|
|
128
|
+
{{$json['field name']}}
|
|
129
|
+
{{$json['user data']['first name']}}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Reference Other Nodes
|
|
133
|
+
|
|
134
|
+
```javascript
|
|
135
|
+
// Node without spaces
|
|
136
|
+
{{$node["Set"].json.value}}
|
|
137
|
+
|
|
138
|
+
// Node with spaces (common!)
|
|
139
|
+
{{$node["HTTP Request"].json.data}}
|
|
140
|
+
{{$node["Respond to Webhook"].json.message}}
|
|
141
|
+
|
|
142
|
+
// Webhook node
|
|
143
|
+
{{$node["Webhook"].json.body.email}}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Combine Variables
|
|
147
|
+
|
|
148
|
+
```javascript
|
|
149
|
+
// Concatenation (automatic)
|
|
150
|
+
Hello {{$json.body.name}}!
|
|
151
|
+
|
|
152
|
+
// In URLs
|
|
153
|
+
https://api.example.com/users/{{$json.body.user_id}}
|
|
154
|
+
|
|
155
|
+
// In object properties
|
|
156
|
+
{
|
|
157
|
+
"name": "={{$json.body.name}}",
|
|
158
|
+
"email": "={{$json.body.email}}"
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## When NOT to Use Expressions
|
|
165
|
+
|
|
166
|
+
### ❌ Code Nodes
|
|
167
|
+
|
|
168
|
+
Code nodes use **direct JavaScript access**, NOT expressions!
|
|
169
|
+
|
|
170
|
+
```javascript
|
|
171
|
+
// ❌ WRONG in Code node
|
|
172
|
+
const email = '={{$json.email}}';
|
|
173
|
+
const name = '{{$json.body.name}}';
|
|
174
|
+
|
|
175
|
+
// ✅ CORRECT in Code node
|
|
176
|
+
const email = $json.email;
|
|
177
|
+
const name = $json.body.name;
|
|
178
|
+
|
|
179
|
+
// Or using Code node API
|
|
180
|
+
const email = $input.item.json.email;
|
|
181
|
+
const allItems = $input.all();
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### ❌ Webhook Paths
|
|
185
|
+
|
|
186
|
+
```javascript
|
|
187
|
+
// ❌ WRONG
|
|
188
|
+
path: "{{$json.user_id}}/webhook"
|
|
189
|
+
|
|
190
|
+
// ✅ CORRECT
|
|
191
|
+
path: "user-webhook" // Static paths only
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### ❌ Credential Fields
|
|
195
|
+
|
|
196
|
+
```javascript
|
|
197
|
+
// ❌ WRONG
|
|
198
|
+
apiKey: "={{$env.API_KEY}}"
|
|
199
|
+
|
|
200
|
+
// ✅ CORRECT
|
|
201
|
+
Use n8n credential system, not expressions
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Validation Rules
|
|
207
|
+
|
|
208
|
+
### 1. Always Use {{}}
|
|
209
|
+
|
|
210
|
+
Expressions **must** be wrapped in double curly braces.
|
|
211
|
+
|
|
212
|
+
```javascript
|
|
213
|
+
❌ $json.field
|
|
214
|
+
✅ {{$json.field}}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### 2. Use Quotes for Spaces
|
|
218
|
+
|
|
219
|
+
Field or node names with spaces require **bracket notation**:
|
|
220
|
+
|
|
221
|
+
```javascript
|
|
222
|
+
❌ {{$json.field name}}
|
|
223
|
+
✅ {{$json['field name']}}
|
|
224
|
+
|
|
225
|
+
❌ {{$node.HTTP Request.json}}
|
|
226
|
+
✅ {{$node["HTTP Request"].json}}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### 3. Match Exact Node Names
|
|
230
|
+
|
|
231
|
+
Node references are **case-sensitive**:
|
|
232
|
+
|
|
233
|
+
```javascript
|
|
234
|
+
❌ {{$node["http request"].json}} // lowercase
|
|
235
|
+
❌ {{$node["Http Request"].json}} // wrong case
|
|
236
|
+
✅ {{$node["HTTP Request"].json}} // exact match
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### 4. No Nested {{}}
|
|
240
|
+
|
|
241
|
+
Don't double-wrap expressions:
|
|
242
|
+
|
|
243
|
+
```javascript
|
|
244
|
+
❌ {{{$json.field}}}
|
|
245
|
+
✅ {{$json.field}}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Common Mistakes
|
|
251
|
+
|
|
252
|
+
For complete error catalog with fixes, see [COMMON_MISTAKES.md](COMMON_MISTAKES.md)
|
|
253
|
+
|
|
254
|
+
### Quick Fixes
|
|
255
|
+
|
|
256
|
+
| Mistake | Fix |
|
|
257
|
+
|---------|-----|
|
|
258
|
+
| `$json.field` | `{{$json.field}}` |
|
|
259
|
+
| `{{$json.field name}}` | `{{$json['field name']}}` |
|
|
260
|
+
| `{{$node.HTTP Request}}` | `{{$node["HTTP Request"]}}` |
|
|
261
|
+
| `{{{$json.field}}}` | `{{$json.field}}` |
|
|
262
|
+
| `{{$json.name}}` (webhook) | `{{$json.body.name}}` |
|
|
263
|
+
| `'={{$json.email}}'` (Code node) | `$json.email` |
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Working Examples
|
|
268
|
+
|
|
269
|
+
For real workflow examples, see [EXAMPLES.md](EXAMPLES.md)
|
|
270
|
+
|
|
271
|
+
### Example 1: Webhook to Slack
|
|
272
|
+
|
|
273
|
+
**Webhook receives**:
|
|
274
|
+
```json
|
|
275
|
+
{
|
|
276
|
+
"body": {
|
|
277
|
+
"name": "John Doe",
|
|
278
|
+
"email": "john@example.com",
|
|
279
|
+
"message": "Hello!"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**In Slack node text field**:
|
|
285
|
+
```
|
|
286
|
+
New form submission!
|
|
287
|
+
|
|
288
|
+
Name: {{$json.body.name}}
|
|
289
|
+
Email: {{$json.body.email}}
|
|
290
|
+
Message: {{$json.body.message}}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Example 2: HTTP Request to Email
|
|
294
|
+
|
|
295
|
+
**HTTP Request returns**:
|
|
296
|
+
```json
|
|
297
|
+
{
|
|
298
|
+
"data": {
|
|
299
|
+
"items": [
|
|
300
|
+
{"name": "Product 1", "price": 29.99}
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
**In Email node** (reference HTTP Request):
|
|
307
|
+
```
|
|
308
|
+
Product: {{$node["HTTP Request"].json.data.items[0].name}}
|
|
309
|
+
Price: ${{$node["HTTP Request"].json.data.items[0].price}}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Example 3: Format Timestamp
|
|
313
|
+
|
|
314
|
+
```javascript
|
|
315
|
+
// Current date
|
|
316
|
+
{{$now.toFormat('yyyy-MM-dd')}}
|
|
317
|
+
// Result: 2025-10-20
|
|
318
|
+
|
|
319
|
+
// Time
|
|
320
|
+
{{$now.toFormat('HH:mm:ss')}}
|
|
321
|
+
// Result: 14:30:45
|
|
322
|
+
|
|
323
|
+
// Full datetime
|
|
324
|
+
{{$now.toFormat('yyyy-MM-dd HH:mm')}}
|
|
325
|
+
// Result: 2025-10-20 14:30
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## Data Type Handling
|
|
331
|
+
|
|
332
|
+
### Arrays
|
|
333
|
+
|
|
334
|
+
```javascript
|
|
335
|
+
// First item
|
|
336
|
+
{{$json.users[0].email}}
|
|
337
|
+
|
|
338
|
+
// Array length
|
|
339
|
+
{{$json.users.length}}
|
|
340
|
+
|
|
341
|
+
// Last item
|
|
342
|
+
{{$json.users[$json.users.length - 1].name}}
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Objects
|
|
346
|
+
|
|
347
|
+
```javascript
|
|
348
|
+
// Dot notation (no spaces)
|
|
349
|
+
{{$json.user.email}}
|
|
350
|
+
|
|
351
|
+
// Bracket notation (with spaces or dynamic)
|
|
352
|
+
{{$json['user data'].email}}
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Strings
|
|
356
|
+
|
|
357
|
+
```javascript
|
|
358
|
+
// Concatenation (automatic)
|
|
359
|
+
Hello {{$json.name}}!
|
|
360
|
+
|
|
361
|
+
// String methods
|
|
362
|
+
{{$json.email.toLowerCase()}}
|
|
363
|
+
{{$json.name.toUpperCase()}}
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### Numbers
|
|
367
|
+
|
|
368
|
+
```javascript
|
|
369
|
+
// Direct use
|
|
370
|
+
{{$json.price}}
|
|
371
|
+
|
|
372
|
+
// Math operations
|
|
373
|
+
{{$json.price * 1.1}} // Add 10%
|
|
374
|
+
{{$json.quantity + 5}}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
## Advanced Patterns
|
|
380
|
+
|
|
381
|
+
### Conditional Content
|
|
382
|
+
|
|
383
|
+
```javascript
|
|
384
|
+
// Ternary operator
|
|
385
|
+
{{$json.status === 'active' ? 'Active User' : 'Inactive User'}}
|
|
386
|
+
|
|
387
|
+
// Default values
|
|
388
|
+
{{$json.email || 'no-email@example.com'}}
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Date Manipulation
|
|
392
|
+
|
|
393
|
+
```javascript
|
|
394
|
+
// Add days
|
|
395
|
+
{{$now.plus({days: 7}).toFormat('yyyy-MM-dd')}}
|
|
396
|
+
|
|
397
|
+
// Subtract hours
|
|
398
|
+
{{$now.minus({hours: 24}).toISO()}}
|
|
399
|
+
|
|
400
|
+
// Set specific date
|
|
401
|
+
{{DateTime.fromISO('2025-12-25').toFormat('MMMM dd, yyyy')}}
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
### String Manipulation
|
|
405
|
+
|
|
406
|
+
```javascript
|
|
407
|
+
// Substring
|
|
408
|
+
{{$json.email.substring(0, 5)}}
|
|
409
|
+
|
|
410
|
+
// Replace
|
|
411
|
+
{{$json.message.replace('old', 'new')}}
|
|
412
|
+
|
|
413
|
+
// Split and join
|
|
414
|
+
{{$json.tags.split(',').join(', ')}}
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## Debugging Expressions
|
|
420
|
+
|
|
421
|
+
### Test in Expression Editor
|
|
422
|
+
|
|
423
|
+
1. Click field with expression
|
|
424
|
+
2. Open expression editor (click "fx" icon)
|
|
425
|
+
3. See live preview of result
|
|
426
|
+
4. Check for errors highlighted in red
|
|
427
|
+
|
|
428
|
+
### Common Error Messages
|
|
429
|
+
|
|
430
|
+
**"Cannot read property 'X' of undefined"**
|
|
431
|
+
→ Parent object doesn't exist
|
|
432
|
+
→ Check your data path
|
|
433
|
+
|
|
434
|
+
**"X is not a function"**
|
|
435
|
+
→ Trying to call method on non-function
|
|
436
|
+
→ Check variable type
|
|
437
|
+
|
|
438
|
+
**Expression shows as literal text**
|
|
439
|
+
→ Missing {{ }}
|
|
440
|
+
→ Add curly braces
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
|
|
444
|
+
## Expression Helpers
|
|
445
|
+
|
|
446
|
+
### Available Methods
|
|
447
|
+
|
|
448
|
+
**String**:
|
|
449
|
+
- `.toLowerCase()`, `.toUpperCase()`
|
|
450
|
+
- `.trim()`, `.replace()`, `.substring()`
|
|
451
|
+
- `.split()`, `.includes()`
|
|
452
|
+
|
|
453
|
+
**Array**:
|
|
454
|
+
- `.length`, `.map()`, `.filter()`
|
|
455
|
+
- `.find()`, `.join()`, `.slice()`
|
|
456
|
+
|
|
457
|
+
**DateTime** (Luxon):
|
|
458
|
+
- `.toFormat()`, `.toISO()`, `.toLocal()`
|
|
459
|
+
- `.plus()`, `.minus()`, `.set()`
|
|
460
|
+
|
|
461
|
+
**Number**:
|
|
462
|
+
- `.toFixed()`, `.toString()`
|
|
463
|
+
- Math operations: `+`, `-`, `*`, `/`, `%`
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
## Best Practices
|
|
468
|
+
|
|
469
|
+
### ✅ Do
|
|
470
|
+
|
|
471
|
+
- Always use {{ }} for dynamic content
|
|
472
|
+
- Use bracket notation for field names with spaces
|
|
473
|
+
- Reference webhook data from `.body`
|
|
474
|
+
- Use $node for data from other nodes
|
|
475
|
+
- Test expressions in expression editor
|
|
476
|
+
|
|
477
|
+
### ❌ Don't
|
|
478
|
+
|
|
479
|
+
- Don't use expressions in Code nodes
|
|
480
|
+
- Don't forget quotes around node names with spaces
|
|
481
|
+
- Don't double-wrap with extra {{ }}
|
|
482
|
+
- Don't assume webhook data is at root (it's under .body!)
|
|
483
|
+
- Don't use expressions in webhook paths or credentials
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
## Related Skills
|
|
488
|
+
|
|
489
|
+
- **n8n MCP Tools Expert**: Learn how to validate expressions using MCP tools
|
|
490
|
+
- **n8n Workflow Patterns**: See expressions in real workflow examples
|
|
491
|
+
- **n8n Node Configuration**: Understand when expressions are needed
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
## Summary
|
|
496
|
+
|
|
497
|
+
**Essential Rules**:
|
|
498
|
+
1. Wrap expressions in {{ }}
|
|
499
|
+
2. Webhook data is under `.body`
|
|
500
|
+
3. No {{ }} in Code nodes
|
|
501
|
+
4. Quote node names with spaces
|
|
502
|
+
5. Node names are case-sensitive
|
|
503
|
+
|
|
504
|
+
**Most Common Mistakes**:
|
|
505
|
+
- Missing {{ }} → Add braces
|
|
506
|
+
- `{{$json.name}}` in webhooks → Use `{{$json.body.name}}`
|
|
507
|
+
- `{{$json.email}}` in Code → Use `$json.email`
|
|
508
|
+
- `{{$node.HTTP Request}}` → Use `{{$node["HTTP Request"]}}`
|
|
509
|
+
|
|
510
|
+
For more details, see:
|
|
511
|
+
- [COMMON_MISTAKES.md](COMMON_MISTAKES.md) - Complete error catalog
|
|
512
|
+
- [EXAMPLES.md](EXAMPLES.md) - Real workflow examples
|
|
513
|
+
|
|
514
|
+
---
|
|
515
|
+
|
|
516
|
+
**Need Help?** Reference the n8n expression documentation or use n8n-mcp validation tools to check your expressions.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# n8n MCP Tools Expert
|
|
2
|
+
|
|
3
|
+
Expert guide for using n8n-mcp MCP tools effectively.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Teaches how to use n8n-mcp MCP server tools correctly for efficient workflow building.
|
|
10
|
+
|
|
11
|
+
## Activates On
|
|
12
|
+
|
|
13
|
+
- search nodes
|
|
14
|
+
- find node
|
|
15
|
+
- validate
|
|
16
|
+
- MCP tools
|
|
17
|
+
- template
|
|
18
|
+
- workflow
|
|
19
|
+
- n8n-mcp
|
|
20
|
+
- tool selection
|
|
21
|
+
|
|
22
|
+
## File Count
|
|
23
|
+
|
|
24
|
+
5 files, ~1,150 lines total
|
|
25
|
+
|
|
26
|
+
## Priority
|
|
27
|
+
|
|
28
|
+
**HIGHEST** - Essential for correct MCP tool usage
|
|
29
|
+
|
|
30
|
+
## Dependencies
|
|
31
|
+
|
|
32
|
+
**n8n-mcp tools**: All of them! (40+ tools)
|
|
33
|
+
|
|
34
|
+
**Related skills**:
|
|
35
|
+
- n8n Expression Syntax (write expressions for workflows)
|
|
36
|
+
- n8n Workflow Patterns (use tools to build patterns)
|
|
37
|
+
- n8n Validation Expert (interpret validation results)
|
|
38
|
+
- n8n Node Configuration (configure nodes found with tools)
|
|
39
|
+
|
|
40
|
+
## Coverage
|
|
41
|
+
|
|
42
|
+
### Core Topics
|
|
43
|
+
- Tool selection guide (which tool for which task)
|
|
44
|
+
- nodeType format differences (nodes-base.* vs n8n-nodes-base.*)
|
|
45
|
+
- Validation profiles (minimal/runtime/ai-friendly/strict)
|
|
46
|
+
- Smart parameters (branch, case for multi-output nodes)
|
|
47
|
+
- Auto-sanitization system
|
|
48
|
+
- Workflow management (15 operation types)
|
|
49
|
+
- AI connection types (8 types)
|
|
50
|
+
|
|
51
|
+
### Tool Categories
|
|
52
|
+
- Node Discovery (search, list, essentials, info)
|
|
53
|
+
- Configuration Validation (minimal, operation, workflow)
|
|
54
|
+
- Workflow Management (create, update, validate)
|
|
55
|
+
- Template Library (search, get)
|
|
56
|
+
- Documentation (tools, database stats)
|
|
57
|
+
|
|
58
|
+
## Evaluations
|
|
59
|
+
|
|
60
|
+
5 scenarios (100% coverage expected):
|
|
61
|
+
1. **eval-001**: Tool selection (search_nodes)
|
|
62
|
+
2. **eval-002**: nodeType format (nodes-base.* prefix)
|
|
63
|
+
3. **eval-003**: Validation workflow (profiles)
|
|
64
|
+
4. **eval-004**: essentials vs info (5KB vs 100KB)
|
|
65
|
+
5. **eval-005**: Smart parameters (branch, case)
|
|
66
|
+
|
|
67
|
+
## Key Features
|
|
68
|
+
|
|
69
|
+
✅ **Tool Selection Guide**: Which tool to use for each task
|
|
70
|
+
✅ **Common Patterns**: Most effective tool usage sequences
|
|
71
|
+
✅ **Format Guidance**: nodeType format differences explained
|
|
72
|
+
✅ **Smart Parameters**: Semantic branch/case routing for multi-output nodes
|
|
73
|
+
✅ **Auto-Sanitization**: Explains automatic validation fixes
|
|
74
|
+
✅ **Comprehensive**: Covers all 40+ MCP tools
|
|
75
|
+
|
|
76
|
+
## Files
|
|
77
|
+
|
|
78
|
+
- **SKILL.md** (480 lines) - Core tool usage guide
|
|
79
|
+
- **SEARCH_GUIDE.md** (220 lines) - Node discovery tools
|
|
80
|
+
- **VALIDATION_GUIDE.md** (250 lines) - Validation tools and profiles
|
|
81
|
+
- **WORKFLOW_GUIDE.md** (200 lines) - Workflow management
|
|
82
|
+
- **README.md** (this file) - Skill metadata
|
|
83
|
+
|
|
84
|
+
## What You'll Learn
|
|
85
|
+
|
|
86
|
+
- Correct nodeType formats (nodes-base.* for search tools)
|
|
87
|
+
- When to use get_node_essentials vs get_node_info
|
|
88
|
+
- How to use validation profiles effectively
|
|
89
|
+
- Smart parameters for multi-output nodes (IF/Switch)
|
|
90
|
+
- Common tool usage patterns and workflows
|
|
91
|
+
|
|
92
|
+
## Last Updated
|
|
93
|
+
|
|
94
|
+
2025-10-20
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
**Part of**: n8n-skills repository
|
|
99
|
+
**Conceived by**: Romuald Członkowski - [www.aiadvisors.pl/en](https://www.aiadvisors.pl/en)
|