# Type Conversion

**Introduction**&#x20;

The "Type Conversion (Cast)" step in FlexyBot is a versatile tool used to convert a variable from one data type to another. This process, known in software terms as 'casting', is crucial for ensuring compatibility and proper functioning of variables within various steps of an automation.

**Configuration**

1. **Variable**: Select the variable that you intend to convert. This is a required field.
2. **Type**: Choose the target data type for the conversion. Ensure that the conversion is feasible and the selected type is compatible with the original data. This field is required.
3. **Failure**: Decide the course of action if the conversion fails. The options are:
   * **Throw Exception**: The step will throw an exception, indicating a failure in the conversion process.
   * **Stop Current Path Without Throwing Exception**: The automation path will stop, but no exception will be thrown.
   * **Successfully Return Null Value**: The step will return a null value, indicating the conversion was not successful but allowing the automation to continue. This is the default setting.

**Outputs**

* **Result**: The output of this step is the converted variable, now in the new specified data type. If the conversion is unsuccessful, the output handling is based on the selected failure action. The output is nullable if the failure action is set to "Successfully Return Null Value."

**Usage**

* Should be used only where required type is not available by other means.&#x20;


---

# Agent Instructions: 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:

```
GET https://docs.flexy.bot/modules/scripting/steps/type-conversion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
