> For the complete documentation index, see [llms.txt](https://docs.appmixer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appmixer.com/connector-configuration/utils/controls/setvariable.md).

# Set Variable

### Overview

The **SetVariable Component** assigns variables dynamically based on input type and value. It allows storing values in various formats such as text, numbers, dates, booleans, and files.

### Usage

#### Input Ports

| Port | Description                                              |
| ---- | -------------------------------------------------------- |
| `in` | Accepts an object containing variables and their values. |

#### Output Ports

| Port  | Description                                |
| ----- | ------------------------------------------ |
| `out` | Emits the assigned variables as an object. |

#### Supported Variable Types

* **Text** (`text`) – Stores a string value.
* **Textarea** (`textarea`) – Stores a longer text value.
* **Number** (`number`) – Stores a numeric value.
* **Date-Time** (`date-time`) – Stores a date and time.
* **Boolean** (`toggle`) – Stores a true/false value.
* **File** (`filepicker`) – Stores a selected file reference.

### Instructions

1. **Provide Variables**
   * Send an object containing variable names, types, and values to the `in` port.
2. **Processing Variables**
   * The component assigns the variables dynamically based on their types.
3. **Retrieve Output**
   * The processed variables are sent as an object through the `out` port.

### Notes

* **Flexible Variable Storage**: Supports multiple data types for dynamic variable assignments.
* **Useful for Workflow Automation**: Allows temporary storage of values for later processing.
* **Outputs in Key-Value Format**: The output is structured as an object containing assigned values.


---

# 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.appmixer.com/connector-configuration/utils/controls/setvariable.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.
