# Set variable

See [Chat Variables](https://documentation.proto.cx/docs/developer-documentation/chat-variables) for details on how variables operate within a chat.

The Set variable action creates or modifies a variable, which can be useful to other subsequent actions referencing them.

***

Add a **Set variable** action to the workflow and configure:

* **Variable name** — the name of a new or existing variable, including default [system variables](https://documentation.proto.cx/docs/developer-documentation/chat-variables#variables).
* [**Chat script**](https://documentation.proto.cx/docs/developer-documentation/chat-scripts) — the Python expression setting the variable's value.

Press **Save** to confirm edits.
