Goals

By the end of this tutorial, you will learn how to:

  • Trigger workflows from external events (e.g. from your SIEM)
  • Define input schemas for your workflows
  • Schedule workflow runs

Prerequisites

Tutorial

Webhook

1

Activate webhook

Every workflow comes with a webhook URL that can be used to trigger the workflow. To activate the webhook, click on the Trigger node and toggle the webhook switch.

2

Enable workflow

In the previous tutorials, we’ve used the manual trigger UI to run the workflow. To start receiving external events via the webhook URL, you still need to enable the workflow.

Click on Enable workflow to start receiving external events.

3

Trigger the workflow

To trigger the workflow, send a POST request to the webhook URL with the following JSON payload:

{
    "url": "https://example.com"
}
4

Define workflow input schema

Let’s say you want to the JSON payload to the webhook to fit a specific schema. Even though the input schema is optional, specifying it will allow you to validate the payload of the incoming webhook request. The workflow will fail fast if the incoming payload does not match the schema.

You can define the input schema by going into the workflow settings and filling out the Input Schema config with the following:

url:
    type: str
    description: The URL to check if malicious

The workflow’s input schema must be formatted in the following way:

field:
    type: str | int | bool | list[type] | dict[str, type]
    description: The description of the field
    default: The default value of the field (optional)

Nested schemas are currently not supported.

Schedule

1

Create a schedule

You can schedule a workflow under the Trigger node’s Schedules section.

2

Enable workflow

After creating a schedule, you’ll need to click Enable workflow to start workflow runs on the schedule.