HTTP Webhook

Listens for incoming HTTP requests and injects them into the flow. Requires the HTTP server enabled in worker config.

Configuration

worker:
  http_server:
    enabled: true
    port: 3000
- http_webhook:
    name: receive_order
    endpoint: /webhooks/orders
    method: POST
    credentials_path: /etc/webhook/credentials.json

Fields

FieldTypeDefaultDescription
namestringrequiredTask name.
endpointstringrequiredRoute path (e.g., /webhooks/orders).
methodstringGETHTTP method: GET, POST, PUT, DELETE, PATCH.
headersmapExpected headers.
credentials_pathstringPath to credentials for request authentication.
ack_timeoutdurationMax time to wait for flow completion before responding.
max_body_bytesint10485760Maximum accepted request body size in bytes (10 MiB default). Larger requests are rejected with HTTP 413 before being read into memory.
streamboolfalseStream responses as Server-Sent Events.
authobjectUser authentication configuration.
depends_onlistUpstream task names.
retryobjectRetry configuration.

Example: Webhook with SSE streaming

flow:
  name: webhook_flow
  tasks:
    - http_webhook:
        name: receive
        endpoint: /api/process
        method: POST
        stream: true
        ack_timeout: "30s"

    - script:
        name: transform
        code: |
          let data = event.data;
          #{result: data.input.to_upper()}

    - log:
        name: output

With stream: true, the client receives intermediate results as SSE events while the flow processes.