# Variables

Keep a value once on the workflow, and use it in any step.

A [variable](https://docs.gorunner.io/glossary#variable) holds a value many steps need, such as a base address, a limit or a sender’s name. Change it in one place.

## Add a variable

1. In the builder’s left rail, open **Variables**.
2. Press **Add variable**, then type a name and its value. It saves itself.
3. In any field, type `{{$vars.NAME}}`, with your variable’s name.

![Variables: two variables, one plain and one sensitive, and the lock that marks one sensitive.](https://docs.gorunner.io/img/build/vars-1-light.jpg)

A name uses letters, digits and `_`, doesn’t start with a digit, and has at most 128 characters.

## Plain or sensitive

Press the lock beside a variable to make it sensitive. Use that for a secret with no connection of its own, such as a key in an HTTP header.

| What differs | Plain | Sensitive |
| --- | --- | --- |
| Shown again after saving | ✓ Yes | — No |
| In run data | As it is | Replaced with `***` |
| On a live workflow, a change applies | When you publish | At once |
| Copied by Duplicate, export and templates | ✓ Yes | — No |

A sensitive value needs at least 6 characters, so hiding it can’t blank out unrelated text. Making a variable sensitive also removes its old value from earlier versions. Making it plain again empties it.

**What if there’s no lock?**

Your role may not change the workflow, or the installation has no encryption key set up. Then a variable can’t be made sensitive there.

## Variable or connection?

When the app has a [connection](https://docs.gorunner.io/build/connections), use it: it is tested, shows its state, and can be changed for every workflow at once. Use a sensitive variable for everything else.

## Check it worked

Press **Test**, select a step that uses the variable and open its **Input**. A plain value shows as it is. A sensitive one shows as `***`.

## For developers

[List variables](https://docs.gorunner.io/api/publish/get-workflow-variables) returns a sensitive variable’s name, never its value. [Replace variables](https://docs.gorunner.io/api/publish/replace-workflow-variables) takes the whole list; send `"keep": true` to keep a sensitive value you weren’t given.

## Related

- [Connections](https://docs.gorunner.io/build/connections): Sign-ins to apps, shared by the workspace · 4 min
- [Use data from earlier steps](https://docs.gorunner.io/build/use-data-from-earlier-steps): Expressions and the Data pane · 5 min
- [Expressions](https://docs.gorunner.io/build/expressions): Every path and function

Source: https://docs.gorunner.io/build/variables
