> For the complete documentation index, see [llms.txt](https://docs.violetlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.violetlabs.com/features/scripts/violet-variables.md).

# Violet Variables

### Using Violet Variables

To use Violet Variables, you must have other data in the system that you would like to use in a script, either through creating integrations or by creating parameters. In my example, I have created a Duro Integration that is pulling in a variety of components.

To create a Violet Variable use the reserved <mark style="background-color:purple;">**Violet\["variable\_name"]**</mark> syntax within your script, where the variable\_name can be replaced with the name of your choice. Variable names must be unique within each script and can only contain letters and numbers. You can use an underscore to separate words.

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

After creating a variable, you'll be prompted to link the variable to the data of your choice. Each variable you have created will show up in this sidebar, with a link symbol next to it. Clicking on the link will open a popup that lets you search through the data in the system. Select the property you would like to link to that Violet Variable.

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

The selected property value will display next to the link symbol. Ensure it is correct, and link any additional variables you may have. Hit save to save the links and close the sidebar.

<figure><img src="/files/1NQvGoAzfa8GyhJlLBmM" alt="" width="375"><figcaption></figcaption></figure>

Click <mark style="background-color:purple;">**Run Script**</mark>**.** Your output will accurately reflect the values of each Violet Variable at the time of the run.

<figure><img src="/files/olHfajbvAUKhZDkogYmS" 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.violetlabs.com/features/scripts/violet-variables.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.
