Skip to main content
An automation definition is a trigger and an ordered list of steps. The Automation Builder writes one for you when you describe what you want in chat. Write one yourself when you build automations over the API or an MCP client.

Required fields

Optional fields

Choosing a trigger

trigger_type takes one of three kinds of value. A project event fires the automation when something happens in your store, such as ORDER_CREATED or CUSTOMER_UPDATED. Browse them in Events. Connection webhooks use the connection’s own event id, such as shopify/orders/paid. SCHEDULE runs the automation on a clock. Pair it with schedule_config, whose fields are in Scheduled:
function makes the automation callable by an agent rather than fired by an event. Declare what the caller passes in input_schema:

Referencing data

Steps read values with {{...}} templates rather than literals. Data access covers the rules; the namespaces are: There is no {{payload.*}} namespace. A function trigger’s inputs are trigger payload fields like any other, so an input_schema property named order_id is {{order_id}}.

A complete definition

This automation runs every Monday morning, asks for last week’s revenue, and posts it to Slack.
Each step type takes its own fields on top of id and type. Step types lists them, and marks which are required.

Checking a definition

Validate a definition before you create it. The checker runs the same rules the platform runs on create, over a whole definition or a single step, so what it accepts is what the platform accepts. See the MCP server for the tools that expose it.