diff --git a/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte b/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte index dd8fa2811d..c2c3a21695 100644 --- a/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte +++ b/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte @@ -7,7 +7,7 @@ export let block $: inputs = Object.entries(block.schema?.inputs?.properties || {}) - $: availableBindings = getAvailableBindings( + $: bindings = getAvailableBindings( block, $workflowStore.selectedWorkflow?.workflow?.definition ) @@ -16,8 +16,15 @@ if (!block || !workflow) { return [] } - const allSteps = [workflow.trigger, ...workflow.steps] + + // Find previous steps to the selected one + let allSteps = [...workflow.steps] + if (workflow.trigger) { + allSteps = [workflow.trigger, ...allSteps] + } const blockIdx = allSteps.findIndex(step => step.id === block.id) + + // Extract all outputs from all previous steps as available bindings let bindings = [] for (let idx = 0; idx < blockIdx; idx++) { const outputs = Object.entries(allSteps[idx].schema?.outputs?.properties) @@ -43,26 +50,24 @@ {#if value.type === 'string' && value.enum} {:else if value.customType === 'password'} - {:else if value.type === 'number'} - - {:else if value.customType === 'longText'} -