A Script can be written in: TypeScript (Deno & Bun), Python, Go, Bash or SQL. Its two most important components are the input JSON Schema specification and the code content.

Python and Go Scripts also have an auto-generated lockfile that ensure that executions of the same Script always use the exact same set of versioned dependencies. To fit getOperate’s execution model, the code must always have a main function, which is its entrypoint when executed as an individual serverless endpoint or a Flow module and typed parameters used to infer the script’s inputs and auto-generated UI:

def main(param1: str, param2: dict, ...):
...

Settings

Each script has metadata associated with it, enabling it to be defined and configured in depth.

Path

Path is the Script’s unique identifier that consist of the script’s owner, and the script’s name. The owner can be either a user, or a group of users (folder).

Summary

Summary (optional) is a short, human-readable summary of the Script. It will be displayed as a title across getOperate. If omitted, the UI will use the path by default.

Language

Language of the script. getOperate supports TypeScript, Python, Go, Bash and SQL.

Description

This is where you can give instructions to users on how to run your Script. It supports markdown.

Concurrency limits

The Concurrency Limit feature allows you to define concurrency limits for scripts and inline scripts within flows.

Script Kinds

You can attach additional functionalities to Scripts by specializing them into specific Script kinds.

From the Settings of a script, the “Metadata” tab lets you define the following Script kinds:

Actions

Actions - or Common Scripts - are the basic building blocks for the flows.

Trigger Scripts

These are used as the first step in Flows, most commonly with an internal state and a schedule to watch for changes on a external system, and compare it to the previously saved state. If there are changes,it triggers the rest of the flow, i.e. subsequent Scripts.

Approval Scripts

Suspend a flow until it’s approved. An Approval Script will interact with the getOperate API using any of the getOperate clients to retrieve a secret approval URL and resume/cancel endpoints. Most common scenario for Approval Scripts is to send an external notification with an URL that can be used to resume or cancel a flow.

Approval Steps in Flows

Flows can be suspended until resumed or cancelled event(s) are received.

Error Handlers

Handle errors for Flows after all retries attempts have been exhausted. If it does not return an exception itself, the Flow is considered to be “recovered” and will have a success status. So in most cases, you will have to rethrow an error to have it be listed as a failed flow.

Error Handler

The error handler is a special flow step that is executed when an error occurs in the flow.