> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appmixer.com/connector-configuration/utils/controls/setvariable.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
