Skip to main content

Overview

The Webhook Node is a powerful trigger node that starts workflows via REST API calls. It creates HTTP endpoints that external services, applications, or frontend clients can call to trigger automated workflows with data.

Required Configuration

Basic Settings

  • Label: Display name for the node
  • Path: URL path for the webhook endpoint (e.g., “/create-user”, “/sync-data”)
  • Method: HTTP method: POST, GET, PUT, PATCH, or DELETE

Authentication

Choose how to secure your webhook endpoint:

None

  • No authentication required
  • Warning: Anyone with the URL can trigger the workflow

Basic Auth

  • Username: Required username for basic authentication
  • Password: Required password for basic authentication
  • Credentials sent in Authorization header as Base64-encoded username:password

Bearer Token

  • API Key: Token value (leave empty, users fill in UI)
  • Environment Variable: Variable name to store the token (e.g., “WEBHOOK_API_KEY”)
  • Sent as Authorization: Bearer <token>

Header Auth

  • Header Name: Custom header name (e.g., “X-API-Key”)
  • Prefix: Optional prefix (e.g., “Bearer”, “Token”)
  • API Key: Token value (leave empty, users fill in UI)
  • Environment Variable: Variable name to store the token
  • Sent as custom header: X-API-Key: <token> or X-API-Key: Bearer <token>

Query Parameter Auth

  • Query Parameter Name: URL parameter name (e.g., “api_key”)
  • API Key: Token value (leave empty, users fill in UI)
  • Environment Variable: Variable name to store the token
  • Added to URL: ?api_key=<token>

Response Mode

Control when the webhook responds to the caller:
  • immediately: Return response right away (for async processing)
  • lastNode: Wait for the entire workflow to finish before responding
  • onReceived: Acknowledge receipt immediately, process asynchronously

How It Works

Step 1: Create the Trigger

Drag a Webhook Node onto your canvas. This will be the entry point for external API calls to your workflow.

Step 2: Configure the Endpoint

  1. Set the HTTP method (POST for data creation, GET for retrieval, etc.)
  2. Define the webhook path (e.g., “/users/create”)
  3. Choose authentication method to secure the endpoint
  4. Select response mode based on your use case

Step 3: Build Your Workflow

Connect the Webhook Node to backend nodes (Query, Mutation, Agent, etc.) to process the incoming data.

Step 4: Access Webhook Data

Use the $"startNode" reference to access incoming request data in downstream nodes.

Accessing Webhook Data

The webhook is the starting node of your workflow. Use $"startNode" to access different parts of the HTTP request:

1. Request Body (POST/PUT/PATCH)

Access JSON body fields using $"startNode".body.<field> Example: POST request with body { "name": "John", "email": "john@example.com" }

2. Query Parameters (All Methods)

Access URL query parameters using $"startNode".queryParams.<param> Example: GET request to /users?status=active&limit=10

3. URL Path Parameters

Access URL path variables using $"startNode".params.<param> Example: PATCH request to /users/:userId

4. Request Headers

Access HTTP headers using $"startNode".headers.<header> or $"startNode".headers["header-name"] Example: Access custom request ID header

5. HTTP Method

Access the HTTP method using $"startNode".method Example: Conditional logic based on method

Common Use Cases

1. Create Resource from External Service

External service sends user data, workflow creates database record and returns result.

2. Query Data via API

External service queries your data through REST API.

3. Update Resource with Path Parameters

External service updates a specific resource by ID.

4. AI Processing from External Call

External service triggers AI analysis and receives results.

5. Conditional Webhook Processing

Route webhook requests to different operations based on data.

6. Batch Processing from API

Process arrays of data sent via webhook.

7. Proxy to External API

Act as a proxy to transform or route requests to other services.

Important Notes

Webhook is a Start Node

Like Frontend Element and Cron nodes, webhooks are trigger nodes that start workflows. They have no inputs, only outputs.

No Frontend Node Needed

Unlike Frontend Element flows, webhook flows are triggered by external HTTP requests, not user interactions. Do NOT create frontend nodes for webhook-triggered workflows.

Security Best Practices

  • Always use authentication for production webhooks
  • Leave “API Key” field empty in configurations; users should provide credentials in the UI
  • Store sensitive tokens in environment variables
  • Use HTTPS URLs in production

Response Modes Guide

  • immediately: Best for async processing where caller doesn’t need to wait
  • lastNode: Best when caller needs the workflow result
  • onReceived: Best for long-running workflows where caller just needs acknowledgment

Unique Endpoints

Each webhook path represents a unique REST API endpoint. Use descriptive paths like:
  • /users/create
  • /orders/webhook
  • /sync/data

Connections

Webhook nodes are starting points for workflows. They have no inputs, only outputs. Output to: Backend nodes:
  • Query nodes (fetch data based on webhook input)
  • Mutation nodes (create/update/delete based on webhook data)
  • Agent nodes (AI processing of webhook data)
  • HTTP Request nodes (forward to external APIs)
  • For Loop nodes (batch process webhook arrays)
  • If-Else nodes (conditional webhook logic)
Must connect to:
  • Return node (to send response back to caller)
Cannot connect to:
  • Frontend Element nodes (webhook is the trigger, not a UI element)

Webhook vs Other Triggers

Query Node

Fetch data based on webhook input

Mutation Node

Create/update data from webhooks

Return Node

Send response back to webhook caller

HTTP Request Node

Forward webhook data to external APIs