> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getoperate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Script Editor

> In getOperate, Scripts are the basis of all major features (they are the steps of flows, linked to apps components, or can be run as standalone).

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:

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    def main(param1: str, param2: dict, ...):
    ...
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typeScript theme={null}
    async function main(param1: string, param2: { nested: string }) {
      ...
    }
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    func main(x string, nested struct{ Foo string \`json:"foo"\` }) (interface{}, error) {
      ...
    }
    ```
  </Tab>

  <Tab title="Bash">
    There is no main needed for Bash. The body is executed and the args are passed directly.
  </Tab>
</Tabs>

# 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](#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.

<CardGroup cols={2}>
  <Card title="Script Quickstart" href="/introduction/quickstart/script-quickstart">
    Start writing scripts in Python, TypeScript, Go, Bash and Sql.
  </Card>

  <Card title="Flows Quickstart" href="/introduction/quickstart/flow-quickstart">
    Learn how to build flows.
  </Card>
</CardGroup>

### 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.

<CardGroup cols={2}>
  <Card title="Trigger Scripts" href="/introduction/quickstart/trigger-scripts">
    Trigger scripts are designed to pull data from an external source and return
    all of the new items since the last run, without resorting to external
    webhooks.
  </Card>

  <Card title="Schedules" href="/workflows/events/schedules">
    getOperate provides the same set of features as CRON, but with a user
    interface and control panels.
  </Card>
</CardGroup>

### 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.

<Card title="Approval Steps in Flows" href="#">
  Flows can be suspended until resumed or cancelled event(s) are received.
</Card>

### 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.

<Card title="Error Handler" href="/workflows/events/error-handling">
  The error handler is a special flow step that is executed when an error occurs
  in the flow.
</Card>
