How to use the n8n-workflow.NodeHelpers.getNodeWebhookUrl function in n8n-workflow

To help you get started, we’ve selected a few n8n-workflow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github n8n-io / n8n / packages / editor-ui / src / components / NodeWebhooks.vue View on Github external
getWebhookUrl (webhookData: IWebhookDescription): string {
				let baseUrl = this.$store.getters.getWebhookUrl;
				if (this.showUrlFor === 'Test') {
					baseUrl = this.$store.getters.getWebhookTestUrl;
				}

				const workflowId = this.$store.getters.workflowId;
				const path = this.getValue(webhookData, 'path');

				return NodeHelpers.getNodeWebhookUrl(baseUrl, workflowId, this.node, path);
			},
		},
github n8n-io / n8n / packages / core / src / NodeExecuteFunctions.ts View on Github external
let baseUrl = additionalData.webhookBaseUrl;
	if (isTest === true) {
		baseUrl = additionalData.webhookTestBaseUrl;
	}

	const webhookDescription = getWebhookDescription(name, workflow, node);
	if (webhookDescription === undefined) {
		return undefined;
	}

	const path = workflow.getSimpleParameterValue(node, webhookDescription['path']);
	if (path === undefined) {
		return undefined;
	}

	return NodeHelpers.getNodeWebhookUrl(baseUrl, workflow.id!, node, path.toString());
}