> For the complete documentation index, see [llms.txt](https://threadly.gitbook.io/threadly/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://threadly.gitbook.io/threadly/settings/workspace-variables.md).

# Workspace Variables

Create custom Workspace Variables with fallback values, set different values per channel or per person, and insert them into any message with {{variable\_name}}.

Workspace Variables are custom placeholders you define once and use in any Threadly message or workflow. When a message sends, Threadly replaces each placeholder with the right value for that channel or person, or with the fallback.

**Example:** create `{{account_manager}}` with a fallback of `your account team`. In `#customer-acme` it sends as *Sarah*, and anywhere without a value it sends as *your account team*.

***

## Why use Workspace Variables?

* **Personalization at scale:** one message, the right details for every channel
* **Consistency:** the same value appears correctly everywhere, with no retyping
* **Safe defaults:** a fallback value covers any channel or person without one
* **Team-wide reuse:** everyone in the workspace can use them

***

## Adding a variable

1. In Threadly, go to **Settings → Workspace Variables**. You can also click **Add New Variable** in the **Message Variables** window of the message editor.
2. Enter the **internal name** you'll use in messages, for example `support_email`.
3. Add a **description** so your team knows what it's for.
4. Enter a **fallback value**, used whenever a channel or person has no value of their own.
5. Choose where it's available: **Channel Message** or **Direct Messages**.
6. Click **Create Variable**.

***

## Setting values per channel

Values for each channel are set from your Segments:

1. Open a Segment (**Segments → View Segment**).
2. Next to a channel, click **Add Custom Variable**.
3. Enter a value for each variable and save. Leave one blank to use its fallback.

The value belongs to the channel, so it's used whenever you message that channel with Threadly.

***

## Values per person, from forms

When a form has **Save form data to profile** turned on, each person's answers are stored on their profile. On the **Workspace Variables** screen, pick a form and click **Create Variable** next to a field to use it in **direct messages**, for example `{{company_size}}`.

***

## Using variables in messages

Type the variable name in double curly braces:

```
Hi {{user}},

Your account manager, {{account_manager}}, will reach out about your renewal on {{renewal_date}}.

Questions? Reach us at {{support_email}}.
```

***

## Variable types compared

| Type                     | Source                                                      | Example                                    |
| ------------------------ | ----------------------------------------------------------- | ------------------------------------------ |
| **Workspace Variables**  | Created by your team in Settings                            | `{{account_manager}}`, `{{support_email}}` |
| **Built-in Variables**   | Provided by Threadly automatically                          | `{{user}}`, `{{channel}}`, `{{sender}}`    |
| **Form Field Variables** | Saved form answers (DMs) or the triggering form (workflows) | `{{priority}}`, `{{comments}}`             |
| **Webhook Variables**    | Zapier and Inbound Webhook payloads (workflows)             | `{{webhook.account_name}}`                 |

***

## See also

* [Leveraging Message Variables](/threadly/sending-messages/how-to-send-a-message-with-threadly/leveraging-message-variables.md)
* [Workflow Steps](/threadly/workflows/workflow-steps.md)
