Type "email"

If you are writing a function that requires enter emails, you can use environment variables of type email in your implementation. Then our platform will ask consumers to enter their value during installation.

The type email variables allow consumers of a function to enter any email values. It is displayed in the installation UI form as an input email element (see image below).

Example of a type "email" environment variable definition

"env": [
    {
        "name": "SENDGRID_SENDER_EMAIL",
        "description": "Email corresponding to SendGrid sender correctly verified.",
        "required": true,
        "type": "email",
        "default": "[email protected]"
    }
]

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

Last updated