> Every page of the Heythere docs is listed in https://heythere.io/docs/llms.txt: fetch it to find a page instead of guessing its URL.

# Variables: shared values such as your address or hours

> Store values every automation reads, such as your shop's address or opening hours, and change one without publishing your automations again.

When the repair shop moves, every message telling Camille where to pick up her bike must give the new address. The shop keeps that address once, as a variable, a value a workspace keeps for all its [automations](https://heythere.io/docs/concepts/automations). A [step](https://heythere.io/docs/concepts/steps) reads a variable named `shop_address` as `{{workspace.shop_address}}` in a message, and as `workspace.shop_address` in a condition or an expression.

## What happens when its value changes?

A run reads the value its step finds when it reaches it. The shop saves its new address once, and every published automation gives it from its next step on, with no new [version](https://heythere.io/docs/concepts/versions).

## Who saves a variable?

A workspace member, or their agent, with `saveWorkspaceVariable`. A variable keeps the type it was first saved with, like an [attribute](https://heythere.io/docs/concepts/attributes): text, number, boolean, date, list, or schedule. It is never deleted, so a published automation always reads a value of the type it expects. Saving an existing name replaces its value.

## How does an automation read opening hours?

Camille writes on Saturday evening, after the shop has closed. A schedule holds weekly slots in one time zone, and dates closed or on special hours. A condition on `workspace.opening_hours.isOpen` tells whether the shop is open, and `{{workspace.opening_hours.nextOpening}}` tells Camille when it opens next, in the language the automation answers in, such as `Tuesday, November 17 at 9:00 AM`. A `wait` step of type `opening` holds her run until the shop opens, from Saturday evening to Tuesday morning.

## Is a variable secret?

No. The [workspace log](https://heythere.io/docs/concepts/workspace-log) shows the values runs read, so keep credentials in [secrets](https://heythere.io/docs/concepts/secrets).

## What happens when a variable is missing?

Publishing or testing a draft that reads a variable the workspace does not keep fails, naming the step and the variable.

## In the API

Every operation is a REST endpoint and, unless marked REST only, an MCP tool of the same name. [The OpenAPI document](https://app.heythere.io/api/openapi.json) describes their parameters, payloads, and errors.


- `saveWorkspaceVariable`: Save a workspace variable. `PUT /api/organizations/{organizationId}/workspaces/{workspaceId}/variables/{name}`
- `listWorkspaceVariables`: List workspace variables. `GET /api/organizations/{organizationId}/workspaces/{workspaceId}/variables`
