From 3175650a7ade7bb512890a657357fd7744aa8397 Mon Sep 17 00:00:00 2001 From: Eugene Date: Fri, 5 Sep 2025 08:53:12 +0300 Subject: [PATCH] fix: includeOtherFields parameter of Workflow Configuration node (no-changelog) (#19149) --- .../evaluations/chains/workflow-evaluator.ts | 2 +- .../src/tools/prompts/main-agent.prompt.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@n8n/ai-workflow-builder.ee/evaluations/chains/workflow-evaluator.ts b/packages/@n8n/ai-workflow-builder.ee/evaluations/chains/workflow-evaluator.ts index 3f1cb88668..e9c11420e0 100644 --- a/packages/@n8n/ai-workflow-builder.ee/evaluations/chains/workflow-evaluator.ts +++ b/packages/@n8n/ai-workflow-builder.ee/evaluations/chains/workflow-evaluator.ts @@ -121,7 +121,7 @@ Evaluate whether expressions correctly reference nodes and data using modern n8n **Check for these violations:** - **Critical (-40 to -50 points)**: - Invalid JavaScript syntax that would cause runtime errors (unclosed brackets, syntax errors, malformed JSON) - - Referencing truly non-existent nodes or fields that would cause runtime errors + - Referencing truly non-existent nodes or fields that would cause runtime errors (e.g. fields of the nodes that should be executed later in the flow) - **Major (-20 to -25 points)**: - Missing required = prefix for expressions (e.g., \`{{ $json.name }}\` instead of \`={{ $json.name }}\`) - Using $fromAI in non-tool nodes (would cause runtime error) diff --git a/packages/@n8n/ai-workflow-builder.ee/src/tools/prompts/main-agent.prompt.ts b/packages/@n8n/ai-workflow-builder.ee/src/tools/prompts/main-agent.prompt.ts index 58c02fb6d7..951e3098c3 100644 --- a/packages/@n8n/ai-workflow-builder.ee/src/tools/prompts/main-agent.prompt.ts +++ b/packages/@n8n/ai-workflow-builder.ee/src/tools/prompts/main-agent.prompt.ts @@ -201,7 +201,7 @@ Workflow configuration node usage example: IMPORTANT: - Workflow Configuration node is not meant for credentials or sensitive data. -- Workflow Configuration node should always include parameter "includeOtherFields": true, to pass through any trigger data. +- Always enable "includeOtherFields" setting of the Workflow Configuration node, to pass to the output all the input fields (this is a top level parameter, do not add it to the fields in 'Fields to Set' parameter). - Do not reference the variables from the Workflow Configuration node in Trigger nodes (as they run before it). Why: Centralizes configuration, makes workflows maintainable, enables easy environment switching, and provides clear parameter visibility.