mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 13:33:11 +00:00
feat: add _cnd conditional operator support and n8n 2.0+ executeWorkflowTrigger fix
Added: - Support for all 12 _cnd operators in displayOptions validation (eq, not, gte, lte, gt, lt, between, startsWith, endsWith, includes, regex, exists) - Version-based visibility checking with @version in config - 42 new unit tests for _cnd operators Fixed: - n8n 2.0+ breaking change: executeWorkflowTrigger now recognized as activatable trigger - Removed outdated validation blocking Execute Workflow Trigger workflows 🤖 Generated with [Claude Code](https://claude.com/claude-code) Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
9
dist/services/n8n-validation.js
vendored
9
dist/services/n8n-validation.js
vendored
@@ -217,12 +217,9 @@ function validateWorkflowStructure(workflow) {
|
||||
}
|
||||
if (workflow.active === true && workflow.nodes && workflow.nodes.length > 0) {
|
||||
const activatableTriggers = workflow.nodes.filter(node => !node.disabled && (0, node_type_utils_1.isActivatableTrigger)(node.type));
|
||||
const executeWorkflowTriggers = workflow.nodes.filter(node => !node.disabled && node.type.toLowerCase().includes('executeworkflow'));
|
||||
if (activatableTriggers.length === 0 && executeWorkflowTriggers.length > 0) {
|
||||
const triggerNames = executeWorkflowTriggers.map(n => n.name).join(', ');
|
||||
errors.push(`Cannot activate workflow with only Execute Workflow Trigger nodes (${triggerNames}). ` +
|
||||
'Execute Workflow Trigger can only be invoked by other workflows, not activated. ' +
|
||||
'Either deactivate the workflow or add a webhook/schedule/polling trigger.');
|
||||
if (activatableTriggers.length === 0) {
|
||||
errors.push('Cannot activate workflow: No activatable trigger nodes found. ' +
|
||||
'Workflows must have at least one enabled trigger node (webhook, schedule, executeWorkflowTrigger, etc.).');
|
||||
}
|
||||
}
|
||||
if (workflow.nodes && workflow.connections) {
|
||||
|
||||
Reference in New Issue
Block a user