Type "boolean"
If your function implementation needs to make a boolean decision based on the use case, you can use environment variables of type boolean in your implementation, then our platform will ask consumers to enter their value during installation.
The type boolean variables allow the consumers of a function to select between true or false values. It is displayed in the installation UI form as a toggle element (see image below).

Example of a type "boolean" environment variable definition
"env": [
{
"name": "LIVE",
"description": "Indicate if the item should be published to the live site in Webflow.",
"type": "boolean",
"default": true
}
]
Example of how to consume the value of the environment variable within the function implementation
const myFunction = () => {
const live = process.env.LIVE
...
};
module.exports = myFunction;
Properties of the type
property
type
required
default
description
name
string
yes
-
The name of the environment variable. This should be unique for each variable.
description
string
no
-
The description of the environment variable.
default
bool
no
false
The default value for the variable.
Last updated
Was this helpful?