Skip to main content

AutomatorScript

AutomatorScript is the programming language you use to write packages: the scripts that process trigger events and execute your automations.

The language is based on JavaScript and closely follows its syntax. Therefore, if you (or your AI agent) can write JavaScript, you can also write AutomatorScript, and you can lean on standard references such as the MDN JavaScript Guide for the syntax. Throughout this documentation, we link to MDN for the parts that behave exactly like standard JavaScript, and focus our own explanations on what makes AutomatorScript different.

For a more detailed overview of the relation between AutomatorScript and JavaScript, see Relation to JavaScript.

The AutomatorScript language is built for integrations. That means that, on top of the standard JavaScript features, it comes with a large library of functions for talking to external systems and performing common integration tasks.

In addition, it has conveniences such as auto-fetch and auto-retry that remove boilerplate you would otherwise write by hand.

This section covers the language itself. For how to structure, trigger, and test the scripts you write with it, see the Packages section.