Environment Variables in Scout

Securely manage configuration with environment variables

This is an enterprise feature and must be enabled in order to work. Otherwise, the variables will be empty.

Environment variables are a way to store configuration information that can be accessed by your workflow’s blocks. They are useful for storing sensitive information, such as API keys, that you don’t want to hardcode into your app, or for storing variables that you want to use across multiple apps.

Setting Environment Variables

To set environment variables in the Scout dashboard, navigate to the environment variables tab on the settings page.

Accessing Environment Variables

After you have added an environment variable to your account, you can access it in your workflow by using the env object in your Jinja templates.

For example, if you have an environment variable called API_KEY, you can access it in your workflow like this:

{{ env.API_KEY }}

Refer to Workflow Logic & State > State Management for guidance on using these dynamic variables in workflows.

Using Your Own AI API Keys

You can also set your API keys for external AI API providers, like OpenAI, Fireworks, etc. Using your own OpenAI API key, for example, will charge usage to your OpenAI account.