Using Team Variables
YepCode team variables allow you to define key-value pairs for use in process source code. These variables are versatile, serving purposes such as storing configuration parameters used across various processes or safeguarding sensitive information like passwords or API keys (using the secured flag).
It's important to note that YepCode also offers credentials, designed for configuring out-of-the-box integrations. However, team variables provide greater flexibility, enabling you to store configurations or create new custom integrations not yet supported by YepCode.
When you click on the New
icon, you can specify the variable name and value, and check whether it is secured.
To use these team variables in process source code, employ the following syntax:
- JavaScript
- Python
const apiKey = yepcode.env.KRAKEN_API_KEY;
api_key = yepcode.env.KRAKEN_API_KEY
Subsequently, apiKey
will contain the value defined in the team variable regardless of whether it was marked as secured or not. Exercise caution to avoid logging or transmitting it from the code.