fix: Prevent empty path in webhooks (#16864)

Co-authored-by: Roman Davydchuk <roman.davydchuk@n8n.io>
This commit is contained in:
Michael Kret
2025-07-04 10:07:40 +03:00
committed by GitHub
parent 7317f67797
commit bd69907477
6 changed files with 129 additions and 10 deletions

View File

@@ -922,7 +922,7 @@ export function useWorkflowHelpers() {
function getWebhookPath(trigger: INode) {
if (trigger.type === WEBHOOK_NODE_TYPE) {
return trigger.parameters.path as string;
return (trigger.parameters.path as string) || (trigger.webhookId as string);
}
if (trigger.type === FORM_TRIGGER_NODE_TYPE) {
return ((trigger.parameters.options as { path: string }) || {}).path ?? trigger.webhookId;