Learn how to use webhooks and schedules to trigger workflows.
FN.deserialize_json
function.Trigger
action.
This trigger action cannot be deleted.
Click on the Trigger
action to activate the webhooks and schedules configuration panel.
Trigger
action, then toggle the webhook on.
Events can then be triggered by making a POST
request to the webhook URL.
Webhook URLs are formatted as:
Trigger
action, then toggle the schedule on.
echo=true
to the webhook URL.
execution_id
) as the response to the webhook POST request.
To return an empty response with status code 200, set the query parameter empty_echo=true
.
okta
Trigger
settings panel.
${{ TRIGGER }}
expression context to reference data passed via webhooks.
A child workflow also receives input data via ${{ TRIGGER }}
context.
Content-Type
headers:
application/json
application/x-ndjson
application/www-form-urlencoded
Content-Type
header to the appropriate value.
If no Content-Type
header is set, Tracecat defaults to application/json
.application/x-ndjson
).
Step-by-step guide
Configure Elastic webhook rule action body
Configure content type
Receive webhook in Tracecat
Content-Type
header to determine how to parse the webhook payload.
In this case, we’re using application/x-ndjson
, so Tracecat will parse the webhook payload as NDJSON.The ${{ TRIGGER }}
expression context will return a list of deserialized JSON objects.Deserialize JSON action
core.transform.reshape
action to the workflow.
Use the FN.deserialize_json
function to decode an incoming JSON string via webhook.Save workflow
Toggle webhook
Trigger
action.
Enable the webhook by clicking on the toggle switch.
The workflow will now receive webhook events.POST webhook request
POST
request to the webhook URL.
For example, using curl
:View workflow runs
Runs
view and check that the workflow has run successfully.
The workflow should have received the webhook payload and deserialized it into a JSON object.