Type "text"

If you are writing a function that requires API Keys to connect to a third-party service such as Stripe or SendGrid, you can use environment variables of type text in your implementation. Then our platform will ask consumers to enter their value during installation.

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

Example of a type "text" environment variable definition

"env": [
    {
        "name": "SENDGRID_API_KEY",
        "description": "The API key to authenticate access to SendGrid services.",
        "required": true,
        "type": "text"
    }
]

Example of how to consume the value of the environment variable within the function implementation

const myFunction = () => {
    const senderEmail = process.env.SENDGRID_API_KEY;
    ...
};

module.exports = myFunction;

Properties of the type

Last updated