Triggered actions

Perform actions in response to Skedulo event triggers.

Triggered actions are Skedulo’s newer iteration of webhooks. A trigger defines what Skedulo event causes an action to be performed in response.

Triggered actions can be inserted, updated, and deleted, and are defined via the /triggered_actions endpoints.

Triggers

Triggered actions can be configured to fire whenever an object is modified and perform an action in response. For example, a trigger can fire whenever a job status changes and perform an action by sending an SMS notification.

  • object_modified: These triggers fire when an object is being tracked for changes with a GraphQL subscription is inserted, updated or deleted. To configure the trigger, you must provide the following configuration:

    • The trigger type.
    • The target schema/object name.
    • An EQL filter. The filter specifies when the action should be performed and can refer to the operation name and the current and previous data objects.

A validation check runs whenever a triggered action is inserted or updated. This ensures that the trigger and action are valid and that the trigger provides the data required by the action.

Actions

Actions fire in response to a trigger event. Only certain actions are valid for a trigger – a call_url action, or a send_sms action.

  • call_url: This action performs a POST HTTP request to a provided URL, with a configured list of header names and values that are added to the request. The body of the request is a JSON array including at least one object determined via a GraphQL fragment. The GraphQL fragment is validated against the data provided by the trigger.

    The JSON array allows the opportunity to combine multiple events into a single action.

  • send_sms: Sends an SMS message to a phone number provided in the configuration. The phone number to use can be defined statically or as an EQL field name if the data source provides a record. The message structure is defined as a {{ mustache}} template that includes EQL field names that can be extracted from the data provided by the trigger.

Using EQL filters in triggered actions

Triggered actions require an EQL filter to specify which trigger prompts the action to be performed. EQL filters support field lookups, boolean logic, wildcards, comparisons, and function calls.

The following filters are commonly used in triggered actions and webhooks to specify the type of data you want to listen for and respond to.

  • Operation == 'INSERT' OR Current.JobStatus != Previous.JobStatus
  • Operation == 'UPDATE'
  • Operation == 'DELETE'
  • Current.Description == 'defer'

For more information about using EQL filters, see the EQL filter section.


Create a triggered action for modified objects

Setting up a new triggered action in a development environment that triggers when a Skedulo object is modified.