Webhook Operation
The Webhook operation enables sending HTTP requests from your executor service to external endpoints. Currently, only POST method is supported. This operation type is ideal for integrating with external services, sending notifications, or triggering workflows in other systems.
Configuration Example
typescript
import { createExecutor } from "@tailor-platform/dev-kit/executor";
createExecutor({
name: "webhook-executor",
description: "Send HTTP requests to external endpoints",
trigger: {
// Choose one of the trigger types:
// eventTrigger({ ... })
// incomingWebhookTrigger({ ... })
// scheduleTrigger({ ... })
},
operation: {
kind: "webhook",
url: "https://api.example.com/webhook",
headers: { "Content-Type": "application/json" },
requestBody: ({ record }) => ({
message: "Notification from executor",
data: record,
}),
},
});Properties
Executor Properties
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The name of the executor. The name field has the validation rule ^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$, and it does not allow capital letters |
description | string | No | The description of the executor |
trigger | object | Yes | The type of trigger (eventTrigger, incomingWebhookTrigger, or scheduleTrigger) |
Webhook Operation Properties
| Property | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | Must be "webhook" |
url | string | Yes | The URL of the API endpoint |
headers | object | No | Key-value pairs for HTTP headers |
requestBody | function | No | A function that returns the payload to be included in the request |
Executor Properties
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The name of the executor. The name field has the validation rule ^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$, and it does not allow capital letters |
workspace_id | string | Yes | The ID of the workspace that the executor namespace belongs to |
description | string | No | The description of the executor |
trigger | object | Yes | The type of trigger (webhook, event, or schedule) |
Webhook Operation Properties
| Property | Type | Supports Scripting | Required | Description |
|---|---|---|---|---|
url | string | JavaScript / CEL | Yes | The URL of the API endpoint |
body | string | JavaScript / CEL | No | The payload or message to be included in the request |
headers | array | - | No | The headers to send with the webhook |
Learn more about executor properties in the Tailor Platform Provider documentation.
Executor Properties
| Property | Type | Required | Description |
|---|---|---|---|
Name | string | Yes | The name of the executor. The name field has the validation rule ^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$, and it does not allow capital letters |
Description | string | No | The description of the executor |
Trigger | object | Yes | The type of trigger (e.g., #TriggerIncomingWebhook, #TriggerEvent, #TriggerSchedule) |
TargetWebhook Properties
| Property | Type | Supports Scripting | Required | Description |
|---|---|---|---|---|
URL | string | JavaScript / CEL | Yes | The URL of the API endpoint |
Body | string | JavaScript / CEL | No | The payload or message to be included in the request |
Headers | array | - | No | The headers to send with the webhook |