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

# Environment Variables

> Store reusable key-value data per environment and keep credentials out of prompts.

# 🔑 Environment Variables

Environment variables let you keep sensitive or frequently reused data—such as API keys, user credentials, or feature flags—centralized and encrypted inside Nota.

***

## Why Use Environment Variables?

* Reference values across multiple workflows without duplicating them.
* Provide different values for each environment (dev, staging, prod) while keeping key names consistent.
* Rotate secrets safely in one place instead of editing many workflows.

***

## Add or Update a Variable

1. Open **Settings → Environment Variables**.
2. Click **➕ Add Variable** or select an existing entry to edit.
3. Supply the **Key** (e.g., `API_KEY`) and **Value** for the chosen environment.
4. Save to make the variable instantly available for prompts and AI-generated flows.

> 🔐 **Security:** Values are encrypted at rest and only surfaced to the Nota agent while a workflow is running.

***

## Bulk Upload Options

Upload multiple variables at once using either JSON or `.env` files. Choose the format that matches how you already manage secrets.

```json theme={null}
[
  {
    "key": "USERNAME",
    "value": "test_user_01"
  },
  {
    "key": "API_KEY",
    "value": "sk_test_abc123"
  }
]
```

```env theme={null}
USERNAME=test_user_01
API_KEY=sk_test_abc123
```

When importing, Nota aligns the keys with your existing environments so you can confirm values before saving.

***

## Example View

<img src="https://mintcdn.com/notaai/QHGAotH6qBy3S-kq/images/settings/environments/variables.png?fit=max&auto=format&n=QHGAotH6qBy3S-kq&q=85&s=c44217d5d48c97c06c5859d77d7283fb" alt="saved environment variables" width={1200} height={600} data-path="images/settings/environments/variables.png" />

***

## Best Practices

* **Prefix keys** (e.g., `STRIPE_`, `AWS_`) so they group naturally.
* **Pair with Rotation Rules** when values need to change on a schedule.
* **Audit regularly**—remove unused keys to keep prompts tidy.
