A variable is a named value your workflows read instead of having it typed into a step — an API address, a channel, a rate. Each one has a value for Development and one for Production, so the same workflow uses your sandbox while you test and the real service once it is live, without a step being edited.

Who can do this

  • Workspace role: Admin adds and changes global variables. Editors and viewers can open the page and see every value, with the note "Only workspace admins change global variables. You can see every value here, and read them in your workflows."
  • Plan: Starter and above. On Free the page is read-only: "Environments and variables are on Starter and above. You are on Free, so this page is read-only." The owner sees See plans; anyone else is told to ask the company's owner.

Steps

  1. Select your avatar at the top right, then Settings.
  2. Under Workspace, select Variables.
  3. Select + Add variable. A panel opens from the right: New variable — "Global · every workflow in Consulace can read it".
  4. In Name, type the name in lower_snake_case — letters, numbers and _, starting with a letter. For example api_base_url.
  5. Under Type, choose:
    • Text — "A value your workflows read in any expression field."
    • Connection — "A connection your steps use, chosen per environment. Credentials stay in Connections — a variable only points at one." Then, in Provider, choose the service, for example HubSpot.
  6. In Description (optional), say what it is for. It is "Shown to anyone picking this variable in a field."
  7. Under Development, type the value used by tests — or tick Same as Production to use the Production value.
    • For a Connection variable, choose one of this workspace's connections to that service. + Add a connection takes you to Connections and brings you back.
  8. Under Production, type the value used by live runs — or choose the connection.
  9. Select Save variable.

The panel closes and the message api_base_url saved says "Workflows read the new value on their next run." The variable is in the list with its two values, Used by ("None yet"), and Updated ("Just now by Asha Raghunathan").

Reading a variable in a workflow

  • Type {{ $vars.api_base_url }} in any field of a step. It reads the value for the environment the run is in.
  • Numbers and true/false are read as their type, so 18 is a number and true is a yes/no.
  • {{ $env }} gives the environment a run is in — development or production.
  • A Connection variable appears in a step's connection list. Pick it, and the environment decides which connection is used.
  • A workflow can also have variables of its own, from Variables in the designer's ⋯ menu. A workflow's own variable wins over a global one with the same name, for that workflow.

What happens next

  • Which environment a run uses: test runs use Development unless you choose Production in the designer (your choice is remembered for each workflow). Schedules, webhooks and forms always run in Production.
  • A change takes effect on each workflow's next run, the live version included. There is no need to publish again.
  • Everyone in the workspace can see every value. Nothing here is secret.

Good to know

  • Never put a password or API key in a variable. They belong in a connection, where nobody can see them again.
  • A workspace can have up to 100 global variables, and each workflow up to 50 of its own.
  • A name can be up to 64 characters, a description up to 300, and a value up to 10 KB.
  • Above the list, All, Development and Production choose which values the table shows. Search variables finds by name, description or value.
  • In the All view, a Production value that equals the Development one shows as Same in both; a Development value set to follow Production shows Uses Production.
  • If the company's plan ends, workflows keep running on their Production values and the page says "Your plan ended — Your workflows keep running on Production values. Upgrade to change variables or to test in Development."

If something goes wrong

What you see Why What to do
Use lower_snake_case — letters, numbers and _, starting with a letter. The name has capitals, spaces or other characters. Rename it, for example api_base_url.
api_base_url is already a global variable. Pick another name, or edit that one. The name is taken. Choose another name, or edit the existing variable.
A workspace can have 100 global variables, and this one has 100. The workspace is at the limit. Delete a variable you no longer use.
Choose which service it connects to. A Connection variable has no Provider. Choose the service.
Choose one of this workspace's connections to that service. The chosen connection is not this workspace's, or not for that service. Choose from the list, or add the connection first.
A value can be up to 10 KB. The value is too long. Shorten it.
Environments and variables are on Starter and above. The company is on Free. The owner can change the plan on Plan and billing.
In a run: api_base_url has no Development value. Add one in Settings › Variables, or tick Same as Production. The test ran in Development and the variable has no value there. Add a Development value, or tick Same as Production.
In a run: api_base_url has no Production value. Add one in Settings › Variables. A live run needed a Production value. Add the Production value.
In a run: api_base_url is not a variable in this workspace. Add it in Settings › Variables, or change the step. The step reads a variable that does not exist. Add the variable, or correct the step.