Webhook
type: "io.kestra.core.models.triggers.types.Webhook"
Trigger a flow from a webhook
Webbook trigger allow you to trigger a flow from a webhook url. The trigger will generate a key
that must be used on url : /api/v1/executions/webhook/{namespace}/[flowId]/{key}
. Kestra accept GET
, POST
& PUT
request on this url. The whole body & headers will be available as variable:
trigger.body
trigger.headers
Examples
Add a trigger to the current flow
triggers:
- id: webhook
type: io.kestra.core.models.triggers.types.Webhook
After the trigger is created, a key will be created that will be use in the webhook url, now, you can launch the flow on the url
/api/v1/executions/webhook/{namespace}/[flowId]/4wjtkzwVGBM9yKnjm3yv8r
triggers:
- id: webhook
type: io.kestra.core.models.triggers.types.Webhook
key: 4wjtkzwVGBM9yKnjm3yv8r
Properties
key
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
<generated-hash>
- Min length:
16
- Max length:
256
The unique key that will be part of the url
If you don't provide a key, a random one will be generated. Is used as key for generating the url of the webhook.
Take care when using manual key, the key is the only security to protect your webhook and must be considered as a secret !
Outputs
body
- Type: object
The full body for the webhook request
We try to deserialize the incoming request as json (array or object). If we can't the full body as string will be available
headers
- Type: object
- SubType: array
The headers for the webhook request
parameters
- Type: object
- SubType: array
The parameters for the webhook request