> For the complete documentation index, see [llms.txt](https://docs.gallabox.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gallabox.com/bots/bot-utilities/set-variable.md).

# Set Variable

> **Who can use this Card?**
>
> * Gallabox Users having permission to either build and deploy bots or manage bots.
> * Available on all paid plans.

### Overview

Imagine **Variable** as a box, which can be named and you can store "things". In this scenario, "*things*" are values (numbers, texts, dates, etc...).

**Set Variable** is a powerful block that allows you to create, select format, and set a value to a variable.

To use the card, select it from utilities.

<figure><img src="/files/VBdFz8D6p2ws42U6I4qy" alt=""><figcaption><p>Set variable Card in Utilities</p></figcaption></figure>

{% hint style="info" %}
Learn more about the concept of a [variable](https://www.tynker.com/blog/how-to-teach-variables-to-kids/) from this article.
{% endhint %}

### Setting a Variable

You can select a variable that already exists or create a new one.

<figure><img src="/files/7MM2QOtRUdWasQLk5NTQ" alt=""><figcaption><p>Select a Variable</p></figcaption></figure>

{% hint style="info" %}
Variable name should start with alphabet; Cannot have special characters except underscore (\_).
{% endhint %}

Just type the name, select the format, and click on "create".

<figure><img src="/files/VZ6szsVIkw3NoMQe8XYt" alt=""><figcaption><p>Selecting the Format</p></figcaption></figure>

When it comes to selecting the format of the variable, you have 6 formats to choose from.

* Text
* Number
* Boolean
* Date
* Object
* Array

### Typing the Value

You can type the value you want to give to the variable. You can also make it depend on other variable values.

In the below screenshot, we have named the variable as **phone\_book** and made the value dependent on other variable as **recipient.phone**.

<figure><img src="/files/Bdn0kkvdzbASfTT8SOvD" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gallabox.com/bots/bot-utilities/set-variable.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
