# Variables

***

Flowise allow users to create variables that can be used in the nodes. Variables can be Static or Runtime.

### Static

Static variable will be saved with the value specified, and retrieved as it is.

<figure><img src="/files/KtW8JJAzCMyzolCqhBZQ" alt="" width="542"><figcaption></figcaption></figure>

### Runtime

Value of the variable will be fetched from **.env** file using `process.env`

<figure><img src="/files/PzgOnFrkvAH6xBaCJ27q" alt="" width="537"><figcaption></figcaption></figure>

### Override or setting variable through API

In order to override variable value, user must explicitly enable it from the top right button:

**Settings** -> **Configuration** -> **Security** tab:

<figure><img src="/files/GrPorR4buq1s42Io7s3Q" alt=""><figcaption></figcaption></figure>

If there is an existing variable created, variable value provided in the API will override the existing value.

```json
{
    "question": "hello",
    "overrideConfig": {
        "vars": {
            "var": "some-override-value"
        }
    }
}
```

### Using Variables

Variables can be used by the nodes in Flowise. For instance, a variable named **`character`** is created:

<figure><img src="/files/HfDo7afmqgdGwUSqVXGd" alt=""><figcaption></figcaption></figure>

We can then use this variable as **`$vars.<variable-name>`** in the Function of the following nodes:

* [Custom Tool](/integrations/langchain/tools/custom-tool.md)
* [Custom Function](/integrations/utilities/custom-js-function.md)
* [Custom Loader](/integrations/langchain/document-loaders/custom-document-loader.md)
* [If Else](/integrations/utilities/if-else.md)
* Custom MCP

<figure><img src="/files/oXJ5wE2mZOaAfswjRlsc" alt="" width="283"><figcaption></figcaption></figure>

Besides, user can also use the variable in text input of any node with the following format:

**`{{$vars.<variable-name>}}`**

For example, in Agent System Message:

<figure><img src="/files/FSSwKMKoflqkE0E2cpr4" alt="" width="508"><figcaption></figcaption></figure>

In Prompt Template:

<figure><img src="/files/FMhqdNhsYISR6TTplzCk" alt=""><figcaption></figcaption></figure>

## Resources

* [Pass Variables to Function](/integrations/langchain/tools/custom-tool.md#pass-variables-to-function)


---

# 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.flowiseai.com/using-flowise/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.
