Secrets and Environment Variables
Secrets and environment variables are named values you save once and reference from any of your JavaScript functions. They keep API keys, credentials, and shared settings out of your code: the code references the name, and ProcessPlan supplies the value at runtime.
They are managed under Administration > Integrations > Environment Variables, on the Secrets / Environment Variables page. The list shows each entry’s Variable Name, Value, Description, Modified By, Modified Date, and Last Used.
Create a secret or environment variable
Section titled “Create a secret or environment variable”-
Click the New Secret icon at the top of the list
-
Enter a Secret / Environment Variable Name. Letters, numbers, and underscores only, for example
STRIPE_API_KEY. Names are stored in uppercase -
Enter the Value
-
For credentials and API keys, check Hide Forever (Secret) - see below
-
Optionally add a Description for Autonomous AI Agent Mode, a detailed note about the variable’s purpose so AI agents understand what it’s for
Secrets are hidden forever
Section titled “Secrets are hidden forever”When Hide Forever (Secret) is checked, the value is treated as a secret from then on:
-
Anywhere the value is displayed, it appears masked, showing only its last four characters
-
You can overwrite a hidden value with a new one at any time, but a hidden value can never be made visible again
Use a variable in your code
Section titled “Use a variable in your code”Reference the variable in any JavaScript function as helpers.env.YOUR_VARIABLE_NAME:
async function execute(event, helpers) { const response = await helpers.http.get('https://api.example.com/v1/orders', { headers: { Authorization: `Bearer ${helpers.env.STRIPE_API_KEY}` }, }); return response;}Variables referenced in your code are detected automatically and injected when the function runs; there is nothing to configure on the function itself. The Last Used column shows when a variable was last read by a running function.