Triggers

Triggers enable you to run automations in four different ways. You can assign as many triggers as you like to an automation and have more than one of each type.

Trigger types

Trigger typeFunction
ManualRuns the automation manually (user invoked). A JSON Form providing additional runtime data may optionally be assigned to the trigger.
API endpointRuns the automation from a unique endpoint using an HTTP POST call, optionally using the request body as the assigned workflow’s input.
ScheduleRuns the automation at some point in the future at an optional repeating frequency. Also includes an optionally assigned JSON Form.
EventRuns the automation when a system event occurs.

Workflows initiated by triggers will mention Operations Manager in the job description.

Operations Manager in job description

Create and edit triggers

1

Open the Create Trigger panel

Click the Create Trigger button (+) in the Triggers toolbar on the Automation Details page. The Create Trigger panel appears on the left.

2

Enter trigger details

Enter a name and, optionally, a brief description for the trigger.

3

Select the trigger type

Use the Type dropdown to select the trigger type you want to create.

4

Complete trigger-specific fields

Complete the appropriate fields for the selected trigger type. See the sections below for details on each type.

5

Save

Click Save Changes at the bottom-left of the Create Trigger panel.

You can edit existing triggers from the trigger card by clicking the trigger name at the top of a card.

Manual triggers

Manual triggers run the related automation only when invoked by you. A JSON Form may optionally be assigned to the trigger to provide runtime data to the underlying workflow.

Create Manual Trigger panel
LabelUI elementFunction
1NameAdd or change the trigger name.
2DescriptionOptional. Add or change a description for the trigger.
3TypeDropdown menu to select or change the type of trigger to create.
4FormOptional. Dropdown menu to select the JSON Form to run the assigned workflow with.
5Create New FormClick the + icon to open the Studio create modal in a new tab to create a new JSON Form.
6Wrap form fields into a single formData objectWhen clicked, assigns all form fields to a formData job variable available in the workflow context.
7Form DataView and edit the contents of the selected JSON Form.

Run automations from manual triggers

1

Open the Run Automation panel

Click the Run Now button at the top of the Automation Properties panel.

2

Select the trigger

Use the dropdown to select the manual trigger that will run the automation.

3

Edit form data (optional)

Optionally, edit the trigger’s JSON Form data.

4

Run

Click Run Now at the bottom-left corner of the Run Automation panel.

Run Automation panel

API endpoint triggers

API endpoint triggers run the automation whenever the configured endpoint receives an HTTP POST request. When a request is received:

  1. The body of the HTTP POST request (represented as a JSON object) is validated against the POST body schema defined in the trigger.
  2. If the body is validated, it is sent to an optional JST defined in the trigger.
  3. After the JST is applied (if relevant), the keys and values of the request body are made available to the workflow and the automation runs.
  4. The endpoint responds to the client with information about the workflow that was started.

To use keys and values from the body of the HTTP POST request in a workflow, you must reference them as job variables within the workflow itself.

Each API trigger requires a unique route name. Endpoint trigger URLs use the following format:

/operations-manager/triggers/endpoint/:routeName
Create API Endpoint Trigger panel
LabelUI elementFunction
1NameAdd or change the trigger name.
2DescriptionOptional. Add or change a description for the trigger.
3TypeDropdown menu to select or change the type of trigger to create.
4ActionThe HTTP type will always be POST.
5RouteRequired. The unique route name for the endpoint.
6JST (Optional)Select the JST to transform the HTTP POST request body to the input schema of the assigned workflow.
7POST Body SchemaThe JSON schema the HTTP POST request body must match.
8Save ChangesButton to retain changes and save the trigger.

POST body schema

The POST body schema is a JSON schema against which the body of the HTTP POST request is validated. If the request body is validated, the API trigger continues its preparations to run the automation. If the request body is not validated, the automation is not run.

The POST body schema uses the following syntax:

1{
2 "type": "object",
3 "properties": {},
4 "additionalProperties": true
5}
PropertyDescription
typeRefers to the HTTP POST request body, which is represented as a JSON object.
propertiesWhere the variables the HTTP POST request body should be validated against are defined.
additionalPropertiesAllows variables not defined in the properties key of the POST body schema to be present in the request body without affecting validation. Default is true.

Example: Velocloud Edge Provisioning automation

The following example shows how to trigger a Velocloud Edge Provisioning automation using an API endpoint trigger.

Create the API endpoint trigger

Endpoint — Use the following endpoint to trigger the automation:

https://example.iap-prod.itential.io/operations-manager/triggers/endpoint/velocloud-edge-provisioning-v2

Authentication — Itential Platform uses a token for API calls, passed to the endpoint via the token query parameter. In on-premises environments, retrieve this token by calling the login endpoint. See the API documentation for reference. For SaaS customers with Itential Cloud environments, the token is provided by the Product Support Team.

https://example.iap-prod.itential.io/operations-manager/triggers/endpoint/velocloud-edge-provisioning-v2?token={{IAP-static-token}}

Payload body — The values in the payload body are used by the automation for edge provisioning in Velocloud:

1{
2 "iapPayload": {
3 "disableGe3InterfaceWanOverlay": true,
4 "vco": "vco109-usca1",
5 "enterpriseId": "935",
6 "configurationId": "12285",
7 "name": "sampleEdge",
8 "vpcCidr": "10.100.100.0/22",
9 "publicSubnetCidr": "10.100.101.0/24",
10 "privateSubnetCidr": "10.100.102.0/24",
11 "managementIp": "10.100.101.10/32",
12 "ge3Ip": "10.100.101.4/24",
13 "terraformPrivateIp": "10.100.102.4",
14 "availabilityZone": "us-west-2c",
15 "awsAccessKey": "EXAMPLE1A6DYSQ8LXGNV",
16 "awsSecretKey": "EXAMPLE+O0sVH22k6mwbHddceygaXAdx4St0k/KB"
17 }
18}

Postman call — An example of the API call in Postman:

Data view in Postman

Check automation status

To check the status of the automation (job), make a separate call to Itential Platform. When triggering automations via API, Itential Platform returns a 200 status code if the automation started successfully.

GET call — Use the following URL to check job status:

https://example.iap-prod.itential.io/operations-manager/jobs/{{job_id}}?token={{IAP-static-token}}&include=status
Checking the automation status

Response body — The job_id value can be found in the response body of the POST call (_id). The following example shows the response and where to find the job_id:

Locating the job ID

Response status — The response from the GET job status call should look like the following. The "status" field indicates whether the job is still running or complete:

1{
2 "message": "Successfully retrieved item",
3 "data": {
4 "_id": "847a683ac25a486e99f04fe3",
5 "status": "complete",
6 "metadata": {}
7 }
8}

HTTP verbs

Operations Manager API triggers are intended to start an automation job. For this reason, the only HTTP verb supported is POST. HTTP verbs denote the impact a request has on the target resource. Supporting other HTTP verbs, such as DELETE, would imply that an API trigger is being deleted rather than that the trigger is starting an automation whose purpose is to delete configuration from an external service or device.

Additional resource

For more information about API triggers, watch the Itential Learn video below.

Schedule triggers

Schedule triggers run the automation at some point in the future at an optional repeating frequency.

The Start time selected in the Create Trigger panel and shown in the trigger card after saving is based on your current time and date.

Create Schedule Trigger panel
LabelUI elementFunction
1NameAdd or change the trigger name.
2DescriptionOptional. Add or change a description for the trigger.
3TypeDropdown menu to select or change the type of trigger to create.
4StartRequired. Calendar icon to choose the date and time to start running the automation.
5Repeat EveryOptional. Check the Repeat checkbox and select the frequency at which the trigger should run the automation.
6Process Missed RunsRequired. Sets whether Operations Manager should run the most recently missed scheduled run if a scheduled item fails to run.
7FormOptional. Select the JSON Form to run the assigned workflow with.
8Legacy Workflow CompatibilityMakes the trigger compatible with workflows created using legacy versions of Itential Platform (prior to 2023.2).
9Form DataView and edit the contents of the selected JSON Form.
10Save ChangesSave the trigger and, if applicable, any assigned JSON Form data and its inputs.

Event triggers

Event triggers run the automation whenever the configured event occurs. When an event occurs in Itential Platform:

  1. The event system publishes an event object representing that event as a JSON object.
  2. The payload key of the event object is validated against the payload schema filter defined in the event trigger.
  3. If the payload passes validation, it is extracted from the event object and sent to an optional JST defined in the event trigger.
  4. After the JST is applied (if relevant), the payload is made available to the workflow and the automation runs.

To use keys and values from the payload in a workflow, you must reference them as job variables within the workflow itself.

For more information, see Event system.

Create Event Trigger panel
LabelUI elementFunction
1NameAdd or change the trigger name.
2DescriptionOptional. Add or change a description for the trigger.
3TypeDropdown menu to select or change the type of trigger to create.
4EventRequired. Select the event that should run the automation.
5JSTOptional. Select the JST to transform the event payload.
6Legacy Workflow CompatibilityMakes the trigger compatible with workflows created using legacy versions of Itential Platform (prior to 2023.2).
7Payload Schema FilterThe JSON schema the event payload must conform to.
8Save ChangesButton to retain changes and save the trigger.

Payload schema filter

The payload schema filter is a JSON schema against which the payload key of an event object is validated. If the payload is validated, the event trigger continues its preparations to run the automation. If the payload is not validated, the automation is not run.

The payload schema filter uses the following syntax:

1{
2 "type": "object",
3 "properties": {},
4 "additionalProperties": true
5}
PropertyDescription
typeRefers to the payload key of the event object, which is itself a JSON object.
propertiesWhere the event variables the payload should be validated against are defined.
additionalPropertiesAllows variables not defined in the properties key of the payload schema filter to be present in the payload without affecting validation. Default is true.

It is possible to create an infinite job execution loop if an automation can activate its own event trigger. This is especially applicable when using the following events in an event trigger:

  • jobStart
  • jobCancel
  • jobError

When using an event trigger, ensure the workflow executed by the automation cannot generate an event that will activate that same event trigger.

Trigger cards

You can manage triggers for an automation through a collection of trigger cards on the Automation Details page. Each trigger is represented by a card.

Trigger cards
LabelUI elementFunction
1Triggers ToolbarAction icons (from left to right) to create a new trigger, run a trigger, or delete triggers.
2Toggle SwitchEnables or disables the trigger.
3Select TriggerCheckbox to select the trigger.
4Action IconsUsed to perform operations on the trigger. Available icons vary depending on the trigger type.

Trigger card actions

From a trigger card, you can:

  • View information about a trigger (name, type, and description).
  • Create a trigger.
  • Enable or disable a trigger.
  • Run, edit, or delete a trigger.

To enable or disable a trigger, click the toggle switch at the top-right corner of the trigger card:

  • When the toggle switch is blue with a check mark (✓), the trigger is enabled.
  • When the toggle switch is gray with an X, the trigger is disabled. A disabled trigger will not run its automation.

To run or delete a trigger, click the Run or Delete button at the bottom-right corner of the trigger card.

Triggers can also be deleted in bulk. Check the select box at the bottom-left corner of each trigger you want to delete, then click Delete in the Triggers Toolbar.