diff --git a/packages/editor-ui/src/composables/useRunWorkflow.ts b/packages/editor-ui/src/composables/useRunWorkflow.ts index 2b3115bdf4..c124fcb404 100644 --- a/packages/editor-ui/src/composables/useRunWorkflow.ts +++ b/packages/editor-ui/src/composables/useRunWorkflow.ts @@ -15,7 +15,7 @@ import type { StartNodeData, IRun, } from 'n8n-workflow'; -import { NodeConnectionType, FORM_TRIGGER_PATH_IDENTIFIER } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { useToast } from '@/composables/useToast'; import { useNodeHelpers } from '@/composables/useNodeHelpers'; @@ -29,6 +29,7 @@ import { import { useTitleChange } from '@/composables/useTitleChange'; import { useRootStore } from '@/stores/root.store'; import { useUIStore } from '@/stores/ui.store'; +import { useNodeTypesStore } from '@/stores/nodeTypes.store'; import { useWorkflowsStore } from '@/stores/workflows.store'; import { openPopUpWindow } from '@/utils/executionUtils'; import { useExternalHooks } from '@/composables/useExternalHooks'; @@ -48,6 +49,7 @@ export function useRunWorkflow(useRunWorkflowOpts: { router: ReturnType 1) { - const webhookPath = (node.parameters.path as string) || node.webhookId; - testUrl = `${rootStore.formTestUrl}/${webhookPath}`; + const nodeType = nodeTypesStore.getNodeType(node.type, node.typeVersion); + if (nodeType?.webhooks?.length) { + testUrl = workflowHelpers.getWebhookUrl(nodeType.webhooks[0], node, 'test'); } if (