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

# Variables Panel

> Define and manage document variables — text, numbers, images, lists, and tables — for reusable content, bulk generation, and API automation.

The Variables panel (<Icon icon="variable" size={16} />) lets you define **named placeholders** that can be used throughout your document. Instead of repeating the same value in multiple places, define it once as a variable and reference it with `{{variableName}}` — when the value changes, every occurrence updates automatically.

<Frame>
  <img src="https://mintcdn.com/centerbit/dW_eP4noGjU_hbr8/images/application/sidebar-variables/sidebar-variables-panel.png?fit=max&auto=format&n=dW_eP4noGjU_hbr8&q=85&s=5922a20e857b609ce18e8274e7c94349" alt="Variables panel showing text, number, image, list, and table variables" width="2540" height="1884" data-path="images/application/sidebar-variables/sidebar-variables-panel.png" />
</Frame>

***

## Why use variables?

* **Central updates** — Change a company name, logo, or document number in one place and it updates everywhere in the document.
* **Bulk generation** — Variables serve as the template for [bulk document creation](/automation/overview). Define default values in the editor, then override them per document via CSV or API.
* **API automation** — When generating documents via the [REST API](/api-reference/introduction), variables are passed as JSON. The values defined in the panel act as defaults that can be overridden at render time.

***

## Variable types

Autype supports five variable types. Use the buttons at the top of the panel to add a new variable:

| Type       | Icon                                | Use case                                          |
| ---------- | ----------------------------------- | ------------------------------------------------- |
| **Text**   | <Icon icon="file-text" size={16} /> | Short inline values — names, dates, labels        |
| **Number** | <Icon icon="hash" size={16} />      | Numeric values — amounts, counts, IDs, chart data |
| **Image**  | <Icon icon="image" size={16} />     | Logos, signatures, photos — anything visual       |
| **List**   | <Icon icon="list" size={16} />      | Ordered or unordered lists of items               |
| **Table**  | <Icon icon="grid-3x3" size={16} />  | Structured data with named columns and rows       |

When creating a variable, you choose a **name** that must start with a letter or underscore and can only contain letters, numbers, and underscores (e.g. `companyName`, `logo_image`, `featureList`). The name cannot be changed after creation.

***

## Text variables

A text variable holds a single string value (max 1,000 characters). Use it for anything that appears inline in your document — company names, author names, dates, etc.

<Frame>
  <img src="https://mintcdn.com/centerbit/dW_eP4noGjU_hbr8/images/application/sidebar-variables/text-variable-set-value.png?fit=max&auto=format&n=dW_eP4noGjU_hbr8&q=85&s=67f796f3c272ff21428d07697688c536" alt="Text variable with value set" width="686" height="582" data-path="images/application/sidebar-variables/text-variable-set-value.png" />
</Frame>

**Insert into document:**

```markdown theme={null}
Dear {{companyName}}, please find attached...
```

Text variables can be placed **anywhere inline** — inside paragraphs, headings, table cells, or list items.

***

## Number variables

A number variable holds a single numeric value (integer or decimal). Use it for amounts, counts, IDs, or any dynamic numeric content.

**Insert into document:**

```markdown theme={null}
Total: {{totalAmount}} EUR
```

Number variables are automatically converted to their string representation when used inline. They are especially useful in **chart data arrays**, where they are resolved to numeric values at render time.

<Info>
  For chart variable substitution details, see the [JSON Syntax — Charts](/api-reference/json-syntax/sections/media#variable-substitution-in-charts) reference.
</Info>

***

## Image variables

An image variable stores a reference to an image file along with optional **width**, **height**, and **caption** properties.

<Frame>
  <img src="https://mintcdn.com/centerbit/dW_eP4noGjU_hbr8/images/application/sidebar-variables/image-variable-set-value.png?fit=max&auto=format&n=dW_eP4noGjU_hbr8&q=85&s=03798614411085c4b20a6f7c37b4a42f" alt="Image variable with source, dimensions, and caption fields" width="708" height="712" data-path="images/application/sidebar-variables/image-variable-set-value.png" />
</Frame>

You can either enter an image path manually or click the <Icon icon="upload" size={16} /> button to upload an image directly. Uploaded images are stored as project assets.

| Field       | Required | Description                                                 |
| ----------- | -------- | ----------------------------------------------------------- |
| **Source**  | Yes      | Image path (e.g. `/image/assetId`) or external URL          |
| **Width**   | No       | Width in pixels (10–2,000)                                  |
| **Height**  | No       | Height in pixels (10–2,000)                                 |
| **Caption** | No       | Caption text displayed below the image (max 200 characters) |

**Insert into document:**

```markdown theme={null}
{{companyLogo}}
```

<Warning>
  Image variables must be placed on their **own line** — they cannot be used inline within a paragraph.
</Warning>

***

## List variables

A list variable holds an ordered or unordered list of text items (up to 100 items, each max 1,000 characters). Toggle between **Unordered** and **Ordered** using the switch at the top of the variable.

<Frame>
  <img src="https://mintcdn.com/centerbit/dW_eP4noGjU_hbr8/images/application/sidebar-variables/list-variable-set-values.png?fit=max&auto=format&n=dW_eP4noGjU_hbr8&q=85&s=52b617143a3f754d734cc62085c512eb" alt="List variable with three items and list type toggle" width="692" height="884" data-path="images/application/sidebar-variables/list-variable-set-values.png" />
</Frame>

Use **+ Add Item** to add entries and the <Icon icon="trash-2" size={16} /> button to remove individual items.

**Insert into document:**

```markdown theme={null}
{{featureList}}
```

<Warning>
  List variables must be placed on their **own line** — they cannot be used inline within a paragraph.
</Warning>

***

## Table variables

A table variable stores structured data with **named columns** and **rows** (max 100 rows × 20 columns, cell content max 1,000 characters). Click **Edit Table Data** to open the table editor modal.

<Frame>
  <img src="https://mintcdn.com/centerbit/dW_eP4noGjU_hbr8/images/application/sidebar-variables/edit-table-variable-modal.png?fit=max&auto=format&n=dW_eP4noGjU_hbr8&q=85&s=d26e545a40de1a25cb5d9442b901ee5f" alt="Table editor modal with editable column headers and data rows" width="1556" height="972" data-path="images/application/sidebar-variables/edit-table-variable-modal.png" />
</Frame>

In the modal you can:

* **Edit column headers** — click directly on the header cells to rename them
* **Edit cell values** — click any cell to change its content
* **Add / remove rows and columns** — use the buttons below the table
* **Delete individual rows** — click the <Icon icon="trash-2" size={16} /> button on each row

The modal also shows the syntax hint for referencing individual columns: `{{TableName.columnName}}`.

**Insert into document:**

```markdown theme={null}
:::table{dataSource="PerformanceTable"}
| 2024 | 2025 | 2026 |
| --- | --- | --- |
:::
```

The column headers in the Markdown must match the column names defined in the variable. The `| --- |` separator row is required. At render time, the table is populated with the data from the variable.

<Warning>
  Table variables use the directive syntax and must be placed on their **own line** — they cannot be used inline.
</Warning>

***

## Inserting variables

Every variable in the panel has a <Icon icon="copy" size={16} /> **copy button** that copies the correct insertion syntax to your clipboard:

| Variable type | Copied syntax                                          |
| ------------- | ------------------------------------------------------ |
| **Text**      | `{{variableName}}`                                     |
| **Number**    | `{{variableName}}`                                     |
| **Image**     | `{{variableName}}`                                     |
| **List**      | `{{variableName}}`                                     |
| **Table**     | `:::table{dataSource="variableName"}` + column headers |

Paste the copied syntax directly into your document at the desired position.

<Tip>
  You can also type `{{` manually in the editor and enter the variable name. The toolbar provides a dedicated variable insert button as well.
</Tip>

***

## Variables and bulk generation

The variables you define in the panel serve as the **default template values**. When you use [bulk generation](/automation/overview) or the [API](/api-reference/introduction), you can override any variable per document:

1. **Define variables** in the sidebar with sensible defaults
2. **Reference them** throughout your document with `{{variableName}}`
3. **Override values** per document via CSV upload (bulk) or JSON payload (API)

Any variable not overridden in a bulk job or API call keeps its default value from the panel.

<Tip>
  For a full reference on variable syntax — including built-in variables like `{{date}}`, date formatting, and block-level usage — see the [Markup Reference: Variables](/markup-reference/variables).
</Tip>
