Environment Variables
Environment variables provide a secure way to manage configuration values and secrets across your workflows, including API keys and other sensitive data that your workflows need to access. They keep secrets out of your workflow definitions while making them available during execution.
Variable Types
Environment variables in TradingGoose work at two levels:
- Personal Environment Variables: Private to your account, only you can see and use them
- Workspace Environment Variables: Shared across the entire workspace, available to all team members
Workspace environment variables take precedence over personal ones when there's a naming conflict.
Setting up Environment Variables
Open Environment from the workspace navigation. Choose the Workspace or Personal view in the header, then use its create button to add a variable in that scope.
Choosing a Scope
Create shared secrets in the Workspace view and account-specific secrets in Personal. The selected view determines the scope of new variables; there is no per-variable workspace-scope toggle.
Workspace Variables View
Workspace and personal variables appear in separate views, not a mixed list. Switch views to manage the other scope. Both scopes can be resolved during workflow execution, with workspace values taking precedence for duplicate names.
Using Variables in Workflows
To reference environment variables in your workflows, use the {{}} notation. When you type {{ in any input field, a dropdown will appear showing both your personal and workspace-level environment variables. Simply select the variable you want to use.
Variable Precedence
When you have both personal and workspace variables with the same name:
- Workspace variables take precedence over personal variables
- This prevents naming conflicts and ensures consistent behavior across team workflows
- If a workspace variable exists, the personal variable with the same name is ignored
Choose variable names carefully to avoid unintended overrides. Consider prefixing personal variables with your initials or workspace variables with the project name.
Security Best Practices
For Sensitive Data
- Store API keys, tokens, and passwords as environment variables instead of hardcoding them
- Use workspace variables for shared resources that multiple team members need
- Keep personal credentials in personal variables
Variable Naming
- Use descriptive names:
DATABASE_URLinstead ofDB - Follow consistent naming conventions across your team
- Consider prefixes to avoid conflicts:
PROD_API_KEY,DEV_API_KEY
Access Control
- Workspace environment variables respect workspace permissions
- Only users with write access or higher can create/modify workspace variables
- Personal variables are always private to the individual user