Skip to main content
Glama

webhook_urls

Retrieve webhook URLs for workflow nodes to enable external system integration and trigger automation processes.

Instructions

Get webhook URLs for a webhook node in a workflow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYes
nodeIdYes

Implementation Reference

  • MCP server handler for webhook_urls tool: resolves workflow ID alias and delegates to n8nClient.getWebhookUrls
    private async handleWebhookUrls(args: { workflowId: string | number; nodeId: string }) {
      const workflowId = this.resolveWorkflowId(args.workflowId);
      const urls = await this.n8nClient.getWebhookUrls(workflowId, args.nodeId);
      return { content: [{ type: 'text', text: JSON.stringify(jsonSuccess(urls), null, 2) }] };
    }
  • Core implementation: fetches workflow, finds webhook node by ID, validates type and path param, constructs testUrl and productionUrl based on n8n baseUrl
    async getWebhookUrls(workflowId: string | number, nodeId: string): Promise<N8nWebhookUrls> {
      const workflow = await this.getWorkflow(workflowId);
      const webhookNode = workflow.nodes.find((node) => node.id === nodeId);
      if (!webhookNode) throw new Error(`Node with ID '${nodeId}' not found in workflow ${workflowId}`);
      if (webhookNode.type !== 'n8n-nodes-base.webhook') {
        throw new Error(`Node '${nodeId}' is not a webhook node (type: ${webhookNode.type})`);
      }
      const path = webhookNode.parameters?.path || '';
      if (!path) throw new Error(`Webhook node '${nodeId}' does not have a path configured`);
      const testUrl = `${this.baseUrl}/webhook-test/${path}`;
      const productionUrl = `${this.baseUrl}/webhook/${path}`;
      return { testUrl, productionUrl };
    }
  • src/index.ts:199-200 (registration)
    Tool registration entry in ListToolsResponse, defines name, description, and input schema
    { name: 'webhook_urls', description: 'Get webhook URLs for a webhook node in a workflow', inputSchema: { type: 'object', properties: { workflowId: { oneOf: [{ type: 'string' }, { type: 'number' }] }, nodeId: { type: 'string' } }, required: ['workflowId', 'nodeId'] } },
    { name: 'run_once', description: 'Execute a workflow manually once and return execution details', inputSchema: { type: 'object', properties: { workflowId: { oneOf: [{ type: 'string' }, { type: 'number' }] }, input: { type: 'object' } }, required: ['workflowId'] } },
  • TypeScript interface defining the output shape of webhook URLs (testUrl and productionUrl)
    export interface N8nWebhookUrls {
      testUrl: string;
      productionUrl: string;
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/get2knowio/n8n-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server