# Variables

Variables allow you to store information that can be used throughout a flow.

For example, variables can be used to store information from the the page (e.g. [Get Element Text](/reference/browserflow-commands/extract-data/get-element-text.md)) and pass it into other commands.

### Naming

All Browserflow variables start with the prefix `$`, as in `$selector`. This naming convention allows Browserflow to differentiate between variables and normal text.&#x20;

For example, running [Type Text](/reference/browserflow-commands/interact-with-page/type-text.md) with the message `Hi $name` will cause Browserflow to replace `$name` with the value for the variable and leave the "Hi" portion intact.

#### Caveats

Due to this naming convention, extra processing is required if you want to append text directly to a variable.

For example, suppose you have a variable named `$time` that holds a value like `9:30`. If you wanted to show an alert with the message `The time is 9:30AM`, you may try setting the message field to `The time is $timeAM`. However, this wouldn't work because Browserflow would look for a variable named `$timeAM` rather than append "AM" to a variable named `$time`.

In order to get the formatted text, create a new variable using [Run Script](/reference/browserflow-commands/utilities/run-script.md). In this case, you can run it with the code `const $formattedTime = $time + "AM";` and set the alert message to `The time is $formattedTime`.


---

# 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.browserflow.app/guides/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.
