Skip to content

Script Kinds

A script’s kind tells Orvanta how to slot it into a workflow — a plain script can only ever run as a normal step, but marking it as one of the kinds below unlocks a specific role.

Set the kind from a script’s Settings, under the Metadata tab.

The default kind. An action is a regular step: it takes inputs, does something, and returns an output. Most scripts in a workflow are actions.

A trigger script runs first in a workflow, typically on a schedule, and is responsible for deciding whether the rest of the workflow should run at all. The usual shape is: fetch the current state of some external system, compare it against what was seen last run (kept in the trigger’s own internal state), and only let the workflow continue if something changed.

An approval script pauses the workflow until someone approves it. It calls back into the Orvanta API — via any of the Orvanta clients — to obtain a one-time approval URL along with the resume and cancel endpoints tied to that suspended run, then typically hands that URL to a human through whatever channel makes sense (chat message, email, ticket comment).

An error handler runs after a workflow has exhausted its retries on a failed step. Its return value decides the workflow’s final status: return normally and the run is marked recovered/successful; re-raise the error (or raise a new one) and the run is still recorded as failed. Since a silent success is rarely what you want for a genuine failure, most error handlers end by re-raising.

A preprocessor runs before the workflow’s main input schema is applied, so it can reshape or validate raw incoming data — for example, normalizing a webhook payload — before the rest of the workflow ever sees it.