Skip to content

Conversation

@RicardoE105
Copy link
Contributor

@RicardoE105 RicardoE105 commented Dec 5, 2025

Summary

Fixes the ActivateExecuteWorkflowTriggerWorkflows migration to properly handle all valid Execute Workflow Trigger configurations, including:

  • Version 1 nodes with empty parameters
  • Version 1.1 nodes with missing type fields in workflowInputs (which default to "string")

Root cause

The migration logic was too strict in validating Execute Workflow Trigger nodes:

  1. Version 1 nodes: These nodes have no inputSource parameter and use empty parameters: {}. The migration was not recognizing empty parameters as valid, failing to activate workflows with v1 Execute Workflow Trigger nodes.

  2. Version 1.1 nodes with missing types: The Execute Workflow Trigger v1.1 has a default type of "string" for workflow inputs. When users don't explicitly set a type, it's not included in the JSON. The migration's hasValidWorkflowInputs() validation required the type field to exist, incorrectly rejecting valid configurations.

Changes

Migration (1763048000000-ActivateExecuteWorkflowTriggerWorkflows.ts)

  1. Version 1 support (lines 99-102): Added check for empty or missing parameters object. If !params || Object.keys(params).length === 0, the workflow is considered valid and will be activated.

  2. Version 1.1 missing type support (lines 195-196): Updated hasValidWorkflowInputs() to treat missing type field as valid:

    // type is optional (defaults to 'string' in version 1.1)
    (!('type' in value) || (typeof value.type === 'string' && value.type.length > 0))

@RicardoE105 RicardoE105 requested a review from a team as a code owner December 5, 2025 21:57
@RicardoE105 RicardoE105 changed the base branch from master to v2 December 5, 2025 21:57
@RicardoE105 RicardoE105 changed the title update migration tha activate subworkflows fix: Update migration that activate workflows with executeWorkflowTrigger Dec 5, 2025
@RicardoE105 RicardoE105 requested a review from tomi December 5, 2025 21:59
@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Dec 5, 2025
@RicardoE105 RicardoE105 changed the title fix: Update migration that activate workflows with executeWorkflowTrigger fix(core): Update migration that activate workflows with executeWorkflowTrigger Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants