Environment Variables

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 environement variables in the Scout dashboard, navigate to the the environment variables tab on the settings page.

Accessing Environment Variables

After you have added an environment variable to you 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.