---
related_nodes:
  - webhook_request
  - cron_trigger
---

# Webhook Trigger

Receives generic webhook events and starts a workflow with a normalized event payload.

## Overview

The Webhook Trigger allows external services to trigger workflows by sending HTTP requests to a unique URL. Each webhook is workspace-scoped, must be pre-registered in workspace settings, and delivers a normalized event payload through the node's `output` socket. A webhook can also have a readable named route, which makes the workflow reachable at a public address such as a dashboard.

## When to Use

- Integrating with third-party services (GitHub, Stripe, etc.)
- Receiving notifications from external systems
- Building custom integrations that push data to Verdalia
- Serving a small page or JSON endpoint at a readable address, with sub-paths the workflow routes itself

## Configuration

### Webhook (required)
Select a pre-registered webhook from your workspace.

Agents should call `list_webhooks` and set `webhook_id` to the returned `id` ULID. Use the webhook display name only to choose the right webhook; configuration needs the `id`, not the display name or URL token. When no webhook fits, `webhook_create` makes one and returns its `id`.

The trigger fires only for requests using the webhook's `method` (`get` or `post`). Before handing the URL to a caller, check it with `webhook_get`, which returns the token `url`, the `route_url` when a named route is set, `method`, and `response` mode; change a wrong method, response mode, or route name with `webhook_edit`.

## Webhook URL

When you create a webhook in settings, you choose a display name, an allowed method, response behavior, and an optional description. Verdalia gives the webhook a stable token-backed URL:

```
https://your-verdalia-instance.com/api/webhooks/wh_a7f9k2mPqRsTuVwXyZ123AbCdEfGh4567
```

Send requests using the webhook's configured method to trigger the workflow.

### Named route

A webhook may also have a `route_name`: up to 64 lowercase letters, digits, and single hyphens, unique in the workspace. The webhook then also answers at

```
https://your-verdalia-instance.com/{workspace_slug}/routes/{route_name}
https://your-verdalia-instance.com/{workspace_slug}/routes/{route_name}/any/sub/path
```

- The route is an alias: the token URL keeps working, and both reach the same triggers with the same method and response mode.
- The route carries no secret and is meant to be guessable. Anyone who knows it can call it, so a workflow that needs a password or key checks it itself, for example from `output.query` or `output.headers`.
- Every sub-path below the route reaches the same webhook. `output.route.path` says which one, so one workflow can serve `/`, `/orders/42`, and so on by branching on it.
- Only the workspace's current slug resolves. Renaming the workspace, or changing or clearing the route name, stops the old address at once.

## Inputs

None. The trigger receives data via webhook ingress.

## Outputs

The node emits a single socket: `output`.

`output` is one JSON object containing the public webhook payload.

| Field | Type | Description |
|-------|------|-------------|
| `method` | string | HTTP method used to invoke the webhook |
| `headers` | object | Lowercase header names mapped to strings |
| `query` | object | Query parameter names mapped to strings |
| `body` | any (json/null) | Parsed JSON request body for `POST`, or `null` when no body is present |
| `raw_body` | string \| null | Exact request body text as received, useful for signature verification |
| `route` | object \| null | `{ "name", "path" }` when the request used the named route; `null` for the token URL. `path` is the part below the route and always starts with `/`: `/` for the route itself, `/orders/42` for `/{workspace_slug}/routes/{route_name}/orders/42` |
| `received_at` | string | Timestamp when Verdalia accepted the webhook |

## Example

**Setting up a Stripe webhook:**

1. Go to **Settings → Webhooks** in Verdalia
2. Click "Create Webhook", choose a display name like "stripe-events", and set the method to `POST`
3. Copy the webhook URL (e.g., `https://.../api/webhooks/wh_...`)
4. Create a workflow with a Webhook Trigger node
5. Select "stripe-events" from the dropdown
6. In Stripe Dashboard, add the webhook URL as an endpoint
7. Your workflow will now trigger for each Stripe event

**Processing the webhook data:**

```
[Webhook Trigger]
    ↓
[AI Agent]
    Prompt: "Process this Stripe event: {{ output.body }}"
    ↓
[Table Insert]
    Store payment details
```

## Accessing Nested Fields

Use `output.<field>` when mapping values downstream.

- Stripe event type: `{{ output.body.type }}`
- Header value: `{{ output.headers.stripe-signature }}`
- Query parameter: `{{ output.query.page }}`
- Raw request body: `{{ output.raw_body }}`
- Sub-path of a named route: `{{ output.route.path }}`

**Serving a dashboard from a named route:**

1. Create a `GET` webhook with response mode `workflow` and route name `dashboard`
2. Build `Webhook Trigger → (build the page from output.route.path) → Webhook Response` with `response_format: text` and a `content-type: text/html` header
3. Open `https://.../{workspace_slug}/routes/dashboard` (`output.route.path` is `/`), or `https://.../{workspace_slug}/routes/dashboard/weekly` (`output.route.path` is `/weekly`)

## Example Output

```json
{
  "method": "POST",
  "headers": {
    "content-type": "application/json",
    "x-signature-ed25519": "abcdef1234",
    "x-signature-timestamp": "1712345678"
  },
  "query": {},
  "body": {
    "type": 1
  },
  "raw_body": "{\"type\":1}",
  "route": null,
  "received_at": "2026-04-05T12:34:56Z"
}
```

## Rate Limiting

Webhook ingress is protected by the API's global HTTP rate limiting middleware. Excess traffic receives a `429 Too Many Requests` response.

## HTTP Response

Webhook registrations have two response modes:

- `immediate`: Verdalia accepts the workflow event and immediately returns **`200 OK`** with a small JSON acknowledgement. Do **not** add `Webhook Response`; there is no pending HTTP response for the workflow to complete.
- `workflow`: Verdalia waits up to 30 seconds for one downstream `Webhook Response` node to provide status, headers, and body. Use this only when the caller needs a workflow-generated HTTP response.

Immediate-mode response body:

```json
{
  "webhook_dispatched": true
}
```

Agents can inspect `list_webhooks`: `responds_automatically=true` means immediate mode; `requires_workflow_response=true` means add `Webhook Response` on the workflow path.

Each request starts one run per listening workflow, in the order the requests arrived, including requests that arrive while earlier runs are still going. A request Verdalia cannot store is answered with `503 Service Unavailable`, so the caller can send it again.

## Security

- Token URLs contain a cryptographically secure random token fragment
- Token URLs are unique to each webhook and cannot be guessed
- Named-route URLs are public by design; authenticate callers in the workflow when that matters
- Webhooks are workspace-scoped - you cannot trigger webhooks from other workspaces
- Deleting a webhook immediately stops all workflows that use it
- The trigger does not perform provider-specific signature verification or schema handling; downstream nodes inspect `output` directly
- For standard public-key webhook verification, prepare `{ payload, signature, timestamp }` from the webhook output, then pass that object into `Verify Signature`
- Use `output.raw_body` as `payload` when the provider signs the exact incoming body bytes/text

## Notes

- Each webhook is configured for either `GET` or `POST`
- Each webhook is configured for either immediate HTTP acknowledgement or workflow-generated response mode
- Multiple workflows can subscribe to the same webhook
- `POST` request bodies must be valid JSON
- Empty `POST` requests are allowed
- `raw_body` is populated when a request body is present and preserved exactly for downstream verification logic
- Renaming a webhook does not change its token-backed URL or its named route
- Each workflow using a webhook starts its own run for every request
