Skip to navigation

Trigger on webhook

Overview

Starts the flow when an HTTP request reaches the webhook.

Data from the accepted request becomes node outputs for downstream nodes.

Use it when an external system should start an OvalBee flow by sending an HTTP request. For example, a scheduler or external integration can call the webhook, then Run flow starts several import branches in parallel.

External service Trigger on webhook Run flow Import images A Dataset A Import images B Dataset B

Prerequisites

RequirementWhat you need
Reachable instanceNetwork access from the calling system to the address shown in Webhook URL.

How it works

1

Accepts an HTTP request sent to the address in Webhook URL.

2

Rejects the request when the method does not match Allowed Method, or when the shared secret in the configured header does not match.

3

Answers the caller with the configured response status and body.

4

Publishes the request body, query, headers, method, URL, and timestamp as outputs, then starts the nodes connected downstream. The headers leave out the secret header, Authorization, Cookie and Proxy-Authorization.

FAQ

Click Copy curl on the node and run the command in a terminal. It already has the URL, the method, and the secret header. Use the arrow next to the button to copy the same request for Python or JavaScript, or only the URL. If you can’t edit the flow, the request has <secret> in place of the secret.

The configured Response Status and Response Body, by default 202 and Webhook received. The answer is sent as soon as the request is accepted, not when the flow finishes.

405 means the method is not the one set in Allowed Method. 401 means the shared secret is missing or wrong. 404 means no webhook node matches the URL, and 400 means the node still needs configuration.

GET, POST, PUT, PATCH, and DELETE. The Any option accepts all of them.

In the header named by Secret Header, x-webhook-secret by default. The secret is generated for the node and compared in constant time. Only people who can edit the flow see it: anyone else who can open the flow sees the field empty.

Up to 10 MB. A body that is not valid JSON is passed through as a string, and an empty body becomes null.

Inputs

Webhook URL
stringRequired

Send HTTP requests to this URL to trigger the flow. Read-only. Flow variables aren’t accepted. Derived automatically as a url. Key: WEBHOOK_URL.

Allowed method
selectDefaults to anyRequired

HTTP method a request must use to trigger the flow. Any other method is refused with 405 Method Not Allowed. Key: ALLOWED_METHOD.

Options:

  • Any (any)
  • GET (get)
  • POST (post)
  • PUT (put)
  • PATCH (patch)
  • DELETE (delete)
Shared secret
stringRequired

Required secret expected in the request header below. Flow variables aren’t accepted. The value is masked. Generated automatically as a secret when the node is created. Key: SECRET.

Secret header
stringDefaults to x-webhook-secretRequired

Request header the shared secret is read from. A request that does not carry the matching secret is refused. Key: SECRET_HEADER.

Response status
integerDefaults to 202Required

HTTP status code returned after the webhook is accepted. Minimum: 200. Maximum: 599. Step: 1. Key: RESPONSE_STATUS.

Response body
textDefaults to Webhook receivedRequired

Plain text sent back to the caller once the request is accepted. Key: RESPONSE_BODY.

Outputs

Request Body
object

Parsed request body as JSON, string, or null. Key: BODY.

Query Parameters
object

Query string parameters from the webhook request. Key: QUERY.

Request Headers
object

HTTP headers received with the request. Key: HEADERS.

Request Method
string

HTTP method used to trigger the webhook. Shown on the node as a badge. Key: METHOD.

Request URL
string

URL that triggered this webhook node. Key: URL.

Received At
string

ISO timestamp when the webhook request was accepted. Key: RECEIVED_AT.

JSON config

Machine-readable node interface for automation and advanced usage.

{
"name": "Trigger on webhook",
"description": "Automatically executes when an HTTP webhook request is received.",
"category": "Flow control",
"namespace": null,
"templateKey": "flow_control/trigger_on_webhook",
"version": "v1",
"inputs": [
{
"key": "WEBHOOK_URL",
"label": "Webhook URL",
"type": "string",
"description": "Send HTTP requests to this URL to trigger the flow.",
"required": true,
"default": null,
"visibleWhen": null,
"options": {
"derived": {
"type": "url",
"template": "/api/webhooks/{nodeId}",
"includeOrigin": true
},
"readonly": true,
"allowVariables": false
}
},
{
"key": "ALLOWED_METHOD",
"label": "Allowed method",
"type": "select",
"description": "HTTP method a request must use to trigger the flow. Any other method is refused with 405 Method Not Allowed.",
"required": true,
"default": "any",
"visibleWhen": null,
"options": {
"options": [
{
"label": "Any",
"value": "any"
},
{
"label": "GET",
"value": "get"
},
{
"label": "POST",
"value": "post"
},
{
"label": "PUT",
"value": "put"
},
{
"label": "PATCH",
"value": "patch"
},
{
"label": "DELETE",
"value": "delete"
}
]
}
},
{
"key": "SECRET",
"label": "Shared secret",
"type": "string",
"description": "Required secret expected in the request header below.",
"required": true,
"default": null,
"visibleWhen": null,
"options": {
"allowVariables": false,
"masked": true,
"generated": {
"type": "secret",
"bytes": 20,
"encoding": "hex"
}
}
},
{
"key": "SECRET_HEADER",
"label": "Secret header",
"type": "string",
"description": "Request header the shared secret is read from. A request that does not carry the matching secret is refused.",
"required": true,
"default": "x-webhook-secret",
"visibleWhen": null
},
{
"key": "RESPONSE_STATUS",
"label": "Response status",
"type": "number",
"description": "HTTP status code returned after the webhook is accepted.",
"required": true,
"default": 202,
"visibleWhen": null,
"options": {
"min": 200,
"max": 599,
"step": 1,
"type": "integer",
"slider": false
}
},
{
"key": "RESPONSE_BODY",
"label": "Response body",
"type": "text",
"description": "Plain text sent back to the caller once the request is accepted.",
"required": true,
"default": "Webhook received",
"visibleWhen": null
}
],
"outputs": [
{
"key": "BODY",
"label": "Request Body",
"type": "object",
"description": "Parsed request body as JSON, string, or null.",
"artifact": false,
"badge": false,
"badgeOpens": null,
"hidden": false
},
{
"key": "QUERY",
"label": "Query Parameters",
"type": "object",
"description": "Query string parameters from the webhook request.",
"artifact": false,
"badge": false,
"badgeOpens": null,
"hidden": false
},
{
"key": "HEADERS",
"label": "Request Headers",
"type": "object",
"description": "HTTP headers received with the request.",
"artifact": false,
"badge": false,
"badgeOpens": null,
"hidden": false
},
{
"key": "METHOD",
"label": "Request Method",
"type": "string",
"description": "HTTP method used to trigger the webhook.",
"artifact": false,
"badge": true,
"badgeOpens": null,
"hidden": false
},
{
"key": "URL",
"label": "Request URL",
"type": "string",
"description": "URL that triggered this webhook node.",
"artifact": false,
"badge": false,
"badgeOpens": null,
"hidden": false
},
{
"key": "RECEIVED_AT",
"label": "Received At",
"type": "string",
"description": "ISO timestamp when the webhook request was accepted.",
"artifact": false,
"badge": false,
"badgeOpens": null,
"hidden": false
}
],
"runtime": {
"type": "headless",
"devices": [
"cpu"
],
"dockerImage": null
},
"widgets": {
"widget": {
"id": "webhook-request",
"settings": {
"url": {
"type": "variable",
"value": "self.inputs.WEBHOOK_URL"
},
"method": {
"type": "variable",
"value": "self.inputs.ALLOWED_METHOD"
},
"secretHeader": {
"type": "variable",
"value": "self.inputs.SECRET_HEADER"
}
}
}
}
}