If you’re using a tool or service that lets you craft custom HTTP requests (e.g., an internal system, a low-code platform, or a third-party app), you can integrate it with Lutra by making a POST request to the Webhook URL.
Requirements
Webhook URL and Token from Lutra.
An application or service that can perform an HTTP POST with custom headers.
Steps
Create a Webhook in Lutra
From your chosen Playbook, click “Webhook.”
Copy the
URLandX-Lutra-Webhook-Token.
Configure an HTTP POST
In your external application, set the request method to POST.
URL: Paste the Lutra-provided URL (e.g.,
https://lutra.ai/api/webhooks/<WEBHOOK_ID>/runs).Headers:
Content-Type: application/jsonX-Lutra-Webhook-Token: <YOUR_TOKEN>
Body: A JSON object containing the inputs to your Playbook, for example:
{ "condition": "heart attack", "destination_sheet": { "id": "1234567890abcdef", "mime_type": "application/vnd.google-apps.spreadsheet", "name": "Heart Attack Clinical Trials" } }
Check Response
A successful request returns a
201 Createdstatus. The JSON response contains:run_idstarted_atlatest_event_atuser_requested_cancel_atworkflow_inputresult(this is null at first until the run completes)
Polling for Completion (Optional)
The
Locationheader in the response points to a URL you canGETto see the updated run state. Use the sameX-Lutra-Webhook-Tokenheader.Once
resultis non-null, the run has finished.
