yaml
type: "io.kestra.core.models.triggers.types.Webhook"
A Webhook trigger allows triggering a flow from a webhook URL. At trigger creation time, Kestra will generate a key that must be used on the URL that triggers the flow:
/api/v1/executions/webhook/{namespace}/[flowId]/{key}
. Kestra acceptsGET
,POST
andPUT
requests on this URL. The whole request body and headers will be available as variables.
Example
Add a trigger to the current flow:
yaml
triggers:
- id: webhook
type: io.kestra.core.models.triggers.types.Webhook
After the trigger is created, a key will be created that must be used in the webhook URL. Now, you can launch the flow on the URL
/api/v1/executions/webhook/{namespace}/[flowId]/4wjtkzwVGBM9yKnjm3yv8r
.
yaml
triggers:
- id: webhook
type: io.kestra.core.models.triggers.types.Webhook
key: 4wjtkzwVGBM9yKnjm3yv8r
Properties and Outputs
Check the Webhook task documentation for the complete list of the task properties and outputs.