Trigger flows based on web-based events.

Webhook triggers generates a unique URL that you can use to automatically create new executions based on events in another application such as GitHub or Amazon EventBridge.

In order to use that URL, you have to add a secret key that will secure your webhook URL.

type: "io.kestra.plugin.core.trigger.Webhook"

A Webhook trigger allows triggering a flow from a webhook URL. At trigger creation a key must be set that will be used on the URL that triggers the flow: /api/v1/executions/webhook/{namespace}/{flowId}/{key}. We advise to use a non-easy to find or remember key like a generated sequence of characters. Kestra accepts GET, POST and PUT requests on this URL The whole request body and headers will be available as variables.


Add a trigger to the current flow:

  - id: webhook
    type: io.kestra.plugin.core.trigger.Webhook
    key: 4wjtkzwVGBM9yKnjm3yv8r

After the trigger is created, the key must be explicitly set in the webhook URL. You can launch the flow using the following URL /api/v1/executions/webhook/{namespace}/{flowId}/4wjtkzwVGBM9yKnjm3yv8r.

Check the Webhook task documentation for the list of the task properties and outputs.

Was this page helpful?