Type "url"
If you are writing a function that requires enter URLs, you can use environment variables of type url in your implementation. Then our platform will ask consumers to enter their value during installation.
The type url variables allow consumers of a function to enter any email values. It is displayed in the installation UI form as an input url element (see image below).

Example of a type "url" environment variable definition
"env": [
{
"name": "URL",
"description": "Url corresponding to the page direction where you want to navigate .",
"required": true,
"type": "url",
"default": "https://www.google.com/"
}
]
Example of how to consume the value of the environment variable within the function implementation
const myFunction = () => {
const scale = process.env.SENDGRID_SENDER_EMAIL;
...
};
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
string
no
-
The default value for the variable.
required
bool
no
false
Specifies that a variable must be filled out before submitting.
Last updated
Was this helpful?