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.
%20(1)%20(1)%20(1).png?alt=media)
Runtime​
Value of the variable will be fetched from .env file using process.env
%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1).png?alt=media)
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:
%20(1).png?alt=media)
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:
.png?alt=media)
We can then use this variable as $vars.<variable-name>
in the Function of the following nodes:
- Custom Tool
- Custom Function
- Custom Loader
- If Else
- Custom MCP
.png?alt=media)
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:
%20(1)%20(1)%20(2)%20(1).png?alt=media)
In Prompt Template:
.png?alt=media)