# Variables

The **Variables** component lets you define and reuse named values — such as counters, strings, objects, or flags — across multiple steps in your flow. Use it to store intermediate data, configuration settings, or default values that several steps need to reference. Unlike flow step outputs that belong to a single step, variables persist across the entire flow execution and you can update them at any point.

<figure><img src="https://docs.fastn.ai/~gitbook/image?url=https%3A%2F%2F1255842839-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F3iSr2Tx8FvvuoLPncziH%252Fuploads%252FGYEiW1jB8bhZ8PqwkD6J%252Fimage.png%3Falt%3Dmedia%26token%3Da5377eb1-c0ba-465e-b417-ca99d41a3ed8&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=b7827b4b&#x26;sv=2" alt="Variables component showing defined string, integer, and boolean variable types"><figcaption></figcaption></figure>

#### **Use Case: Store and Reuse Values Across the Flow**

\
Use the **Variables** component to define and manage reusable values, such as counters, file paths, booleans, or JSON objects, that persist across different steps in your flow. Ideal for maintaining configuration data, controlling logic, or tracking state dynamically during execution.

```
Str filePath = "https://storage.fastn.ai/file.csv"  
Int retryCount = 2  
Boolean isSynced = False  
```

#### **How does it help?**

* Maintain consistent values across multiple flow actions
* Simplify logic handling with flags and counters
* Dynamically store and update configuration or temporary data


---

# 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.fastn.ai/flow-setup-essentials/designing-a-flow/variables.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.
