Skip to main content

Webhook

The Webhook component defines a webhook trigger that runs a flow when it receives an HTTP POST request.

Trigger the webhook

When you add a Webhook component to your flow, a Webhook curl tab is added to the flow's API Access pane. This tab automatically generates an HTTP POST request code snippet that you can use to trigger your flow through the Webhook component. For example:


_10
curl -X POST \
_10
"http://$LANGFLOW_SERVER_ADDRESS/api/v1/webhook/$FLOW_ID" \
_10
-H 'Content-Type: application/json' \
_10
-H 'x-api-key: $LANGFLOW_API_KEY' \
_10
-d '{"any": "data"}'

For more information, see Trigger flows with webhooks.

Webhook parameters

NameDisplay NameDescription
dataPayloadInput parameter. Receives a payload from external systems through HTTP POST requests.
curlcurlInput parameter. The curl command template for making requests to this webhook.
endpointEndpointInput parameter. The endpoint URL where this webhook receives requests.
output_dataDataOutput parameter. The processed data from the webhook input. Returns an empty Data object if no input is provided. If the input isn't valid JSON, the Webhook component wraps it in a payload object so that it can be accepted as input to trigger the flow.
Search