# Variables Node

The **Variables** node allows you to define, store, and reuse values throughout your Workflow.\
It works like a **temporary memory** where you can save data from one step and use it later in another.

***

### 🛠️ How It Works

* You **map a variable name** (e.g., `productSKU`, `userEmail`, `city`).
* You **assign a value** to that variable. The value can come from:
  * Static text (you write it directly).
  * A **reference** to data produced by another node in the Workflow.
  * AI-generated content (if you enable **Use AI**).
* Once saved, the variable can be used in any following node.

***

### ⚙️ Configuration Options

* **Mapping name** → the variable’s key (e.g., `customerName`).
* **Value** →
  * Literal value (e.g., `"São Paulo"`).
  * Workflow reference (e.g., `@workflow.request.userInput`).
  * AI-generated (if you select **Use AI**).
* **Multiple variables** → you can add as many mappings as needed.

***

### 📌 Example Use Cases

* **Dynamic API Calls**\
  Save the user’s city into a variable `city` and use it in an HTTP Request node to fetch the weather:\
  `GET /weather?city=@workflow.variables.city`
* **Storing User Input**\
  Capture `name` and `email` once, then reuse them across different steps (e.g., CRM API, confirmation message).
* **AI Processing**\
  Enable **Use AI** to automatically transform or enrich the data before saving it (e.g., normalizing product names).

***

⚡ **Tip:** Variables make your Workflow **modular and reusable**, avoiding repeated inputs and allowing complex logic.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zaia.app/workflows/workflow-nodes/variables-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
