Skip to navigation

Create a trigger

A manual on-demand trigger’s inputs are cleaned against its form when they’re saved. The form is looked up, even for empty inputs, and the values it no longer has, such as a removed field or a removed dropdown option, are dropped. The response’s inputs are what was saved. A manual trigger with no formId makes no lookup and saves its inputs as sent.

A form that can’t be loaded fails the request and nothing is created. The error says why in formFailure: 422 NOT_FOUND, 403 FORBIDDEN, 503 UNAVAILABLE.

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Request

body
automationIdstringRequired
namestringRequired
Must contain at least one character that is not whitespace.
kindenumRequired
Allowed values:
descriptionstringOptional
variantenumOptional

Required when kind === on_demand.

Allowed values:
routeNamestringOptional

Required when variant === api. Letters of either case, digits, underscores and hyphens; case-sensitive and stored exactly as typed. Rejected when another API Trigger, enabled or disabled, already has it.

jststringOptional

Only for variant === api; omit to pass the request body through unchanged.

bodySchemaobjectOptional

Only for variant === api. A JSON schema describing the POST body callers send to the endpoint; it is stored as given, and a body that does not match it is rejected when the endpoint is called. A schema that cannot be used (an unknown keyword, a $ref to nothing, an unknown $schema or format, or $async) is rejected with a 400 and the reason.

formIdstringOptional

Id of the form the inputs were filled in on. Only for kind === schedule, or kind === on_demand with variant === manual; omit for a Trigger with no form. For a manual Trigger the form is looked up when the Trigger is created.

legacyWrapperbooleanOptional

Legacy field, kept only to support workflows written for the old input shape: before July 2023, Operations Manager passed form values to the workflow inside one variable named formData. Defaults to false. Turning it on is refused unless the automation’s asset is a workflow. Not allowed when variant === api.

scheduleobjectOptional
inputsobjectOptional

Required when kind === schedule, or kind === on_demand with variant === manual. For a manual Trigger with a formId, the values the form no longer has (a removed field, a removed dropdown option) are dropped when it is saved.

sourcestringOptional
topicstringOptional
schemaobjectOptional

Only for kind === event. A JSON schema the payload of a received event must match. A schema that cannot be used (an unknown keyword, a $ref to nothing, an unknown $schema or format, or $async) is rejected with a 400 and the reason.

jstIdstringOptional
JST id used to turn an event payload into job variables. Event kind only.
resourceActionobjectOptional
Required when the automation targets a resource model, and rejected for any other asset type.

Response

result
triggerIdstring
serviceIdstringOptional

The Service that exposes the Trigger to end users. Present only for a manual on-demand Trigger; absent for an API on-demand, schedule or event Trigger, which has none.

resourceActionobjectOptional
inputsobjectOptional

The inputs exactly as saved. Present only for a manual on-demand Trigger. When it has a form, these are the inputs sent without the values the form no longer has (a removed field, a removed dropdown option).

Errors

500
Internal Server Error