@n8n/workflow-sdk 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/codegen/emit-instance-ai.d.ts +9 -0
  3. package/dist/codegen/emit-instance-ai.js +139 -0
  4. package/dist/codegen/emit-instance-ai.js.map +1 -0
  5. package/dist/codegen/index.d.ts +1 -0
  6. package/dist/codegen/index.js +3 -1
  7. package/dist/codegen/index.js.map +1 -1
  8. package/dist/examples-loader.d.ts +10 -0
  9. package/dist/examples-loader.js +108 -0
  10. package/dist/examples-loader.js.map +1 -0
  11. package/dist/examples-zip.d.ts +5 -0
  12. package/dist/examples-zip.js +99 -0
  13. package/dist/examples-zip.js.map +1 -0
  14. package/dist/generate-types/generate-types.d.ts +7 -0
  15. package/dist/generate-types/generate-types.js +70 -15
  16. package/dist/generate-types/generate-types.js.map +1 -1
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.js +4 -2
  19. package/dist/index.js.map +1 -1
  20. package/dist/prompts/best-practices/guides/triage.js +4 -4
  21. package/dist/prompts/node-selection/ai-nodes.d.ts +0 -1
  22. package/dist/prompts/node-selection/ai-nodes.js +1 -20
  23. package/dist/prompts/node-selection/ai-nodes.js.map +1 -1
  24. package/dist/prompts/node-selection/index.d.ts +2 -3
  25. package/dist/prompts/node-selection/index.js +1 -5
  26. package/dist/prompts/node-selection/index.js.map +1 -1
  27. package/dist/prompts/node-selection/use-case-patterns.d.ts +0 -1
  28. package/dist/prompts/node-selection/use-case-patterns.js +1 -9
  29. package/dist/prompts/node-selection/use-case-patterns.js.map +1 -1
  30. package/dist/prompts/sdk-reference/workflow-patterns.d.ts +1 -1
  31. package/dist/prompts/sdk-reference/workflow-patterns.js +5 -4
  32. package/dist/prompts/sdk-reference/workflow-patterns.js.map +1 -1
  33. package/dist/validation/index.d.ts +1 -1
  34. package/dist/validation/index.js +51 -0
  35. package/dist/validation/index.js.map +1 -1
  36. package/examples/manifest.json +3491 -0
  37. package/examples/templates.zip +0 -0
  38. package/package.json +19 -6
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AI_TOOL_PATTERNS = exports.AI_NODE_SELECTION = void 0;
3
+ exports.AI_NODE_SELECTION = void 0;
4
4
  exports.AI_NODE_SELECTION = `AI node selection guidance:
5
5
 
6
6
  AI Agent: Use for text analysis, summarization, classification, or any AI reasoning tasks.
@@ -13,23 +13,4 @@ Structured Output Parser: Prefer this over manually extracting/parsing AI output
13
13
 
14
14
  Multi-agent systems:
15
15
  AI Agent Tool (@n8n/n8n-nodes-langchain.agentTool) contains an embedded AI Agent — it's a complete sub-agent that the main agent can call through tool(). Each AgentTool needs its own Chat Model. Node selection: 1 AI Agent + N AgentTools + (N+1) Chat Models.`;
16
- exports.AI_TOOL_PATTERNS = `AI Agent tool connection patterns:
17
-
18
- When AI Agent needs external capabilities, use TOOL nodes (not regular nodes):
19
- - Research: SerpAPI Tool, Perplexity Tool -> AI Agent [tool()]
20
- - Calendar: Google Calendar Tool -> AI Agent [tool()]
21
- - Messaging: Slack Tool, Gmail Tool -> AI Agent [tool()]
22
- - HTTP calls: HTTP Request Tool -> AI Agent [tool()]
23
- - Calculations: Calculator Tool -> AI Agent [tool()]
24
- - Sub-agents: AI Agent Tool -> AI Agent [tool()] (for multi-agent systems)
25
-
26
- Tool nodes: AI Agent decides when/if to use them based on reasoning.
27
- Regular nodes: Execute at that workflow step regardless of context.
28
-
29
- Vector Store patterns:
30
- - Insert documents: Document Loader -> Vector Store (mode='insert') [documentLoader()]
31
- - RAG with AI Agent: Vector Store (mode='retrieve-as-tool') -> AI Agent [tool()]
32
- The retrieve-as-tool mode makes the Vector Store act as a tool the Agent can call.
33
-
34
- Structured Output Parser: Connect to AI Agent when structured JSON output is required.`;
35
16
  //# sourceMappingURL=ai-nodes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ai-nodes.js","sourceRoot":"","sources":["../../../src/prompts/node-selection/ai-nodes.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;;;;;;;;;;;kQAWiO,CAAC;AAEtP,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;uFAkBuD,CAAC"}
1
+ {"version":3,"file":"ai-nodes.js","sourceRoot":"","sources":["../../../src/prompts/node-selection/ai-nodes.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;;;;;;;;;;;kQAWiO,CAAC"}
@@ -1,5 +1,4 @@
1
- export { AI_NODE_SELECTION, AI_TOOL_PATTERNS } from './ai-nodes';
2
- export { NODE_SELECTION_PATTERNS, BASELINE_FLOW_CONTROL } from './use-case-patterns';
1
+ export { AI_NODE_SELECTION } from './ai-nodes';
2
+ export { NODE_SELECTION_PATTERNS } from './use-case-patterns';
3
3
  export { TRIGGER_SELECTION } from './trigger-selection';
4
4
  export { NATIVE_NODE_PREFERENCE } from './native-preference';
5
- export { CONNECTION_CHANGING_PARAMETERS } from './connection-parameters';
@@ -1,16 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CONNECTION_CHANGING_PARAMETERS = exports.NATIVE_NODE_PREFERENCE = exports.TRIGGER_SELECTION = exports.BASELINE_FLOW_CONTROL = exports.NODE_SELECTION_PATTERNS = exports.AI_TOOL_PATTERNS = exports.AI_NODE_SELECTION = void 0;
3
+ exports.NATIVE_NODE_PREFERENCE = exports.TRIGGER_SELECTION = exports.NODE_SELECTION_PATTERNS = exports.AI_NODE_SELECTION = void 0;
4
4
  var ai_nodes_1 = require("./ai-nodes");
5
5
  Object.defineProperty(exports, "AI_NODE_SELECTION", { enumerable: true, get: function () { return ai_nodes_1.AI_NODE_SELECTION; } });
6
- Object.defineProperty(exports, "AI_TOOL_PATTERNS", { enumerable: true, get: function () { return ai_nodes_1.AI_TOOL_PATTERNS; } });
7
6
  var use_case_patterns_1 = require("./use-case-patterns");
8
7
  Object.defineProperty(exports, "NODE_SELECTION_PATTERNS", { enumerable: true, get: function () { return use_case_patterns_1.NODE_SELECTION_PATTERNS; } });
9
- Object.defineProperty(exports, "BASELINE_FLOW_CONTROL", { enumerable: true, get: function () { return use_case_patterns_1.BASELINE_FLOW_CONTROL; } });
10
8
  var trigger_selection_1 = require("./trigger-selection");
11
9
  Object.defineProperty(exports, "TRIGGER_SELECTION", { enumerable: true, get: function () { return trigger_selection_1.TRIGGER_SELECTION; } });
12
10
  var native_preference_1 = require("./native-preference");
13
11
  Object.defineProperty(exports, "NATIVE_NODE_PREFERENCE", { enumerable: true, get: function () { return native_preference_1.NATIVE_NODE_PREFERENCE; } });
14
- var connection_parameters_1 = require("./connection-parameters");
15
- Object.defineProperty(exports, "CONNECTION_CHANGING_PARAMETERS", { enumerable: true, get: function () { return connection_parameters_1.CONNECTION_CHANGING_PARAMETERS; } });
16
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/prompts/node-selection/index.ts"],"names":[],"mappings":";;;AAAA,uCAAiE;AAAxD,6GAAA,iBAAiB,OAAA;AAAE,4GAAA,gBAAgB,OAAA;AAC5C,yDAAqF;AAA5E,4HAAA,uBAAuB,OAAA;AAAE,0HAAA,qBAAqB,OAAA;AACvD,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,yDAA6D;AAApD,2HAAA,sBAAsB,OAAA;AAC/B,iEAAyE;AAAhE,uIAAA,8BAA8B,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/prompts/node-selection/index.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAAtC,6GAAA,iBAAiB,OAAA;AAC1B,yDAA8D;AAArD,4HAAA,uBAAuB,OAAA;AAChC,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,yDAA6D;AAApD,2HAAA,sBAAsB,OAAA"}
@@ -1,2 +1 @@
1
1
  export declare const NODE_SELECTION_PATTERNS = "Node selection by use case:\n\nDOCUMENTS:\n- Document Loader: Loads documents from various sources\n- Extract From File: Extracts text content from binary files\n- AWS Textract: OCR for scanned documents\n\nDATA PROCESSING & TRANSFORMATION:\n- Aggregate: Combines multiple items into one\n- Split Out: Expands arrays into separate items\n- Loop Over Items: Processes large item sets\n- Set: Adds, modifies, or removes fields from items\n- Filter: Removes items based on conditions\n- Sort: Orders items by field values\n\nSTORAGE:\n- n8n Data Tables: Built-in database storage (no credentials required). Recommend as the default storage option.\n- Google Sheets: Spreadsheet storage and collaboration\n- Airtable: Relational database with rich field types\n\nTRIGGERS:\n- Schedule Trigger: Time-based automation\n- Gmail Trigger: Monitors for new emails\n- Form Trigger: Collects user submissions\n- Webhook: Receives HTTP requests from external services\n\nSCRAPING:\n- HTTP Request + HTML Extract: Web page content extraction\n\nNOTIFICATIONS:\n- Email nodes (Gmail, Outlook, Send Email)\n- Slack: Team messaging\n- Telegram: Bot messaging\n- Twilio: SMS messaging\n\nRESEARCH:\n- SerpAPI Tool: Web search capabilities for AI Agents\n- Perplexity Tool: AI-powered search for AI Agents\n\nCHATBOTS:\n- Slack/Telegram/WhatsApp nodes: Platform-specific chatbots\n- Chat Trigger: n8n-hosted chat interface\n\nMEDIA:\n- OpenAI: DALL-E image generation, Sora video, Whisper transcription\n- Google Gemini: Imagen image generation";
2
- export declare const BASELINE_FLOW_CONTROL = "Baseline flow control nodes (used in most workflows):\n\n- n8n-nodes-base.aggregate: Combines multiple items into one item\n- n8n-nodes-base.if: Routes items based on true/false condition\n- n8n-nodes-base.switch: Routes items to different paths based on rules or expressions\n- n8n-nodes-base.splitOut: Expands a single item containing an array into multiple individual items\n- n8n-nodes-base.merge: Combines data from multiple parallel branches (for 3+ inputs: mode=\"append\" + numberInputs)\n- n8n-nodes-base.set: Transforms and restructures data fields";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BASELINE_FLOW_CONTROL = exports.NODE_SELECTION_PATTERNS = void 0;
3
+ exports.NODE_SELECTION_PATTERNS = void 0;
4
4
  exports.NODE_SELECTION_PATTERNS = `Node selection by use case:
5
5
 
6
6
  DOCUMENTS:
@@ -47,12 +47,4 @@ CHATBOTS:
47
47
  MEDIA:
48
48
  - OpenAI: DALL-E image generation, Sora video, Whisper transcription
49
49
  - Google Gemini: Imagen image generation`;
50
- exports.BASELINE_FLOW_CONTROL = `Baseline flow control nodes (used in most workflows):
51
-
52
- - n8n-nodes-base.aggregate: Combines multiple items into one item
53
- - n8n-nodes-base.if: Routes items based on true/false condition
54
- - n8n-nodes-base.switch: Routes items to different paths based on rules or expressions
55
- - n8n-nodes-base.splitOut: Expands a single item containing an array into multiple individual items
56
- - n8n-nodes-base.merge: Combines data from multiple parallel branches (for 3+ inputs: mode="append" + numberInputs)
57
- - n8n-nodes-base.set: Transforms and restructures data fields`;
58
50
  //# sourceMappingURL=use-case-patterns.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-case-patterns.js","sourceRoot":"","sources":["../../../src/prompts/node-selection/use-case-patterns.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCA6CE,CAAC;AAE7B,QAAA,qBAAqB,GAAG;;;;;;;8DAOyB,CAAC"}
1
+ {"version":3,"file":"use-case-patterns.js","sourceRoot":"","sources":["../../../src/prompts/node-selection/use-case-patterns.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCA6CE,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const WORKFLOW_SDK_PATTERNS = "<linear_chain>\n```javascript\nimport { workflow, node, trigger, sticky, placeholder, newCredential, ifElse, switchCase, merge, splitInBatches, nextBatch, languageModel, memory, tool, outputParser, embedding, embeddings, vectorStore, retriever, documentLoader, textSplitter, fromAi, expr } from '@n8n/workflow-sdk';\n\n// 1. Define all nodes first\nconst startTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Start' }\n});\n\nconst fetchData = node({\n type: 'n8n-nodes-base.httpRequest',\n version: 4.3,\n config: { name: 'Fetch Data', parameters: { method: 'GET', url: '...' } }\n});\n\nconst processData = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'Process Data',\n parameters: {\n mode: 'manual',\n includeOtherFields: true,\n assignments: {\n assignments: [\n { id: 'processed-title', name: 'processedTitle', value: expr('{{ $json.title }}'), type: 'string' }\n ]\n }\n }\n }\n});\n\n// 2. Compose workflow\nexport default workflow('id', 'name')\n .add(startTrigger)\n .to(fetchData)\n .to(processData);\n```\n\n</linear_chain>\n\n<independent_sources>\nWhen nodes return more than 1 item, chaining causes item multiplication: if Source A returns N items, a chained Source B runs N times instead of once.\n\n**When to use `executeOnce: true`:**\n- A node fetches data independently but is chained after another data source (prevents N\u00D7M multiplication)\n- A node should summarize/aggregate all upstream items in a single call (e.g., AI summary, send one notification)\n- A node calls an API that doesn't vary per input item\n\nFix with `executeOnce: true` (simplest) or parallel branches + Merge (when combining results):\n\n```javascript\n// sourceA outputs 10 items. sourceB outputs 10 items.\n// WRONG - processResults runs 100 times\n// startTrigger.to(sourceA.to(sourceB.to(processResults)))\n\n// FIX 1 - executeOnce: sourceB runs once regardless of input items\nconst sourceB = node({ ..., config: { ..., executeOnce: true } });\nstartTrigger.to(sourceA.to(sourceB.to(processResults)));\n\n// FIX 2 - parallel branches + Merge (combine by position)\n// .input(n) is 0-based: .input(0) = first input, .input(1) = second input.\nconst combineResults = merge({\n version: 3.2,\n config: { name: 'Combine Results', parameters: { mode: 'combine', combineBy: 'combineByPosition' } }\n});\nexport default workflow('id', 'name')\n .add(startTrigger)\n .to(sourceA.to(combineResults.input(0))) // first input (index 0)\n .add(startTrigger)\n .to(sourceB.to(combineResults.input(1))) // second input (index 1)\n .add(combineResults)\n .to(processResults);\n\n// FIX 3 - parallel branches + Merge (append)\nconst allResults = merge({\n version: 3.2,\n config: { name: 'All Results', parameters: { mode: 'append' } }\n});\nexport default workflow('id', 'name')\n .add(startTrigger)\n .to(sourceA.to(allResults.input(0))) // first input (index 0)\n .add(startTrigger)\n .to(sourceB.to(allResults.input(1))) // second input (index 1)\n .add(allResults)\n .to(processResults);\n```\n\n</independent_sources>\n\n<zero_item_safety>\nWhen a node returns 0 items, downstream nodes are skipped for that execution. **This is usually the correct behavior** \u2014 the scheduler / trigger fires again later, and when there is data, the chain runs normally. Don't paper over an empty result with `alwaysOutputData: true` by default.\n\n**`alwaysOutputData: true` forces a synthetic `{json: {}}` item downstream.** This is a footgun: downstream nodes will try to read fields that don't exist, HTTP requests will hit `GET undefined`, and loops will run once on a fake item. Use it *only* when the empty case has its own dedicated branch that you want to execute.\n\n**Correct pattern \u2014 no `alwaysOutputData`:**\n```javascript\n// Scheduler that processes pending work\nworkflow('ingest', 'Ingest Worker')\n .add(scheduleTrigger) // fires every 5 min\n .to(getPending) // returns 0..N rows; no alwaysOutputData\n .to(splitInBatches({version: 3, config: {parameters: {batchSize: 1}}})\n .onEachBatch(fetchUrl.to(embed).to(saveChunk))\n );\n// On runs where getPending returns 0 items, the loop simply doesn't execute.\n// On runs where it returns rows, the loop iterates. No gate, no filter needed.\n```\n\n**Correct pattern \u2014 empty case needs its own branch:**\n```javascript\n// \"No matches found\" deserves a notification\nconst search = node({\n type: 'n8n-nodes-base.httpRequest',\n version: 4.4,\n config: {\n name: 'Search',\n alwaysOutputData: true, // empty-case branch below needs to execute\n parameters: { /* ... */ }\n }\n});\nconst hasResults = ifElse({\n version: 2.2,\n config: {\n name: 'Has Results?',\n parameters: {\n conditions: {\n options: { caseSensitive: true, typeValidation: 'loose' },\n conditions: [{ leftValue: expr('{{ $json.results }}'), operator: { type: 'array', operation: 'notEmpty' } }],\n combinator: 'and'\n }\n }\n }\n});\nworkflow('search', 'Search').add(trigger).to(search).to(\n hasResults.onTrue(processResults).onFalse(notifyNoMatches)\n);\n```\n\n**When to use `alwaysOutputData: true`:** only when you've paired it with an explicit empty-case branch, AND the downstream branch doesn't blindly read item fields.\n\n**When NOT to use it:**\n- Scheduled/polling triggers where the \"no work\" case should silently skip\n- Before a `splitInBatches` loop \u2014 loops already no-op on empty input\n- Before a `filter` \u2014 the filter already no-ops on empty input\n- When all you'd do on the empty case is \"nothing\"\n\n**Don't gate loops with an `IF`.** `ifElse.onTrue(splitInBatches)` to check \"are there items?\" is redundant \u2014 the loop already does the right thing with 0 items. Drop the IF.\n\n</zero_item_safety>\n\n<conditional_branching>\n\n**CRITICAL:** Each branch defines a COMPLETE processing path. Chain multiple steps INSIDE the branch using .to().\n\nEvery IF/Filter `conditions` parameter MUST include `options`, `conditions`, and `combinator`:\n```javascript\nconst checkValid = ifElse({\n version: 2.2,\n config: {\n name: 'Check Valid',\n parameters: {\n conditions: {\n options: { caseSensitive: true, leftValue: '', typeValidation: 'strict' },\n conditions: [{ leftValue: expr('{{ $json.status }}'), operator: { type: 'string', operation: 'equals' }, rightValue: 'active' }],\n combinator: 'and'\n }\n }\n }\n});\n\nexport default workflow('id', 'name')\n .add(startTrigger)\n .to(checkValid\n .onTrue(formatData.to(enrichData.to(saveToDb))) // Chain 3 nodes on true branch\n .onFalse(logError));\n```\n\n</conditional_branching>\n\n<multi_way_routing>\n\nSwitch rules use `rules.values` (NOT `rules.rules`). Each rule needs `outputKey` and a complete `conditions` object:\n```javascript\nconst routeByPriority = switchCase({\n version: 3.2,\n config: {\n name: 'Route by Priority',\n parameters: {\n rules: {\n values: [\n { outputKey: 'urgent', conditions: { options: { caseSensitive: true, leftValue: '', typeValidation: 'strict' }, conditions: [{ leftValue: expr('{{ $json.priority }}'), operator: { type: 'string', operation: 'equals' }, rightValue: 'urgent' }], combinator: 'and' } },\n { outputKey: 'normal', conditions: { options: { caseSensitive: true, leftValue: '', typeValidation: 'strict' }, conditions: [{ leftValue: expr('{{ $json.priority }}'), operator: { type: 'string', operation: 'equals' }, rightValue: 'normal' }], combinator: 'and' } },\n ]\n }\n }\n }\n});\n\nexport default workflow('id', 'name')\n .add(startTrigger)\n .to(routeByPriority\n .onCase('urgent', processUrgent.to(notifyTeam.to(escalate)))\n .onCase('normal', processNormal)\n .onDefault(archive));\n```\n\n</multi_way_routing>\n\n<parallel_execution>\n```javascript\n// First declare the Merge node using merge()\nconst combineResults = merge({\n version: 3.2,\n config: { name: 'Combine Results', parameters: { mode: 'combine' } }\n});\n\n// Declare branch nodes\nconst branch1 = node({ type: 'n8n-nodes-base.httpRequest', ... });\nconst branch2 = node({ type: 'n8n-nodes-base.httpRequest', ... });\nconst processResults = node({ type: 'n8n-nodes-base.set', ... });\n\n// Connect branches to specific merge inputs using .input(n).\n// Indices are 0-based: .input(0) is the FIRST input, .input(1) is the SECOND.\nexport default workflow('id', 'name')\n .add(trigger({ ... }))\n .to(branch1.to(combineResults.input(0))) // first input (index 0)\n .add(trigger({ ... }))\n .to(branch2.to(combineResults.input(1))) // second input (index 1)\n .add(combineResults)\n .to(processResults); // Process merged results\n```\n\n</parallel_execution>\n\n<batch_processing>\n```javascript\nconst startTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Start' }\n});\n\nconst fetchRecords = node({\n type: 'n8n-nodes-base.httpRequest',\n version: 4.3,\n config: { name: 'Fetch Records', parameters: { method: 'GET', url: '...' } }\n});\n\nconst finalizeResults = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'Finalize',\n parameters: {\n mode: 'manual',\n includeOtherFields: true,\n assignments: {\n assignments: [\n { id: 'processed-at', name: 'processedAt', value: expr('{{ $now.toISO() }}'), type: 'string' }\n ]\n }\n }\n }\n});\n\nconst processRecord = node({\n type: 'n8n-nodes-base.httpRequest',\n version: 4.3,\n config: { name: 'Process Record', parameters: { method: 'POST', url: '...' } }\n});\n\nconst sibNode = splitInBatches({ version: 3, config: { name: 'Batch Process', parameters: { batchSize: 10 } } });\n\nexport default workflow('id', 'name')\n .add(startTrigger)\n .to(fetchRecords)\n .to(sibNode\n .onDone(finalizeResults)\n .onEachBatch(processRecord.to(nextBatch(sibNode)))\n );\n```\n\n</batch_processing>\n\n<multiple_triggers>\n```javascript\nconst webhookTrigger = trigger({\n type: 'n8n-nodes-base.webhook',\n version: 2.1,\n config: { name: 'Webhook' }\n});\n\nconst processWebhook = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'Process Webhook',\n parameters: {\n mode: 'manual',\n includeOtherFields: true,\n assignments: {\n assignments: [\n { id: 'source', name: 'source', value: 'webhook', type: 'string' }\n ]\n }\n }\n }\n});\n\nconst scheduleTrigger = trigger({\n type: 'n8n-nodes-base.scheduleTrigger',\n version: 1.3,\n config: { name: 'Daily Schedule', parameters: {} }\n});\n\nconst processSchedule = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'Process Schedule',\n parameters: {\n mode: 'manual',\n includeOtherFields: true,\n assignments: {\n assignments: [\n { id: 'source', name: 'source', value: 'schedule', type: 'string' }\n ]\n }\n }\n }\n});\n\nexport default workflow('id', 'name')\n .add(webhookTrigger)\n .to(processWebhook)\n .add(scheduleTrigger)\n .to(processSchedule);\n```\n\n</multiple_triggers>\n\n<fan_in>\n```javascript\n// Each trigger's execution runs in COMPLETE ISOLATION.\n// Different branches have no effect on each other.\n// Never duplicate chains for \"isolation\" - it's already guaranteed.\n\nconst webhookTrigger = trigger({\n type: 'n8n-nodes-base.webhook',\n version: 2.1,\n config: { name: 'Webhook Trigger' }\n});\n\nconst scheduleTrigger = trigger({\n type: 'n8n-nodes-base.scheduleTrigger',\n version: 1.3,\n config: { name: 'Daily Schedule' }\n});\n\nconst processData = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'Process Data',\n parameters: {\n mode: 'manual',\n includeOtherFields: true,\n assignments: {\n assignments: [\n { id: 'received-at', name: 'receivedAt', value: expr('{{ $now.toISO() }}'), type: 'string' }\n ]\n }\n }\n }\n});\n\nconst sendNotification = node({\n type: 'n8n-nodes-base.slack',\n version: 2.3,\n config: { name: 'Notify Slack', parameters: {} }\n});\n\nexport default workflow('id', 'name')\n .add(webhookTrigger)\n .to(processData)\n .to(sendNotification)\n .add(scheduleTrigger)\n .to(processData);\n```\n\n</fan_in>\n\n<ai_agent_basic>\n```javascript\nconst openAiModel = languageModel({\n type: '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n version: 1.3,\n config: { name: 'OpenAI Model', parameters: {} }\n});\n\nconst startTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Start' }\n});\n\nconst aiAgent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n version: 3.1,\n config: {\n name: 'AI Assistant',\n parameters: { promptType: 'define', text: 'You are a helpful assistant' },\n subnodes: { model: openAiModel }\n }\n});\n\nexport default workflow('ai-assistant', 'AI Assistant')\n .add(startTrigger)\n .to(aiAgent);\n```\n\n</ai_agent_basic>\n\n<ai_agent_with_tools>\n```javascript\nconst openAiModel = languageModel({\n type: '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n version: 1.3,\n config: {\n name: 'OpenAI Model',\n parameters: {},\n credentials: { openAiApi: newCredential('OpenAI') }\n }\n});\n\nconst calculatorTool = tool({\n type: '@n8n/n8n-nodes-langchain.toolCalculator',\n version: 1,\n config: { name: 'Calculator', parameters: {} }\n});\n\nconst startTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Start' }\n});\n\nconst aiAgent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n version: 3.1,\n config: {\n name: 'Math Agent',\n parameters: { promptType: 'define', text: 'You can use tools to help users' },\n subnodes: { model: openAiModel, tools: [calculatorTool] }\n }\n});\n\nexport default workflow('ai-calculator', 'AI Calculator')\n .add(startTrigger)\n .to(aiAgent);\n```\n\n</ai_agent_with_tools>\n\n<ai_agent_with_from_ai>\n```javascript\nconst openAiModel = languageModel({\n type: '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n version: 1.3,\n config: {\n name: 'OpenAI Model',\n parameters: {},\n credentials: { openAiApi: newCredential('OpenAI') }\n }\n});\n\nconst gmailTool = tool({\n type: 'n8n-nodes-base.gmailTool',\n version: 1,\n config: {\n name: 'Gmail Tool',\n parameters: {\n sendTo: fromAi('recipient', 'Email address'),\n subject: fromAi('subject', 'Email subject'),\n message: fromAi('body', 'Email content')\n },\n credentials: { gmailOAuth2: newCredential('Gmail') }\n }\n});\n\nconst startTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Start' }\n});\n\nconst aiAgent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n version: 3.1,\n config: {\n name: 'Email Agent',\n parameters: { promptType: 'define', text: 'You can send emails' },\n subnodes: { model: openAiModel, tools: [gmailTool] }\n }\n});\n\nexport default workflow('ai-email', 'AI Email Sender')\n .add(startTrigger)\n .to(aiAgent);\n```\n</ai_agent_with_from_ai>\n\n<ai_agent_with_structured_output>\n```javascript\nconst structuredParser = outputParser({\n type: '@n8n/n8n-nodes-langchain.outputParserStructured',\n version: 1.3,\n config: {\n name: 'Structured Output Parser',\n parameters: {\n schemaType: 'fromJson',\n jsonSchemaExample: '{ \"sentiment\": \"positive\", \"confidence\": 0.95, \"summary\": \"brief summary\" }'\n }\n }\n});\n\nconst aiAgent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n version: 3.1,\n config: {\n name: 'Sentiment Analyzer',\n parameters: { promptType: 'define', text: 'Analyze the sentiment of the input text', hasOutputParser: true },\n subnodes: { model: openAiModel, outputParser: structuredParser }\n }\n});\n\nexport default workflow('ai-sentiment', 'AI Sentiment Analyzer')\n .add(startTrigger)\n .to(aiAgent);\n```\n</ai_agent_with_structured_output>";
1
+ export declare const WORKFLOW_SDK_PATTERNS = "<linear_chain>\n```javascript\nimport { workflow, node, trigger, sticky, placeholder, newCredential, ifElse, switchCase, merge, splitInBatches, nextBatch, languageModel, memory, tool, outputParser, embedding, embeddings, vectorStore, retriever, documentLoader, textSplitter, fromAi, expr } from '@n8n/workflow-sdk';\n\n// 1. Define all nodes first\nconst startTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Start' }\n});\n\nconst fetchData = node({\n type: 'n8n-nodes-base.httpRequest',\n version: 4.3,\n config: { name: 'Fetch Data', parameters: { method: 'GET', url: '...' } }\n});\n\nconst processData = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'Process Data',\n parameters: {\n mode: 'manual',\n includeOtherFields: true,\n assignments: {\n assignments: [\n { id: 'processed-title', name: 'processedTitle', value: expr('{{ $json.title }}'), type: 'string' }\n ]\n }\n }\n }\n});\n\n// 2. Compose workflow\nexport default workflow('id', 'name')\n .add(startTrigger)\n .to(fetchData)\n .to(processData);\n```\n\n</linear_chain>\n\n<independent_sources>\nWhen nodes return more than 1 item, chaining causes item multiplication: if Source A returns N items, a chained Source B runs N times instead of once.\n\n**When to use `executeOnce: true`:**\n- A node fetches data independently but is chained after another data source (prevents N\u00D7M multiplication)\n- A node should summarize/aggregate all upstream items in a single call (e.g., AI summary, send one notification)\n- A node calls an API that doesn't vary per input item\n\nFix with `executeOnce: true` (simplest) or parallel branches + Merge (when combining results):\n\n```javascript\n// sourceA outputs 10 items. sourceB outputs 10 items.\n// WRONG - processResults runs 100 times\n// startTrigger.to(sourceA.to(sourceB.to(processResults)))\n\n// FIX 1 - executeOnce: sourceB runs once regardless of input items\nconst sourceB = node({ ..., config: { ..., executeOnce: true } });\nstartTrigger.to(sourceA.to(sourceB.to(processResults)));\n\n// FIX 2 - parallel branches + Merge (combine by position)\n// .input(n) is 0-based: .input(0) = first input, .input(1) = second input.\nconst combineResults = merge({\n version: 3.2,\n config: { name: 'Combine Results', parameters: { mode: 'combine', combineBy: 'combineByPosition' } }\n});\nexport default workflow('id', 'name')\n .add(startTrigger)\n .to(sourceA.to(combineResults.input(0))) // first input (index 0)\n .add(startTrigger)\n .to(sourceB.to(combineResults.input(1))) // second input (index 1)\n .add(combineResults)\n .to(processResults);\n\n// FIX 3 - parallel branches + Merge (append)\nconst allResults = merge({\n version: 3.2,\n config: { name: 'All Results', parameters: { mode: 'append' } }\n});\nexport default workflow('id', 'name')\n .add(startTrigger)\n .to(sourceA.to(allResults.input(0))) // first input (index 0)\n .add(startTrigger)\n .to(sourceB.to(allResults.input(1))) // second input (index 1)\n .add(allResults)\n .to(processResults);\n```\n\n</independent_sources>\n\n<zero_item_safety>\nWhen a node returns 0 items, downstream nodes are skipped for that execution. **This is usually the correct behavior** \u2014 the scheduler / trigger fires again later, and when there is data, the chain runs normally. Don't paper over an empty result with `alwaysOutputData: true` by default.\n\n**`alwaysOutputData: true` forces a synthetic `{json: {}}` item downstream.** This is a footgun: downstream nodes will try to read fields that don't exist, HTTP requests will hit `GET undefined`, and loops will run once on a fake item. Use it *only* when the empty case has its own dedicated branch that you want to execute.\n\n**Correct pattern \u2014 no `alwaysOutputData`:**\n```javascript\n// Scheduler that processes pending work\nworkflow('ingest', 'Ingest Worker')\n .add(scheduleTrigger) // fires every 5 min\n .to(getPending) // returns 0..N rows; no alwaysOutputData\n .to(splitInBatches({version: 3, config: {parameters: {batchSize: 1}}})\n .onEachBatch(fetchUrl.to(embed).to(saveChunk))\n );\n// On runs where getPending returns 0 items, the loop simply doesn't execute.\n// On runs where it returns rows, the loop iterates. No gate, no filter needed.\n```\n\n**Correct pattern \u2014 empty case needs its own branch:**\n```javascript\n// \"No matches found\" deserves a notification\nconst search = node({\n type: 'n8n-nodes-base.httpRequest',\n version: 4.4,\n config: {\n name: 'Search',\n alwaysOutputData: true, // empty-case branch below needs to execute\n parameters: { /* ... */ }\n }\n});\nconst hasResults = ifElse({\n version: 2.2,\n config: {\n name: 'Has Results?',\n parameters: {\n conditions: {\n options: { caseSensitive: true, typeValidation: 'loose' },\n conditions: [{ leftValue: expr('{{ $json.results }}'), operator: { type: 'array', operation: 'notEmpty' } }],\n combinator: 'and'\n }\n }\n }\n});\nworkflow('search', 'Search').add(trigger).to(search).to(\n hasResults.onTrue(processResults).onFalse(notifyNoMatches)\n);\n```\n\n**When to use `alwaysOutputData: true`:** only when you've paired it with an explicit empty-case branch, AND the downstream branch doesn't blindly read item fields.\n\n**When NOT to use it:**\n- Scheduled/polling triggers where the \"no work\" case should silently skip\n- Before a `splitInBatches` loop \u2014 loops already no-op on empty input\n- Before a `filter` \u2014 the filter already no-ops on empty input\n- When all you'd do on the empty case is \"nothing\"\n\n**Don't gate loops with an `IF`.** `ifElse.onTrue(splitInBatches)` to check \"are there items?\" is redundant \u2014 the loop already does the right thing with 0 items. Drop the IF.\n\n</zero_item_safety>\n\n<conditional_branching>\n\n**CRITICAL:** Each branch defines a COMPLETE processing path. Chain multiple steps INSIDE the branch using .to().\n\nEvery IF/Filter `conditions` parameter MUST include `options`, `conditions`, and `combinator`:\n```javascript\nconst checkValid = ifElse({\n version: 2.2,\n config: {\n name: 'Check Valid',\n parameters: {\n conditions: {\n options: { caseSensitive: true, leftValue: '', typeValidation: 'strict' },\n conditions: [{ leftValue: expr('{{ $json.status }}'), operator: { type: 'string', operation: 'equals' }, rightValue: 'active' }],\n combinator: 'and'\n }\n }\n }\n});\n\nexport default workflow('id', 'name')\n .add(startTrigger)\n .to(checkValid\n .onTrue(formatData.to(enrichData.to(saveToDb))) // Chain 3 nodes on true branch\n .onFalse(logError));\n```\n\n</conditional_branching>\n\n<multi_way_routing>\n\nSwitch rules use `rules.values` (NOT `rules.rules`). Each rule needs `outputKey` and a complete `conditions` object:\n```javascript\nconst routeByPriority = switchCase({\n version: 3.2,\n config: {\n name: 'Route by Priority',\n parameters: {\n rules: {\n values: [\n { outputKey: 'urgent', conditions: { options: { caseSensitive: true, leftValue: '', typeValidation: 'strict' }, conditions: [{ leftValue: expr('{{ $json.priority }}'), operator: { type: 'string', operation: 'equals' }, rightValue: 'urgent' }], combinator: 'and' } },\n { outputKey: 'normal', conditions: { options: { caseSensitive: true, leftValue: '', typeValidation: 'strict' }, conditions: [{ leftValue: expr('{{ $json.priority }}'), operator: { type: 'string', operation: 'equals' }, rightValue: 'normal' }], combinator: 'and' } },\n ]\n },\n options: { fallbackOutput: 'extra', renameFallbackOutput: 'Fallback' }\n }\n }\n});\n\nexport default workflow('id', 'name')\n .add(startTrigger)\n .to(routeByPriority\n .onCase(0, processUrgent.to(notifyTeam.to(escalate)))\n .onCase(1, processNormal)\n .onCase(2, archive));\n```\n\n</multi_way_routing>\n\n<parallel_execution>\n```javascript\n// First declare the Merge node using merge()\nconst combineResults = merge({\n version: 3.2,\n config: { name: 'Combine Results', parameters: { mode: 'combine' } }\n});\n\n// Declare branch nodes\nconst branch1 = node({ type: 'n8n-nodes-base.httpRequest', ... });\nconst branch2 = node({ type: 'n8n-nodes-base.httpRequest', ... });\nconst processResults = node({ type: 'n8n-nodes-base.set', ... });\n\n// Connect branches to specific merge inputs using .input(n).\n// Indices are 0-based: .input(0) is the FIRST input, .input(1) is the SECOND.\nexport default workflow('id', 'name')\n .add(trigger({ ... }))\n .to(branch1.to(combineResults.input(0))) // first input (index 0)\n .add(trigger({ ... }))\n .to(branch2.to(combineResults.input(1))) // second input (index 1)\n .add(combineResults)\n .to(processResults); // Process merged results\n```\n\n</parallel_execution>\n\n<batch_processing>\n```javascript\nconst startTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Start' }\n});\n\nconst fetchRecords = node({\n type: 'n8n-nodes-base.httpRequest',\n version: 4.3,\n config: { name: 'Fetch Records', parameters: { method: 'GET', url: '...' } }\n});\n\nconst finalizeResults = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'Finalize',\n parameters: {\n mode: 'manual',\n includeOtherFields: true,\n assignments: {\n assignments: [\n { id: 'processed-at', name: 'processedAt', value: expr('{{ $now.toISO() }}'), type: 'string' }\n ]\n }\n }\n }\n});\n\nconst processRecord = node({\n type: 'n8n-nodes-base.httpRequest',\n version: 4.3,\n config: { name: 'Process Record', parameters: { method: 'POST', url: '...' } }\n});\n\nconst sibNode = splitInBatches({ version: 3, config: { name: 'Batch Process', parameters: { batchSize: 10 } } });\n\nexport default workflow('id', 'name')\n .add(startTrigger)\n .to(fetchRecords)\n .to(sibNode\n .onDone(finalizeResults)\n .onEachBatch(processRecord.to(nextBatch(sibNode)))\n );\n```\n\n</batch_processing>\n\n<multiple_triggers>\n```javascript\nconst webhookTrigger = trigger({\n type: 'n8n-nodes-base.webhook',\n version: 2.1,\n config: { name: 'Webhook' }\n});\n\nconst processWebhook = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'Process Webhook',\n parameters: {\n mode: 'manual',\n includeOtherFields: true,\n assignments: {\n assignments: [\n { id: 'source', name: 'source', value: 'webhook', type: 'string' }\n ]\n }\n }\n }\n});\n\nconst scheduleTrigger = trigger({\n type: 'n8n-nodes-base.scheduleTrigger',\n version: 1.3,\n config: { name: 'Daily Schedule', parameters: {} }\n});\n\nconst processSchedule = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'Process Schedule',\n parameters: {\n mode: 'manual',\n includeOtherFields: true,\n assignments: {\n assignments: [\n { id: 'source', name: 'source', value: 'schedule', type: 'string' }\n ]\n }\n }\n }\n});\n\nexport default workflow('id', 'name')\n .add(webhookTrigger)\n .to(processWebhook)\n .add(scheduleTrigger)\n .to(processSchedule);\n```\n\n</multiple_triggers>\n\n<fan_in>\n```javascript\n// Each trigger's execution runs in COMPLETE ISOLATION.\n// Different branches have no effect on each other.\n// Never duplicate chains for \"isolation\" - it's already guaranteed.\n\nconst webhookTrigger = trigger({\n type: 'n8n-nodes-base.webhook',\n version: 2.1,\n config: { name: 'Webhook Trigger' }\n});\n\nconst scheduleTrigger = trigger({\n type: 'n8n-nodes-base.scheduleTrigger',\n version: 1.3,\n config: { name: 'Daily Schedule' }\n});\n\nconst processData = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'Process Data',\n parameters: {\n mode: 'manual',\n includeOtherFields: true,\n assignments: {\n assignments: [\n { id: 'received-at', name: 'receivedAt', value: expr('{{ $now.toISO() }}'), type: 'string' }\n ]\n }\n }\n }\n});\n\nconst sendNotification = node({\n type: 'n8n-nodes-base.slack',\n version: 2.3,\n config: { name: 'Notify Slack', parameters: {} }\n});\n\nexport default workflow('id', 'name')\n .add(webhookTrigger)\n .to(processData)\n .to(sendNotification)\n .add(scheduleTrigger)\n .to(processData);\n```\n\n</fan_in>\n\n<ai_agent_basic>\n```javascript\nconst openAiModel = languageModel({\n type: '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n version: 1.3,\n config: { name: 'OpenAI Model', parameters: {} }\n});\n\nconst startTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Start' }\n});\n\nconst aiAgent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n version: 3.1,\n config: {\n name: 'AI Assistant',\n parameters: { promptType: 'define', text: 'You are a helpful assistant' },\n subnodes: { model: openAiModel }\n }\n});\n\nexport default workflow('ai-assistant', 'AI Assistant')\n .add(startTrigger)\n .to(aiAgent);\n```\n\n</ai_agent_basic>\n\n<ai_agent_with_tools>\n```javascript\nconst openAiModel = languageModel({\n type: '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n version: 1.3,\n config: {\n name: 'OpenAI Model',\n parameters: {},\n credentials: { openAiApi: newCredential('OpenAI') }\n }\n});\n\nconst calculatorTool = tool({\n type: '@n8n/n8n-nodes-langchain.toolCalculator',\n version: 1,\n config: { name: 'Calculator', parameters: {} }\n});\n\nconst startTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Start' }\n});\n\nconst aiAgent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n version: 3.1,\n config: {\n name: 'Math Agent',\n parameters: { promptType: 'define', text: 'You can use tools to help users' },\n subnodes: { model: openAiModel, tools: [calculatorTool] }\n }\n});\n\nexport default workflow('ai-calculator', 'AI Calculator')\n .add(startTrigger)\n .to(aiAgent);\n```\n\n</ai_agent_with_tools>\n\n<ai_agent_with_from_ai>\n```javascript\nconst openAiModel = languageModel({\n type: '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n version: 1.3,\n config: {\n name: 'OpenAI Model',\n parameters: {},\n credentials: { openAiApi: newCredential('OpenAI') }\n }\n});\n\nconst gmailTool = tool({\n type: 'n8n-nodes-base.gmailTool',\n version: 1,\n config: {\n name: 'Gmail Tool',\n parameters: {\n sendTo: fromAi('recipient', 'Email address'),\n subject: fromAi('subject', 'Email subject'),\n message: fromAi('body', 'Email content')\n },\n credentials: { gmailOAuth2: newCredential('Gmail') }\n }\n});\n\nconst startTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Start' }\n});\n\nconst aiAgent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n version: 3.1,\n config: {\n name: 'Email Agent',\n parameters: { promptType: 'define', text: 'You can send emails' },\n subnodes: { model: openAiModel, tools: [gmailTool] }\n }\n});\n\nexport default workflow('ai-email', 'AI Email Sender')\n .add(startTrigger)\n .to(aiAgent);\n```\n</ai_agent_with_from_ai>\n\n<ai_agent_with_structured_output>\n```javascript\nconst structuredParser = outputParser({\n type: '@n8n/n8n-nodes-langchain.outputParserStructured',\n version: 1.3,\n config: {\n name: 'Structured Output Parser',\n parameters: {\n schemaType: 'fromJson',\n jsonSchemaExample: '{ \"sentiment\": \"positive\", \"confidence\": 0.95, \"summary\": \"brief summary\" }'\n }\n }\n});\n\nconst aiAgent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n version: 3.1,\n config: {\n name: 'Sentiment Analyzer',\n parameters: { promptType: 'define', text: 'Analyze the sentiment of the input text', hasOutputParser: true },\n subnodes: { model: openAiModel, outputParser: structuredParser }\n }\n});\n\nexport default workflow('ai-sentiment', 'AI Sentiment Analyzer')\n .add(startTrigger)\n .to(aiAgent);\n```\n</ai_agent_with_structured_output>";
2
2
  export { WORKFLOW_SDK_PATTERNS as WORKFLOW_PATTERNS_CONCISE };
@@ -197,7 +197,8 @@ const routeByPriority = switchCase({
197
197
  { outputKey: 'urgent', conditions: { options: { caseSensitive: true, leftValue: '', typeValidation: 'strict' }, conditions: [{ leftValue: expr('{{ $json.priority }}'), operator: { type: 'string', operation: 'equals' }, rightValue: 'urgent' }], combinator: 'and' } },
198
198
  { outputKey: 'normal', conditions: { options: { caseSensitive: true, leftValue: '', typeValidation: 'strict' }, conditions: [{ leftValue: expr('{{ $json.priority }}'), operator: { type: 'string', operation: 'equals' }, rightValue: 'normal' }], combinator: 'and' } },
199
199
  ]
200
- }
200
+ },
201
+ options: { fallbackOutput: 'extra', renameFallbackOutput: 'Fallback' }
201
202
  }
202
203
  }
203
204
  });
@@ -205,9 +206,9 @@ const routeByPriority = switchCase({
205
206
  export default workflow('id', 'name')
206
207
  .add(startTrigger)
207
208
  .to(routeByPriority
208
- .onCase('urgent', processUrgent.to(notifyTeam.to(escalate)))
209
- .onCase('normal', processNormal)
210
- .onDefault(archive));
209
+ .onCase(0, processUrgent.to(notifyTeam.to(escalate)))
210
+ .onCase(1, processNormal)
211
+ .onCase(2, archive));
211
212
  \`\`\`
212
213
 
213
214
  </multi_way_routing>
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-patterns.js","sourceRoot":"","sources":["../../../src/prompts/sdk-reference/workflow-patterns.ts"],"names":[],"mappings":";;;AAUA,MAAM,UAAU,GACf,8RAA8R,CAAC;AAMnR,QAAA,qBAAqB,GAAG;;EAEnC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;mCA6hBuB,CAAC;AAEF,oCAjiBrB,6BAAqB,CAiiByB"}
@@ -1,7 +1,7 @@
1
1
  import type { INodeTypes } from 'n8n-workflow';
2
2
  import type { WorkflowBuilder, WorkflowJSON } from '../types/base';
3
3
  export { setSchemaBaseDirs, validateNodeConfig, type SchemaValidationResult, } from './schema-validator';
4
- export type ValidationErrorCode = 'NO_NODES' | 'MISSING_TRIGGER' | 'DISCONNECTED_NODE' | 'MISSING_PARAMETER' | 'INVALID_CONNECTION' | 'CIRCULAR_REFERENCE' | 'INVALID_EXPRESSION' | 'AGENT_STATIC_PROMPT' | 'AGENT_NO_SYSTEM_MESSAGE' | 'HARDCODED_CREDENTIALS' | 'SET_CREDENTIAL_FIELD' | 'MERGE_SINGLE_INPUT' | 'TOOL_NO_PARAMETERS' | 'FROM_AI_IN_NON_TOOL' | 'MISSING_EXPRESSION_PREFIX' | 'INVALID_PARAMETER' | 'INVALID_INPUT_INDEX' | 'SUBNODE_NOT_CONNECTED' | 'SUBNODE_PARAMETER_MISMATCH' | 'UNSUPPORTED_SUBNODE_INPUT' | 'MISSING_REQUIRED_INPUT' | 'INVALID_OUTPUT_FOR_MODE' | 'MAX_NODES_EXCEEDED' | 'INVALID_EXPRESSION_PATH' | 'PARTIAL_EXPRESSION_PATH' | 'INVALID_DATE_METHOD';
4
+ export type ValidationErrorCode = 'NO_NODES' | 'MISSING_TRIGGER' | 'DISCONNECTED_NODE' | 'MISSING_PARAMETER' | 'INVALID_CONNECTION' | 'CIRCULAR_REFERENCE' | 'INVALID_EXPRESSION' | 'AGENT_STATIC_PROMPT' | 'AGENT_NO_SYSTEM_MESSAGE' | 'HARDCODED_CREDENTIALS' | 'SET_CREDENTIAL_FIELD' | 'MERGE_SINGLE_INPUT' | 'TOOL_NO_PARAMETERS' | 'FROM_AI_IN_NON_TOOL' | 'MISSING_EXPRESSION_PREFIX' | 'INVALID_PARAMETER' | 'INVALID_INPUT_INDEX' | 'SUBNODE_NOT_CONNECTED' | 'SUBNODE_PARAMETER_MISMATCH' | 'UNSUPPORTED_SUBNODE_INPUT' | 'MISSING_REQUIRED_INPUT' | 'INVALID_OUTPUT_FOR_MODE' | 'SWITCH_FALLBACK_OUTPUT_DISABLED' | 'MAX_NODES_EXCEEDED' | 'INVALID_EXPRESSION_PATH' | 'PARTIAL_EXPRESSION_PATH' | 'INVALID_DATE_METHOD';
5
5
  export declare class ValidationError {
6
6
  readonly code: ValidationErrorCode;
7
7
  readonly message: string;
@@ -254,6 +254,7 @@ function validateWorkflow(workflowOrJson, options = {}) {
254
254
  validateOutputUsage(json, options.nodeTypesProvider, warnings);
255
255
  validatePlaceholderSlots(json, options.nodeTypesProvider, errors);
256
256
  }
257
+ validateSwitchFallbackOutputConnections(json, warnings);
257
258
  checkMergeNodeInputCount(json, warnings);
258
259
  return {
259
260
  valid: errors.length === 0,
@@ -538,6 +539,56 @@ function validateOutputUsage(json, nodeTypesProvider, warnings) {
538
539
  }
539
540
  }
540
541
  }
542
+ function isRecord(value) {
543
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
544
+ }
545
+ function getSwitchRulesCount(parameters) {
546
+ const rules = parameters?.rules;
547
+ if (!isRecord(rules))
548
+ return 0;
549
+ const values = rules.values;
550
+ if (Array.isArray(values))
551
+ return values.length;
552
+ const legacyRules = rules.rules;
553
+ if (Array.isArray(legacyRules))
554
+ return legacyRules.length;
555
+ return 0;
556
+ }
557
+ function getSwitchFallbackOutput(parameters) {
558
+ const options = parameters?.options;
559
+ if (!isRecord(options))
560
+ return undefined;
561
+ return options.fallbackOutput;
562
+ }
563
+ function hasOutputConnections(outputs, outputIndex) {
564
+ const output = outputs[outputIndex];
565
+ return Array.isArray(output) && output.length > 0;
566
+ }
567
+ function validateSwitchFallbackOutputConnections(json, warnings) {
568
+ for (const sourceNode of json.nodes) {
569
+ if (!sourceNode.name || sourceNode.type !== 'n8n-nodes-base.switch')
570
+ continue;
571
+ const mode = sourceNode.parameters?.mode;
572
+ if (mode !== undefined && mode !== 'rules')
573
+ continue;
574
+ const outgoing = json.connections[sourceNode.name];
575
+ const mainOutputs = outgoing?.main;
576
+ if (!Array.isArray(mainOutputs))
577
+ continue;
578
+ const rulesCount = getSwitchRulesCount(sourceNode.parameters);
579
+ const fallbackOutput = getSwitchFallbackOutput(sourceNode.parameters);
580
+ if (fallbackOutput === 'extra')
581
+ continue;
582
+ for (let outputIndex = rulesCount; outputIndex < mainOutputs.length; outputIndex++) {
583
+ if (!hasOutputConnections(mainOutputs, outputIndex))
584
+ continue;
585
+ const isErrorOutput = sourceNode.onError === 'continueErrorOutput' && outputIndex === rulesCount;
586
+ if (isErrorOutput)
587
+ continue;
588
+ warnings.push(new ValidationWarning('SWITCH_FALLBACK_OUTPUT_DISABLED', `Switch node '${sourceNode.name}' has a connection from output ${outputIndex}, but rules mode only creates fallback output ${rulesCount} when options.fallbackOutput is set to 'extra'. Set options.fallbackOutput to 'extra' before wiring a catch-all branch, or route unmatched items to an existing rule output with a numeric fallbackOutput value.`, sourceNode.name, 'options.fallbackOutput', undefined, 'major'));
589
+ }
590
+ }
591
+ }
541
592
  function validatePlaceholderSlots(json, nodeTypesProvider, errors) {
542
593
  for (const node of json.nodes) {
543
594
  if (!node.name || !node.parameters)
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":";;;;;;AA6WA,4CAwJC;AArgBD,qDAA6B;AAE7B,+CAA2D;AAE3D,uDAA0D;AAE1D,qDAAyD;AACzD,yDAAwD;AACxD,wDAA8E;AAE9E,mEAA6E;AAE7E,uDAI4B;AAH3B,qHAAA,iBAAiB,OAAA;AACjB,sHAAA,kBAAkB,OAAA;AAsCnB,MAAa,eAAe;IAQ3B,YACC,IAAyB,EACzB,OAAe,EACf,QAAiB,EACjB,aAAsB,EACtB,cAA+C;QAE/C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GA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