@n8n/ai-workflow-builder 1.16.0 → 1.17.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 (133) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/code-builder/index.d.ts +1 -1
  3. package/dist/code-builder/index.js +4 -4
  4. package/dist/code-builder/index.js.map +1 -1
  5. package/dist/code-builder/prompts/index.js +4 -4
  6. package/dist/code-builder/prompts/index.js.map +1 -1
  7. package/dist/prompts/chains/parameter-updater/guides/index.d.ts +1 -11
  8. package/dist/prompts/chains/parameter-updater/guides/index.js +12 -22
  9. package/dist/prompts/chains/parameter-updater/guides/index.js.map +1 -1
  10. package/dist/prompts/chains/parameter-updater/types.d.ts +1 -18
  11. package/dist/prompts/shared/node-guidance/index.d.ts +1 -2
  12. package/dist/prompts/shared/node-guidance/index.js +3 -4
  13. package/dist/prompts/shared/node-guidance/index.js.map +1 -1
  14. package/dist/prompts/shared/node-recommendations/index.d.ts +2 -2
  15. package/dist/prompts/shared/node-recommendations/index.js +6 -11
  16. package/dist/prompts/shared/node-recommendations/index.js.map +1 -1
  17. package/dist/tools/best-practices/index.d.ts +1 -3
  18. package/dist/tools/best-practices/index.js +2 -30
  19. package/dist/tools/best-practices/index.js.map +1 -1
  20. package/dist/types/best-practices.d.ts +1 -6
  21. package/dist/types/categorization.d.ts +2 -20
  22. package/dist/types/categorization.js +3 -36
  23. package/dist/types/categorization.js.map +1 -1
  24. package/dist/types/node-guidance.d.ts +1 -7
  25. package/dist/types/node-recommendations.d.ts +1 -26
  26. package/dist/types/node-recommendations.js +3 -12
  27. package/dist/types/node-recommendations.js.map +1 -1
  28. package/package.json +10 -10
  29. package/dist/prompts/chains/parameter-updater/guides/embedding-nodes.d.ts +0 -2
  30. package/dist/prompts/chains/parameter-updater/guides/embedding-nodes.js +0 -70
  31. package/dist/prompts/chains/parameter-updater/guides/embedding-nodes.js.map +0 -1
  32. package/dist/prompts/chains/parameter-updater/guides/gmail.d.ts +0 -2
  33. package/dist/prompts/chains/parameter-updater/guides/gmail.js +0 -53
  34. package/dist/prompts/chains/parameter-updater/guides/gmail.js.map +0 -1
  35. package/dist/prompts/chains/parameter-updater/guides/http-request.d.ts +0 -2
  36. package/dist/prompts/chains/parameter-updater/guides/http-request.js +0 -139
  37. package/dist/prompts/chains/parameter-updater/guides/http-request.js.map +0 -1
  38. package/dist/prompts/chains/parameter-updater/guides/if-node.d.ts +0 -2
  39. package/dist/prompts/chains/parameter-updater/guides/if-node.js +0 -159
  40. package/dist/prompts/chains/parameter-updater/guides/if-node.js.map +0 -1
  41. package/dist/prompts/chains/parameter-updater/guides/predecessor-output.d.ts +0 -2
  42. package/dist/prompts/chains/parameter-updater/guides/predecessor-output.js +0 -25
  43. package/dist/prompts/chains/parameter-updater/guides/predecessor-output.js.map +0 -1
  44. package/dist/prompts/chains/parameter-updater/guides/resource-locator.d.ts +0 -2
  45. package/dist/prompts/chains/parameter-updater/guides/resource-locator.js +0 -40
  46. package/dist/prompts/chains/parameter-updater/guides/resource-locator.js.map +0 -1
  47. package/dist/prompts/chains/parameter-updater/guides/set-node.d.ts +0 -2
  48. package/dist/prompts/chains/parameter-updater/guides/set-node.js +0 -94
  49. package/dist/prompts/chains/parameter-updater/guides/set-node.js.map +0 -1
  50. package/dist/prompts/chains/parameter-updater/guides/switch-node.d.ts +0 -2
  51. package/dist/prompts/chains/parameter-updater/guides/switch-node.js +0 -75
  52. package/dist/prompts/chains/parameter-updater/guides/switch-node.js.map +0 -1
  53. package/dist/prompts/chains/parameter-updater/guides/system-message.d.ts +0 -2
  54. package/dist/prompts/chains/parameter-updater/guides/system-message.js +0 -96
  55. package/dist/prompts/chains/parameter-updater/guides/system-message.js.map +0 -1
  56. package/dist/prompts/chains/parameter-updater/guides/text-fields.d.ts +0 -2
  57. package/dist/prompts/chains/parameter-updater/guides/text-fields.js +0 -31
  58. package/dist/prompts/chains/parameter-updater/guides/text-fields.js.map +0 -1
  59. package/dist/prompts/chains/parameter-updater/guides/tool-nodes.d.ts +0 -2
  60. package/dist/prompts/chains/parameter-updater/guides/tool-nodes.js +0 -76
  61. package/dist/prompts/chains/parameter-updater/guides/tool-nodes.js.map +0 -1
  62. package/dist/prompts/shared/node-guidance/structured-output-parser.d.ts +0 -2
  63. package/dist/prompts/shared/node-guidance/structured-output-parser.js +0 -35
  64. package/dist/prompts/shared/node-guidance/structured-output-parser.js.map +0 -1
  65. package/dist/prompts/shared/node-guidance/webhook.d.ts +0 -2
  66. package/dist/prompts/shared/node-guidance/webhook.js +0 -38
  67. package/dist/prompts/shared/node-guidance/webhook.js.map +0 -1
  68. package/dist/prompts/shared/node-recommendations/audio-generation.d.ts +0 -2
  69. package/dist/prompts/shared/node-recommendations/audio-generation.js +0 -18
  70. package/dist/prompts/shared/node-recommendations/audio-generation.js.map +0 -1
  71. package/dist/prompts/shared/node-recommendations/image-generation.d.ts +0 -2
  72. package/dist/prompts/shared/node-recommendations/image-generation.js +0 -18
  73. package/dist/prompts/shared/node-recommendations/image-generation.js.map +0 -1
  74. package/dist/prompts/shared/node-recommendations/text-manipulation.d.ts +0 -2
  75. package/dist/prompts/shared/node-recommendations/text-manipulation.js +0 -27
  76. package/dist/prompts/shared/node-recommendations/text-manipulation.js.map +0 -1
  77. package/dist/prompts/shared/node-recommendations/utils/format-recommendation.d.ts +0 -2
  78. package/dist/prompts/shared/node-recommendations/utils/format-recommendation.js +0 -24
  79. package/dist/prompts/shared/node-recommendations/utils/format-recommendation.js.map +0 -1
  80. package/dist/prompts/shared/node-recommendations/video-generation.d.ts +0 -2
  81. package/dist/prompts/shared/node-recommendations/video-generation.js +0 -15
  82. package/dist/prompts/shared/node-recommendations/video-generation.js.map +0 -1
  83. package/dist/shared/code-builder-and-mcp-prompt-constants.d.ts +0 -3
  84. package/dist/shared/code-builder-and-mcp-prompt-constants.js +0 -57
  85. package/dist/shared/code-builder-and-mcp-prompt-constants.js.map +0 -1
  86. package/dist/tools/best-practices/chatbot.d.ts +0 -7
  87. package/dist/tools/best-practices/chatbot.js +0 -118
  88. package/dist/tools/best-practices/chatbot.js.map +0 -1
  89. package/dist/tools/best-practices/content-generation.d.ts +0 -7
  90. package/dist/tools/best-practices/content-generation.js +0 -115
  91. package/dist/tools/best-practices/content-generation.js.map +0 -1
  92. package/dist/tools/best-practices/data-analysis.d.ts +0 -7
  93. package/dist/tools/best-practices/data-analysis.js +0 -367
  94. package/dist/tools/best-practices/data-analysis.js.map +0 -1
  95. package/dist/tools/best-practices/data-extraction.d.ts +0 -7
  96. package/dist/tools/best-practices/data-extraction.js +0 -122
  97. package/dist/tools/best-practices/data-extraction.js.map +0 -1
  98. package/dist/tools/best-practices/data-persistence.d.ts +0 -7
  99. package/dist/tools/best-practices/data-persistence.js +0 -197
  100. package/dist/tools/best-practices/data-persistence.js.map +0 -1
  101. package/dist/tools/best-practices/data-transformation.d.ts +0 -7
  102. package/dist/tools/best-practices/data-transformation.js +0 -146
  103. package/dist/tools/best-practices/data-transformation.js.map +0 -1
  104. package/dist/tools/best-practices/document-processing.d.ts +0 -7
  105. package/dist/tools/best-practices/document-processing.js +0 -332
  106. package/dist/tools/best-practices/document-processing.js.map +0 -1
  107. package/dist/tools/best-practices/enrichment.d.ts +0 -7
  108. package/dist/tools/best-practices/enrichment.js +0 -271
  109. package/dist/tools/best-practices/enrichment.js.map +0 -1
  110. package/dist/tools/best-practices/form-input.d.ts +0 -7
  111. package/dist/tools/best-practices/form-input.js +0 -173
  112. package/dist/tools/best-practices/form-input.js.map +0 -1
  113. package/dist/tools/best-practices/human-in-the-loop.d.ts +0 -7
  114. package/dist/tools/best-practices/human-in-the-loop.js +0 -268
  115. package/dist/tools/best-practices/human-in-the-loop.js.map +0 -1
  116. package/dist/tools/best-practices/knowledge-base.d.ts +0 -7
  117. package/dist/tools/best-practices/knowledge-base.js +0 -268
  118. package/dist/tools/best-practices/knowledge-base.js.map +0 -1
  119. package/dist/tools/best-practices/monitoring.d.ts +0 -7
  120. package/dist/tools/best-practices/monitoring.js +0 -171
  121. package/dist/tools/best-practices/monitoring.js.map +0 -1
  122. package/dist/tools/best-practices/notification.d.ts +0 -7
  123. package/dist/tools/best-practices/notification.js +0 -135
  124. package/dist/tools/best-practices/notification.js.map +0 -1
  125. package/dist/tools/best-practices/scheduling.d.ts +0 -7
  126. package/dist/tools/best-practices/scheduling.js +0 -152
  127. package/dist/tools/best-practices/scheduling.js.map +0 -1
  128. package/dist/tools/best-practices/scraping-and-research.d.ts +0 -7
  129. package/dist/tools/best-practices/scraping-and-research.js +0 -158
  130. package/dist/tools/best-practices/scraping-and-research.js.map +0 -1
  131. package/dist/tools/best-practices/triage.d.ts +0 -7
  132. package/dist/tools/best-practices/triage.js +0 -149
  133. package/dist/tools/best-practices/triage.js.map +0 -1
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GMAIL_GUIDE = void 0;
4
- exports.GMAIL_GUIDE = {
5
- patterns: ['n8n-nodes-base.gmail', 'n8n-nodes-base.gmailTrigger'],
6
- content: `
7
- ### Gmail Node Updates
8
-
9
- #### Common Parameters
10
- - **resource**: message, draft, label, thread
11
- - **operation**: send, get, list, etc.
12
- - **to**: Recipient email address
13
- - **subject**: Email subject line
14
- - **message**: Email body/content
15
- - **authentication**: OAuth2 or Service Account
16
-
17
- #### Simplify Option (CRITICAL)
18
- - **simplify: false** - Returns FULL email with body, attachments, headers
19
- - **simplify: true** - Returns LIMITED data (subject, snippet only, NO body)
20
-
21
- ALWAYS set simplify to FALSE when:
22
- - Workflow needs to analyze email content/body
23
- - AI Agent will process or summarize emails
24
- - Email content is used for decision making
25
- - Attachments need to be accessed
26
-
27
- #### Gmail Filter Queries
28
- For Gmail Trigger nodes, use comprehensive search filters with OR operators:
29
- - Multiple keywords: "subject:(delivery OR shipment OR package OR tracking)"
30
- - From specific senders: "from:example@domain.com"
31
- - With attachments: "has:attachment"
32
- - Unread only: "is:unread"
33
-
34
- Example for package tracking: "subject:(delivery OR shipment OR package OR tracking OR shipped)"
35
- NOT just: "subject:delivery" (misses many relevant emails)
36
-
37
- #### Common Patterns
38
- 1. **Sending Email**:
39
- - Set resource to "message"
40
- - Set operation to "send"
41
- - Configure to, subject, and message fields
42
-
43
- 2. **Reading Emails for AI Analysis**:
44
- - Set simplify to false (required for full email body)
45
- - Configure appropriate filter query
46
- - Pass full email data to AI Agent
47
-
48
- 3. **Using Expressions**:
49
- - Can use expressions: "={{ $('Previous Node').item.json.email }}"
50
- - Can reference previous node data for dynamic values
51
- `,
52
- };
53
- //# sourceMappingURL=gmail.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gmail.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/gmail.ts"],"names":[],"mappings":";;;AAEa,QAAA,WAAW,GAAkB;IACzC,QAAQ,EAAE,CAAC,sBAAsB,EAAE,6BAA6B,CAAC;IACjE,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CT;CACA,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { NodeTypeGuide } from '../types';
2
- export declare const HTTP_REQUEST_GUIDE: NodeTypeGuide;
@@ -1,139 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HTTP_REQUEST_GUIDE = void 0;
4
- exports.HTTP_REQUEST_GUIDE = {
5
- patterns: ['n8n-nodes-base.httpRequest', 'n8n-nodes-base.webhook'],
6
- content: `
7
- ### HTTP Request Node Updates
8
-
9
- #### IMPORTANT - Credential Security
10
-
11
- **NEVER hardcode credentials** (API keys, tokens, passwords, secrets) in the HTTP Request node parameters.
12
- Instead, ALWAYS use n8n's built-in credential system:
13
-
14
- 1. Set \`authentication\` to \`"genericCredentialType"\`
15
- 2. Set \`genericAuthType\` to the appropriate credential type:
16
- - \`"httpHeaderAuth"\` - For API keys sent in headers (X-API-Key, Authorization, etc.)
17
- - \`"httpBearerAuth"\` - For Bearer token authentication
18
- - \`"httpQueryAuth"\` - For API keys sent as query parameters
19
- - \`"httpBasicAuth"\` - For username/password authentication
20
- - \`"oAuth2Api"\` - For OAuth 2.0 authentication
21
-
22
- **DO NOT:**
23
- - Put API keys or tokens directly in header values
24
- - Store credentials in Set nodes and reference them with expressions
25
- - Hardcode Bearer tokens in Authorization headers
26
-
27
- **DO:**
28
- - Use the authentication parameter with the appropriate credential type
29
- - Let users configure their credentials securely in n8n's credential manager
30
-
31
- #### Common Parameters
32
- - **url**: The endpoint URL (can use expressions)
33
- - **method**: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
34
- - **authentication**: Type of auth (none, genericCredentialType, etc.)
35
- - **sendHeaders**: Boolean to enable custom headers
36
- - **headerParameters**: Array of header key-value pairs
37
- - **sendBody**: Boolean to enable request body (for POST/PUT/PATCH)
38
- - **bodyParameters**: Array of body parameters or raw body content
39
- - **contentType**: json, form, raw, etc.
40
- - **options**: Additional options like timeout, proxy, etc.
41
-
42
- #### Header Structure
43
- {
44
- "sendHeaders": true,
45
- "headerParameters": {
46
- "parameters": [
47
- {
48
- "name": "Header-Name",
49
- "value": "Header Value or {{ expression }}"
50
- }
51
- ]
52
- }
53
- }
54
-
55
- #### Body Structure (JSON)
56
- {
57
- "sendBody": true,
58
- "contentType": "json",
59
- "bodyParameters": {
60
- "parameters": [
61
- {
62
- "name": "fieldName",
63
- "value": "fieldValue or {{ expression }}"
64
- }
65
- ]
66
- }
67
- }
68
-
69
- #### Authentication Options
70
- - **none**: No authentication
71
- - **genericCredentialType**: Use stored credentials
72
- - **predefinedCredentialType**: Use specific credential type
73
- - Can also set custom auth headers
74
-
75
- #### Common Patterns
76
- 1. **Adding API Key Header**:
77
- - Enable sendHeaders
78
- - Add header with name "X-API-Key" or "Authorization"
79
-
80
- 2. **Setting Request Body**:
81
- - Enable sendBody
82
- - Set contentType (usually "json")
83
- - Add parameters to bodyParameters.parameters array
84
-
85
- 3. **Dynamic URLs**:
86
- - Can use expressions: "=https://api.example.com/{{ $('Set').item.json.endpoint }}"
87
- - Can reference previous node data
88
-
89
- 4. **Query Parameters**:
90
- - Can be part of URL or set in options.queryParameters
91
-
92
- #### Example: HTTP Request with Authentication and Body
93
- Current Parameters:
94
- {
95
- "method": "GET",
96
- "url": "https://api.example.com/data"
97
- }
98
-
99
- Requested Changes:
100
- - Change to POST method
101
- - Add API key authentication (using n8n credentials)
102
- - Add JSON body with user ID and status
103
-
104
- Expected Output:
105
- {
106
- "method": "POST",
107
- "url": "https://api.example.com/data",
108
- "authentication": "genericCredentialType",
109
- "genericAuthType": "httpHeaderAuth",
110
- "sendHeaders": true,
111
- "headerParameters": {
112
- "parameters": [
113
- {
114
- "name": "Content-Type",
115
- "value": "application/json"
116
- }
117
- ]
118
- },
119
- "sendBody": true,
120
- "contentType": "json",
121
- "bodyParameters": {
122
- "parameters": [
123
- {
124
- "name": "userId",
125
- "value": "={{ $('Previous Node').item.json.id }}"
126
- },
127
- {
128
- "name": "status",
129
- "value": "active"
130
- }
131
- ]
132
- },
133
- "options": {}
134
- }
135
-
136
- Note: The API key is handled by the httpHeaderAuth credential, NOT hardcoded in the header parameters.
137
- The user will configure their API key securely in n8n's credential manager.`,
138
- };
139
- //# sourceMappingURL=http-request.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-request.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/http-request.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAkB;IAChD,QAAQ,EAAE,CAAC,4BAA4B,EAAE,wBAAwB,CAAC;IAClE,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAmIkE;CAC3E,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { NodeTypeGuide } from '../types';
2
- export declare const IF_NODE_GUIDE: NodeTypeGuide;
@@ -1,159 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IF_NODE_GUIDE = void 0;
4
- exports.IF_NODE_GUIDE = {
5
- patterns: ['n8n-nodes-base.if'],
6
- content: `
7
- ### The IF node uses a complex filter structure for conditional logic. Understanding the correct operator format is crucial.
8
-
9
- #### IF Node Structure
10
- \`\`\`json
11
- {
12
- "conditions": {
13
- "options": {
14
- "caseSensitive": false, // For string comparisons
15
- "leftValue": "", // Optional default left value
16
- "typeValidation": "loose" // "strict" or "loose"
17
- },
18
- "conditions": [
19
- {
20
- "id": "unique-id", // Optional, auto-generated
21
- "leftValue": "={{ $('Node').item.json.field }}",
22
- "rightValue": "value", // Can be expression or literal
23
- "operator": {
24
- "type": "string|number|boolean|dateTime|array|object",
25
- "operation": "specific-operation"
26
- }
27
- }
28
- ],
29
- "combinator": "and" // "and" or "or"
30
- }
31
- }
32
- \`\`\`
33
-
34
- #### Complete Operator Reference
35
-
36
- ##### String Operators
37
- - **exists**: Check if value exists (singleValue: true, no rightValue needed)
38
- \`{ "type": "string", "operation": "exists" }\`
39
- - **notExists**: Check if value doesn't exist (singleValue: true)
40
- \`{ "type": "string", "operation": "notExists" }\`
41
- - **empty**: Check if string is empty (singleValue: true)
42
- \`{ "type": "string", "operation": "empty" }\`
43
- - **notEmpty**: Check if string is not empty (singleValue: true)
44
- \`{ "type": "string", "operation": "notEmpty" }\`
45
- - **equals**: Exact match
46
- \`{ "type": "string", "operation": "equals" }\`
47
- - **notEquals**: Not equal
48
- \`{ "type": "string", "operation": "notEquals" }\`
49
- - **contains**: Contains substring
50
- \`{ "type": "string", "operation": "contains" }\`
51
- - **notContains**: Doesn't contain substring
52
- \`{ "type": "string", "operation": "notContains" }\`
53
- - **startsWith**: Starts with string
54
- \`{ "type": "string", "operation": "startsWith" }\`
55
- - **notStartsWith**: Doesn't start with
56
- \`{ "type": "string", "operation": "notStartsWith" }\`
57
- - **endsWith**: Ends with string
58
- \`{ "type": "string", "operation": "endsWith" }\`
59
- - **notEndsWith**: Doesn't end with
60
- \`{ "type": "string", "operation": "notEndsWith" }\`
61
- - **regex**: Matches regex pattern
62
- \`{ "type": "string", "operation": "regex" }\`
63
- - **notRegex**: Doesn't match regex
64
- \`{ "type": "string", "operation": "notRegex" }\`
65
-
66
- ##### Number Operators
67
- - **exists**: Check if number exists (singleValue: true)
68
- \`{ "type": "number", "operation": "exists" }\`
69
- - **notExists**: Check if number doesn't exist (singleValue: true)
70
- \`{ "type": "number", "operation": "notExists" }\`
71
- - **equals**: Equal to
72
- \`{ "type": "number", "operation": "equals" }\`
73
- - **notEquals**: Not equal to
74
- \`{ "type": "number", "operation": "notEquals" }\`
75
- - **gt**: Greater than
76
- \`{ "type": "number", "operation": "gt" }\`
77
- - **lt**: Less than
78
- \`{ "type": "number", "operation": "lt" }\`
79
- - **gte**: Greater than or equal
80
- \`{ "type": "number", "operation": "gte" }\`
81
- - **lte**: Less than or equal
82
- \`{ "type": "number", "operation": "lte" }\`
83
-
84
- ##### DateTime Operators
85
- - **exists**: Check if date exists (singleValue: true)
86
- \`{ "type": "dateTime", "operation": "exists" }\`
87
- - **notExists**: Check if date doesn't exist (singleValue: true)
88
- \`{ "type": "dateTime", "operation": "notExists" }\`
89
- - **equals**: Same date/time
90
- \`{ "type": "dateTime", "operation": "equals" }\`
91
- - **notEquals**: Different date/time
92
- \`{ "type": "dateTime", "operation": "notEquals" }\`
93
- - **after**: After date
94
- \`{ "type": "dateTime", "operation": "after" }\`
95
- - **before**: Before date
96
- \`{ "type": "dateTime", "operation": "before" }\`
97
- - **afterOrEquals**: After or same date
98
- \`{ "type": "dateTime", "operation": "afterOrEquals" }\`
99
- - **beforeOrEquals**: Before or same date
100
- \`{ "type": "dateTime", "operation": "beforeOrEquals" }\`
101
-
102
- ##### Boolean Operators
103
- - **exists**: Check if boolean exists (singleValue: true)
104
- \`{ "type": "boolean", "operation": "exists" }\`
105
- - **notExists**: Check if boolean doesn't exist (singleValue: true)
106
- \`{ "type": "boolean", "operation": "notExists" }\`
107
- - **true**: Is true (singleValue: true)
108
- \`{ "type": "boolean", "operation": "true" }\`
109
- - **false**: Is false (singleValue: true)
110
- \`{ "type": "boolean", "operation": "false" }\`
111
- - **equals**: Equal to boolean value
112
- \`{ "type": "boolean", "operation": "equals" }\`
113
- - **notEquals**: Not equal to boolean value
114
- \`{ "type": "boolean", "operation": "notEquals" }\`
115
-
116
- ##### Array Operators
117
- - **exists**: Check if array exists (singleValue: true)
118
- \`{ "type": "array", "operation": "exists" }\`
119
- - **notExists**: Check if array doesn't exist (singleValue: true)
120
- \`{ "type": "array", "operation": "notExists" }\`
121
- - **empty**: Array is empty (singleValue: true)
122
- \`{ "type": "array", "operation": "empty" }\`
123
- - **notEmpty**: Array is not empty (singleValue: true)
124
- \`{ "type": "array", "operation": "notEmpty" }\`
125
- - **contains**: Array contains value
126
- \`{ "type": "array", "operation": "contains" }\`
127
- - **notContains**: Array doesn't contain value
128
- \`{ "type": "array", "operation": "notContains" }\`
129
- - **lengthEquals**: Array length equals
130
- \`{ "type": "array", "operation": "lengthEquals" }\`
131
- - **lengthNotEquals**: Array length not equals
132
- \`{ "type": "array", "operation": "lengthNotEquals" }\`
133
- - **lengthGt**: Array length greater than
134
- \`{ "type": "array", "operation": "lengthGt" }\`
135
- - **lengthLt**: Array length less than
136
- \`{ "type": "array", "operation": "lengthLt" }\`
137
- - **lengthGte**: Array length greater or equal
138
- \`{ "type": "array", "operation": "lengthGte" }\`
139
- - **lengthLte**: Array length less or equal
140
- \`{ "type": "array", "operation": "lengthLte" }\`
141
-
142
- ##### Object Operators
143
- - **exists**: Check if object exists (singleValue: true)
144
- \`{ "type": "object", "operation": "exists" }\`
145
- - **notExists**: Check if object doesn't exist (singleValue: true)
146
- \`{ "type": "object", "operation": "notExists" }\`
147
- - **empty**: Object is empty (singleValue: true)
148
- \`{ "type": "object", "operation": "empty" }\`
149
- - **notEmpty**: Object is not empty (singleValue: true)
150
- \`{ "type": "object", "operation": "notEmpty" }\`
151
-
152
- #### Important Notes:
153
- 1. **singleValue operators**: When using exists, notExists, empty, notEmpty, true, or false operators, DO NOT include a rightValue in the condition
154
- 2. **Expression values**: Both leftValue and rightValue can be expressions using \`={{ ... }}\` syntax
155
- 3. **Type matching**: The operator type must match the data type you're comparing
156
- 4. **Case sensitivity**: Only applies to string comparisons when caseSensitive is true in options
157
- 5. **Type validation**: "loose" allows type coercion, "strict" requires exact type matches`,
158
- };
159
- //# sourceMappingURL=if-node.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"if-node.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/if-node.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAkB;IAC3C,QAAQ,EAAE,CAAC,mBAAmB,CAAC;IAC/B,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2FAuJiF;CAC1F,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { NodeTypeGuide } from '../types';
2
- export declare const PREDECESSOR_OUTPUT_GUIDE: NodeTypeGuide;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PREDECESSOR_OUTPUT_GUIDE = void 0;
4
- exports.PREDECESSOR_OUTPUT_GUIDE = {
5
- patterns: ['*'],
6
- content: `
7
- ### Referencing Output from Special Node Types
8
-
9
- #### AI Agent Output Structure
10
- AI Agent nodes (n8n-nodes-langchain.agent) wrap their response in an "output" object:
11
- - Without Structured Output Parser: Use \`$json.output\` to access the response string
12
- - With Structured Output Parser (hasOutputParser: true in node settings): Use \`$json.output.fieldName\` to access parsed fields
13
- - Use \`$('AI Agent').item.json.output.fieldName\` when referencing a node, instead of \`$('AI Agent').item.json.fieldName\`
14
- - WRONG: \`$json.summary\` → CORRECT: \`$json.output.summary\`
15
-
16
- #### Webhook Node Output Structure
17
- When referencing data from a Webhook node (n8n-nodes-base.webhook), the incoming request is structured under \`$json\`:
18
- - \`$json.headers\` - HTTP headers, example: \`$json.headers.authorization\`
19
- - \`$json.params\` - URL path parameters, example route: \`/users/:id\`, access: \`$json.params.id\`
20
- - \`$json.query\` - Query string parameters, example URL: \`?user_id=123\`, access: \`$json.query.user_id\`
21
- - \`$json.body\` - Request payload, example JSON: \`{ "userName": "sam" }\`, access: \`$json.body.userName\`
22
-
23
- CRITICAL: When referencing data from a Webhook node, do NOT use \`$json.fieldName\` directly - always specify the container (body, query, params, or headers).`,
24
- };
25
- //# sourceMappingURL=predecessor-output.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"predecessor-output.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/predecessor-output.ts"],"names":[],"mappings":";;;AASa,QAAA,wBAAwB,GAAkB;IACtD,QAAQ,EAAE,CAAC,GAAG,CAAC;IACf,OAAO,EAAE;;;;;;;;;;;;;;;;;+JAiBqJ;CAC9J,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { NodeTypeGuide } from '../types';
2
- export declare const RESOURCE_LOCATOR_GUIDE: NodeTypeGuide;
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RESOURCE_LOCATOR_GUIDE = void 0;
4
- exports.RESOURCE_LOCATOR_GUIDE = {
5
- patterns: ['*'],
6
- condition: (ctx) => ctx.hasResourceLocatorParams === true,
7
- content: `
8
- ## IMPORTANT: ResourceLocator Parameter Handling
9
-
10
- ResourceLocator parameters are special fields used for selecting resources like Slack channels, Google Drive files, Notion pages, etc. They MUST have a specific structure:
11
-
12
- ### Required ResourceLocator Structure (required fields):
13
- \`\`\`json
14
- {
15
- "__rl": true,
16
- "mode": "id" | "url" | "list" | "name",
17
- "value": "the-actual-value"
18
- }
19
- \`\`\`
20
-
21
- ### Mode Detection Guidelines:
22
- - Use the node type definition to determine the default mode and available modes for specific parameter
23
- - Prefer default mode from node type definition when possible
24
- - Switch the mode based on the input value format when necessary
25
- - Use mode "list" when the value is an ID + display name (e.g. "Marketing Team (ID: C0122KQ70S7E)"). Value should be set to the ID part, and cachedResultName to the display name part
26
- - Use mode "url" when the value is a URL (starts with http:// or https://)
27
- - Use mode "id" when the value looks like an ID (alphanumeric string, UUID, or other identifier)
28
-
29
- List mode structure with optional cached fields:
30
- \`\`\`json
31
- {
32
- "__rl": true,
33
- "mode": "list",
34
- "value": "actual-id-from-list",
35
- "cachedResultName": "Display Name"
36
- }
37
- \`\`\`
38
- `,
39
- };
40
- //# sourceMappingURL=resource-locator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resource-locator.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/resource-locator.ts"],"names":[],"mappings":";;;AAEa,QAAA,sBAAsB,GAAkB;IACpD,QAAQ,EAAE,CAAC,GAAG,CAAC;IACf,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,wBAAwB,KAAK,IAAI;IACzD,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BT;CACA,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { NodeTypeGuide } from '../types';
2
- export declare const SET_NODE_GUIDE: NodeTypeGuide;
@@ -1,94 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SET_NODE_GUIDE = void 0;
4
- exports.SET_NODE_GUIDE = {
5
- patterns: ['n8n-nodes-base.set'],
6
- content: `
7
- ### Set Node Updates - Comprehensive Type Handling Guide
8
-
9
- The Set node uses assignments to create or modify data fields. Each assignment has a specific type that determines how the value is formatted and processed.
10
-
11
- #### Assignment Structure
12
- \`\`\`json
13
- {
14
- "id": "unique-id",
15
- "name": "field_name",
16
- "value": "field_value", // Format depends on type
17
- "type": "string|number|boolean|array|object"
18
- }
19
- \`\`\`
20
-
21
- **CRITICAL**: ALWAYS use "value" field for ALL types. NEVER use type-specific fields like "stringValue", "numberValue", "booleanValue", etc. The field is ALWAYS named "value" regardless of the type.
22
-
23
- #### Type-Specific Value Formatting
24
-
25
- ##### String Type
26
- - **Format**: Direct string value or expression
27
- - **Examples**:
28
- - Literal: \`"Hello World"\`
29
- - Expression: \`"={{ $('Previous Node').item.json.message }}"\`
30
- - With embedded expressions: \`"=Order #{{ $('Set').item.json.orderId }} processed"\`
31
- - **Use when**: Text data, IDs, names, messages, dates as strings
32
-
33
- ##### Number Type
34
- - **Format**: Direct numeric value (NOT as a string)
35
- - **Examples**:
36
- - Integer: \`123\`
37
- - Decimal: \`45.67\`
38
- - Negative: \`-100\`
39
- - Expression: \`"={{ $('HTTP Request').item.json.count }}"\`
40
- - **CRITICAL**: Use actual numbers, not strings: \`123\` not \`"123"\`
41
- - **Use when**: Quantities, prices, scores, numeric calculations
42
-
43
- ##### Boolean Type
44
- - **Format**: Direct boolean value (NOT as a string)
45
- - **Examples**:
46
- - True: \`true\`
47
- - False: \`false\`
48
- - Expression: \`"={{ $('IF').item.json.isActive }}"\`
49
- - **CRITICAL**: Use actual booleans, not strings: \`true\` not \`"true"\`
50
- - **CRITICAL**: The field name is "value", NOT "booleanValue"
51
- - **Use when**: Flags, toggles, yes/no values, active/inactive states
52
-
53
- ##### Array Type
54
- - **Format**: JSON stringified array
55
- - **Examples**:
56
- - Simple array: \`"[1, 2, 3]"\`
57
- - String array: \`"[\\"apple\\", \\"banana\\", \\"orange\\"]"\`
58
- - Mixed array: \`"[\\"item1\\", 123, true]"\`
59
- - Expression: \`"={{ JSON.stringify($('Previous Node').item.json.items) }}"\`
60
- - **CRITICAL**: Arrays must be JSON stringified
61
- - **Use when**: Lists, collections, multiple values
62
-
63
- ##### Object Type
64
- - **Format**: JSON stringified object
65
- - **Examples**:
66
- - Simple object: \`"{ \\"name\\": \\"John\\", \\"age\\": 30 }"\`
67
- - Nested object: \`"{ \\"user\\": { \\"id\\": 123, \\"role\\": \\"admin\\" } }"\`
68
- - Expression: \`"={{ JSON.stringify($('Set').item.json.userData) }}"\`
69
- - **CRITICAL**: Objects must be JSON stringified with escaped quotes
70
- - **Use when**: Complex data structures, grouped properties
71
-
72
- #### Important Type Selection Rules
73
-
74
- 1. **Analyze the requested data type**:
75
- - "Set count to 5" → number type with value: \`5\`
76
- - "Set message to hello" → string type with value: \`"hello"\`
77
- - "Set active to true" → boolean type with value: \`true\`
78
- - "Set tags to apple, banana" → array type with value: \`"[\\"apple\\", \\"banana\\"]"\`
79
-
80
- 2. **Expression handling**:
81
- - All types can use expressions with \`"={{ ... }}"\`
82
- - For arrays/objects from expressions, use \`JSON.stringify()\`
83
-
84
- 3. **Common mistakes to avoid**:
85
- - WRONG: Setting number as string: \`{ "value": "123", "type": "number" }\`
86
- - CORRECT: \`{ "value": 123, "type": "number" }\`
87
- - WRONG: Setting boolean as string: \`{ "value": "false", "type": "boolean" }\`
88
- - CORRECT: \`{ "value": false, "type": "boolean" }\`
89
- - WRONG: Using type-specific field names: \`{ "booleanValue": true, "type": "boolean" }\`
90
- - CORRECT: \`{ "value": true, "type": "boolean" }\`
91
- - WRONG: Setting array without stringification: \`{ "value": [1,2,3], "type": "array" }\`
92
- - CORRECT: \`{ "value": "[1,2,3]", "type": "array" }\``,
93
- };
94
- //# sourceMappingURL=set-node.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"set-node.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/set-node.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAkB;IAC5C,QAAQ,EAAE,CAAC,oBAAoB,CAAC;IAChC,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0DAsFgD;CACzD,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { NodeTypeGuide } from '../types';
2
- export declare const SWITCH_NODE_GUIDE: NodeTypeGuide;
@@ -1,75 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SWITCH_NODE_GUIDE = void 0;
4
- exports.SWITCH_NODE_GUIDE = {
5
- patterns: ['n8n-nodes-base.switch'],
6
- content: `
7
- ### Switch Node Configuration Guide
8
-
9
- The Switch node routes items to different outputs based on conditions. Uses the same filter structure as IF node but for multi-way branching.
10
-
11
- #### Switch Node Structure (mode: 'rules')
12
- \`\`\`json
13
- {
14
- "mode": "rules",
15
- "rules": {
16
- "values": [
17
- {
18
- "conditions": {
19
- "options": {
20
- "caseSensitive": true,
21
- "leftValue": "",
22
- "typeValidation": "strict"
23
- },
24
- "conditions": [
25
- {
26
- "leftValue": "={{ $json.amount }}",
27
- "rightValue": 100,
28
- "operator": {
29
- "type": "number",
30
- "operation": "lt"
31
- }
32
- }
33
- ],
34
- "combinator": "and"
35
- },
36
- "renameOutput": true,
37
- "outputKey": "Under $100"
38
- }
39
- ]
40
- }
41
- }
42
- \`\`\`
43
-
44
- #### Key Points:
45
- 1. Each entry in rules.values[] creates ONE output
46
- 2. Conditions use the same filter structure as IF node
47
- 3. Multiple conditions per rule are combined with combinator ("and" or "or")
48
- 4. Use renameOutput: true + outputKey to label outputs descriptively
49
-
50
- #### Numeric Operators
51
- - lt: Less than
52
- - gt: Greater than
53
- - lte: Less than or equal
54
- - gte: Greater than or equal
55
- - equals: Equal to
56
-
57
- #### String Operators
58
- - equals: Exact match
59
- - contains: Contains substring
60
- - startsWith: Starts with
61
- - endsWith: Ends with
62
-
63
- #### Common Patterns:
64
-
65
- **Numeric Range Routing** (for ranges like $100-$1000):
66
- Use two conditions with combinator: "and":
67
- - First condition: gte (greater than or equal to lower bound)
68
- - Second condition: lte (less than or equal to upper bound)
69
-
70
- **String-Based Routing** (status/type values):
71
- - Use type: "string" with operation: "equals"
72
- - Set caseSensitive: false in options for case-insensitive matching
73
- `,
74
- };
75
- //# sourceMappingURL=switch-node.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"switch-node.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/switch-node.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAkB;IAC/C,QAAQ,EAAE,CAAC,uBAAuB,CAAC;IACnC,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmET;CACA,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { NodeTypeGuide } from '../types';
2
- export declare const SYSTEM_MESSAGE_GUIDE: NodeTypeGuide;