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

# Variables

> Create reusable values for your workflow prompts

Variables allow you to define reusable values that can be referenced in your prompts using `@variableName` syntax. This is useful when you need to run workflows with different input parameters.

## How Variables Work

When your workflow runs, Kadoa automatically replaces variable references with the actual values you've defined.

**Example:**

If you create a variable named `keywords` with the value `"ESG reports"`, this prompt:

```
- Search for @keywords
- Filter by "2025"
- Extract: data, title, pdfLink
```

Becomes:

```
- Search for "ESG reports"
- Filter by "2025"
- Extract: data, title, pdfLink
```

## Variable Data Types

| Type            | Description                                      | Example                       |
| --------------- | ------------------------------------------------ | ----------------------------- |
| **Text**        | Plain text values                                | `"ESG reports"`               |
| **Secret**      | Encrypted sensitive values (passwords, API keys) | `"••••••••"`                  |
| **JSON Object** | Structured data                                  | `{"key": "value"}`            |
| **Array**       | Lists of values                                  | `["10001", "10002", "10003"]` |

## Creating Variables

1. Navigate to team settings in your dashboard sidebar
2. Click **Add variable**
3. Enter a unique **Key** (no spaces allowed)
4. Select the **Data Type** (Text, Secret, JSON Object, Array)
5. Enter the **Value**
6. Click **Save**

## Using Variables in Prompts

When writing your prompt:

* Type `@` to see available variables
* Select from the suggestion list or type the variable name manually
* The variable will be highlighted in your prompt editor

### Example: Location-Based Search

```
- Loop through ZIP codes @zipCodes in the location field
- Search for nearby stores within @radius miles
- Extract: store_name, address, phone, hours
```

Variables: `zipCodes: ["10001","10002"]`, `radius: 25`

### Example: Authenticated Portal Access

```
- Navigate to the login page
- Enter @username in the email field
- Enter @password in the password field
- Click the login button
- Navigate to the reports section
- Extract: report_name, date, download_link
```

Variables: `username: "user@example.com"`, `password: (Secret)`

## Variable Scope

* Variables are scoped to your **team workspace**
* All team members can use variables in their workflows
* Only Admins and Owners can create, edit, or delete variables

## Learn More

* [Variables SDK Reference →](/docs/sdk/variables/overview) - Manage variables programmatically
* [Variables API Reference →](/api-reference/variables/create-a-variable)
* [Writing Prompts →](/docs/workflows/prompts#writing-effective-prompts)
* [Secret Variables →](/docs/workflows/secrets)
