Variables

Learn how to use variables in Flowise


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.

Runtime

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

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:

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

{
    "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:

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

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:

In Prompt Template:

Resources

Last updated