process.env.API_KEY
instead of the API key itself.
You can reference env vars and secrets in workflow code or in the object explorer when passing data to steps, and you can define them either globally for the entire workspace, or scope them to individual projects.
Scope | Description |
---|---|
Workspace | All environment variables are available to all workflows within the workspace. All workspace members can manage workspace-wide variables in the UI. |
Project | Environment variables defined within a project are only accessible to the workflows within that project. Only workspace members who have access to the project can manage project variables. |
Input field | Description |
---|---|
Key | Name of the variable — for example, CLIENT_ID |
Value | The value, which can contain any string with a max limit of 64KB |
Description | Optionally add a description of the variable. This is only visible in the UI, and is not accessible within a workflow. |
Secret | New variables default to secret. If configured as a secret, the value is never exposed in the UI and cannot be modified. |
undefined
.process.env
. This object contains environment variables as key-value pairs.
For example, let’s say you have an environment variable named API_KEY
. You can reference its value in Node.js using process.env.API_KEY
:
process.env
.
Referencing an environment variable that doesn’t exist returns the value undefined
in Node.js. For example, if you try to reference process.env.API_KEY
without first defining the API_KEY
environment variable in the UI, it will return the value undefined
.
console.log
— will include that value in the logs associated with the cell. Please keep this in mind and take care not to print the values of sensitive secrets.process.env
will always return undefined
when used outside of the defineComponent
export.{{process.env.YOUR_ENV_VAR}}
. You’ll see a list of your environment variables in the object explorer when selecting a variable to pass to a step.
{{process.env.YOUR_ENV_VAR}}
to securely reference the environment variable.64KB
.PIPEDREAM_
for internal use. You cannot create an environment variable that begins with that prefix.