# The If Activity

> The [If](https://docs.uipath.com/activities/docs/if) activity contains a statement and two conditions. The first condition (the activity in the **Then** section) is executed if the statement is true, while the second one (the activity in the optional **Else** section) is executed if the statement is false.

The [If](https://docs.uipath.com/activities/docs/if) activity contains a statement and two conditions. The first condition (the activity in the **Then** section) is executed if the statement is true, while the second one (the activity in the optional **Else** section) is executed if the statement is false.

**If** activities can be useful to make decisions based on the value of variables.
:::note
The **If** activity is almost identical to the [Flow Decision](https://docs.uipath.com/activities/docs/flow-decision) one. However, the latter can only be used in flowcharts.
:::
