Skip to content

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

PropertyTypeRequiredDescription
namestringYesThe 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
descriptionstringNoThe description of the executor
triggerobjectYesThe type of trigger (eventTrigger, incomingWebhookTrigger, or scheduleTrigger)

Webhook Operation Properties

PropertyTypeRequiredDescription
kindstringYesMust be "webhook"
urlstringYesThe URL of the API endpoint
headersobjectNoKey-value pairs for HTTP headers
requestBodyfunctionNoA function that returns the payload to be included in the request

Executor Properties

PropertyTypeRequiredDescription
namestringYesThe 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_idstringYesThe ID of the workspace that the executor namespace belongs to
descriptionstringNoThe description of the executor
triggerobjectYesThe type of trigger (webhook, event, or schedule)

Webhook Operation Properties

PropertyTypeSupports ScriptingRequiredDescription
urlstringJavaScript / CELYesThe URL of the API endpoint
bodystringJavaScript / CELNoThe payload or message to be included in the request
headersarray-NoThe headers to send with the webhook

Learn more about executor properties in the Tailor Platform Provider documentation.

Executor Properties

PropertyTypeRequiredDescription
NamestringYesThe 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
DescriptionstringNoThe description of the executor
TriggerobjectYesThe type of trigger (e.g., #TriggerIncomingWebhook, #TriggerEvent, #TriggerSchedule)

TargetWebhook Properties

PropertyTypeSupports ScriptingRequiredDescription
URLstringJavaScript / CELYesThe URL of the API endpoint
BodystringJavaScript / CELNoThe payload or message to be included in the request
Headersarray-NoThe headers to send with the webhook