Transform Webhooks

Trigger transforms or get triggered by transforms

Kleene supports inbound and outbound webhooks, allowing seamless integration between Kleene and external systems. You can create multiple inbound and outbound triggers for a single transform.

Outbound triggers: Send HTTP requests to external endpoints after a transform completes.

Inbound triggers: Receive HTTP requests from external systems to trigger specific transforms within Kleene.

Accessing Webhooks for a Transform

  1. Navigate to the Transforms page within the app.
  2. Next to the transform you want to set up, click the More options (⋯) button and choose Webhooks from the dropdown.
  3. The Webhooks tab displays configuration options for both Inbound and Outbound triggers.

Creating an Inbound Trigger

  1. Click on the 'Create inbound trigger' button and the inbound trigger URL is created immediately.
  2. Choose the HTTP method: GET or POST.
  3. Copy the generated trigger URL and execute the request from your desired platform.

After sending the request, the corresponding transform executes successfully within Kleene.

Select HTTP method

Select HTTP method

Example Python snippet

import requests


response = requests.get("{URL provided by the Kleene app}")
# or
response = requests.post("{URL provided by the Kleene app}", json={JSON body provided by the Kleene app})

Creating an Outbound Trigger

  1. Click on the 'Create outbound Triggers' button.
  2. Choose the HTTP method: GET or POST.
  3. Enter the destination URL for the outbound request.
  4. Optional; configure headers, query parameters, and body in the tabbed JSON editor. These fields can include any metadata required by the receiving service.
Enter Destination URL

Enter Destination URL

Example Python snippet

from flask import Flask, request


app = Flask (__name__)


@app.route("/my-webhook", methods=["POST"])
def webhook():
   ## Do something with provided data
   headers = request.headers
   body = request.json
   query = request.args
   return 'success', 200


if __name__ == '__main__':
 app.run()

Once created, run the transforms in Kleene to fire the outbound webhook, and verify the request is received successfully by the target endpoint.

🚧

Note: Outbound triggers operate on a “fire and forget” basis. This means Kleene does not wait for a response from the external system, so any failures or delays in the external endpoint will not affect the transform execution.