Incoming Webhook Trigger
The incoming webhook trigger exposes an HTTP endpoint that can be called by external services to trigger executor operations. This enables integration with third-party systems and services.
Follow the tutorial for setup instructions.
Basic Incoming Webhook Trigger Configuration
The following example shows the basic structure of an incoming webhook trigger:
import { createExecutor, incomingWebhookTrigger } from "@tailor-platform/sdk";
export default createExecutor({
name: "incoming-webhook-based-executor",
description: "exposes an endpoint",
trigger: incomingWebhookTrigger<{
body: { event: string };
headers: Record<string, string>;
}>(),
operation: {
// Choose one of the operation types:
// kind: "tailorGraphql", ...
// kind: "webhook", ...
// kind: "function", ...
// kind: "jobFunction", ...
},
});Payload Format
The payload structure received by the Executor's Incoming Webhook will have the following format:
{
"args": {
"method": "POST", // The HTTP method (e.g., POST, GET)
"headers": {
"x-name": "example", // Headers are available in lowercase with hyphens
"x-array-elements": ["element1", "element2"] // header can be array
},
"body": {
"name": "John",
"full_name": { "first_name": "John", "last_name": "Doe" }
}
}
}The Executor's incoming webhook supports both application/json and application/x-www-form-urlencoded content types. When using form-urlencoded, form data is parsed into the body object with single values as strings and multiple values as arrays.
Here's an example of how to access different parts of the webhook payload:
When receiving form-urlencoded data, you can access the values directly from the body object:
Webhook Data Access
Incoming webhook triggers provide access to HTTP request data through the args object:
args.body- The request payload/bodyargs.headers- The HTTP headers from the requestargs.method- The HTTP method used (typically POST)args.query- Query parameters from the URL
This data can be used in operation variables to process the incoming webhook data appropriately.
Properties
Incoming Webhook Trigger Properties
| Property | Type | Required | Description |
|---|---|---|---|
webhook | object | Yes | Empty object {} to enable webhook trigger |
For detailed operation properties, see the dedicated operation pages:
- TailorGraphql Operation Properties
- Webhook Operation Properties
- Function Operation Properties
- Job Function Operation Properties
Refer to the Tailor Platform Provider documentation for more details on executor properties.