Docs
Settings

Environment Variables

Store API keys and other secrets once, encrypted, and reference them from your steps as {{env.NAME}}.

Environment Variables

Environment variables hold the secrets your Flows and Agents need to call outside services: an API key for your CRM, a bearer token for an internal service, a signing secret for a webhook. You save each one once, in Settings → Environment, and reference it from a step as {{env.NAME}}. The value is encrypted at rest, never shown again after you save it, and only ever decrypted for the moment a step sends its request.

Before this, a token pasted into a Webhook step lived in the Flow itself, in plain text, where anyone who could open the Flow could read it. A variable keeps the secret out of the Flow, out of its version history, and out of run logs.

Not provider keys

Keys for OpenAI, Anthropic and Google go on Settings → Integrations, where FormWise uses them to run models. See API Keys. Environment variables are for everything else your steps call.

Where you can use them

A {{env.NAME}} reference works in the fields that send a request to another service:

  • Webhook step - the access token and the value of any header.
  • API Request step - header values.
  • MCP servers - the access token and custom header values, both on a server you add to Connectors and on one added to a single Agent node. The Discover Tools check uses the variable too.

A reference only resolves when it is written in the step's own settings. The same text typed into a prompt, a form answer or a model reply is sent exactly as typed, so nobody can pull a secret out by asking an Agent to repeat {{env.NAME}}.

Adding a variable

  1. Open Settings from the workspace menu at the top of the sidebar, then Environment.
  2. Click Add variable.
  3. Give it a Name. Names use capital letters, numbers and underscores, start with a letter, and are at most 64 characters: HUBSPOT_API_KEY, INTERNAL_API_TOKEN.
  4. Paste the Value. It can be up to 8,192 characters. Once saved it is never displayed again; the list shows only its last four characters to owners and admins, so they can tell two keys apart.
  5. Optionally add a Description of what it is for and where it came from. Everyone on the team can read descriptions, so keep the secret out of it.
  6. Click Save.

[Screenshot: The Environment page with a few variables listed by name, each with a description and a masked value.]

The variable is ready at once. Type {{env.HUBSPOT_API_KEY}} into a Webhook step's token field and the next run uses it. Nothing needs to be republished.

Saving a secret from inside a step

You do not have to visit Settings first. Under every field that takes a secret (a Webhook token, a header value, an MCP access token) the builder shows an Environment variables helper:

  • Use variable lists the variables your workspace already has. Pick one and the field is filled with its {{env.NAME}} reference.
  • Save as variable appears when you have pasted a plain value into the field. It suggests a name from the field, saves the value as a new variable, and swaps the field over to the reference in one step.

A field holding a plain secret is marked with the warning This value is stored as plain text. Anyone who can open this can read it. Click Save as variable to fix it.

Changing and removing

  • Replace a value by opening the variable and pasting the new one. Leave the value empty to keep the current one while you edit the description. Every step that references the name picks up the new value on its next run.
  • Delete a variable from its row menu. Steps that reference it stop working until a variable with that name is added again, so check where it is used first. Deleting cannot be undone.

Who can do what

RoleCan
ViewerSee variable names and descriptions
MemberAlso create variables, replace values, and use them in steps
Admin, OwnerAlso see the last four characters of each value and delete variables

Nobody, including owners, can read a saved value back. If a value is lost, set it again from the service that issued it.

What happens at run time

  • The value is decrypted only while the step sends its request, and is never written to the run, the conversation or History. Run logs and previews show {{env.NAME}} in its place.
  • If a service echoes the secret back (some APIs return the request they received, or put the URL in an error message), FormWise scrubs it from the step's output and logs before anything is saved.
  • A run uses the variables of the workspace that owns the Flow. Someone running your Flow from another workspace, or through a Suite or Portal, never brings their own variables and never sees yours.
  • A reference to a variable that does not exist fails the step with a message naming it: Environment variable HUBSPOT_API_KEY is not set in this workspace. Add it in Settings, Environment.

Limits

Variables per workspace200
NameCapital letters, numbers and underscores, starting with a letter, up to 64 characters
ValueUp to 8,192 characters, cannot be empty
DescriptionUp to 500 characters

Troubleshooting

  • "is not set in this workspace." The step references a name that does not exist here. Check the spelling, including case: {{env.Hubspot_Key}} and {{env.HUBSPOT_KEY}} are different names. If the Flow was duplicated into another workspace, add the variable there too.
  • "could not be read. Set its value again." The stored value can no longer be decrypted. Open the variable and paste the value again.
  • The reference is sent as literal text. References only resolve in a step's own settings fields. A {{env.NAME}} inside a prompt, a Set State value or a form answer is passed through as written.
  • Still seeing a plain token in a step. Variables do not change existing Flows on their own. Open the step, click Save as variable under the field, and the plain value is moved into a variable and replaced with its reference.

Next steps

On this page