1. Add environment variables

- Log into the Platform UI.
- Select your integration.
- In the Build section in the left sidebar, click Advanced . There you can add your environment variables including a key and a value for each.
- Click Add to include additional environment variables, or click the
x
icon to remove variables if needed. - Once you’ve completed adding a key and value, click Save.
2. Reference environment variables

Use environment variables in Zapier's API call forms or in custom code
YOUR_KEY
with your actual key: {{process.env.YOUR_KEY}}
Zapier will then replace that variable with the value for that key from your Advanced settings and will use the correct value every time if you change it in the future. You can also reference environment variables in custom code if you switch your API call to code mode.
3. Change environment variables

You can change environment variable values, but not the original keys
- Log into the Platform UI.
- Select your integration.
- In the Build section in the left sidebar, click Advanced.
- Edit the text in the Values column with the new variable values. You cannot edit the Key. If you need to change a key and its value, first delete the old key, then add a new one instead.
4. Use environment variables for staging and production versions
We strongly recommend against the use of an independent integration for staging purposes. By utilising version control and environment variables instead, the deployment, integration and user management processes (eg. migration) will be significantly improved for your integration. It also helps Developer Support establish exactly what you’re working on and identifying relevant logs. It is conventional to reserve one version for testing/staging and one version for production, setting the applicable environment variables under Advanced in each. If you want to be able to work with both environments in development in one version, one approach is the following:- Set environment variables for both domains you want to call
- Set another environment variable for the domain you want to work with. For example,
key: ENVFLAG / value: staging

- Throughout the app, in Code Mode, check the value of the latter variable and conditionally reference the corresponding domain environment variable.
5. Allow users to select an environment
Certain apps need to allow users to select the domain during authentication. To do so, create an input field in the authentication form, allowing the user to pick which domain they want their connection to interact with.

{{bundle.authData.env_url}}
throughout the integration to conditionally call the corresponding domain.
Video Tutorial
You can refer to this video on using environment variables:Need help? Tell us about your problem and we’ll connect you with the right resource or contact support.