> For the complete documentation index, see [llms.txt](https://flapjax.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flapjax.gitbook.io/docs/automations/actions/utility.md).

# Utility

{% hint style="info" %}
The per-action sections below cover each action's fields: which inputs are required, which are optional, the validation rules, and what blocks saving.
{% endhint %}

#### Formula

Evaluate a mathematical expression.

* **Formula**, an expression built from numbers, the operators +, -, \* and /, and variables. Numeric and boolean variables insert. Others do not.

Empty and null variable values count as 0. Boolean values count as 1 for true and 0 for false. The result becomes a variable for later actions.

#### Generate Random Number

Produce a random integer within a range.

* **Minimum**, the lowest possible value. It supports variables.
* **Maximum**, the highest possible value. It supports variables.

#### Generate UUID

Create a universally unique identifier. It needs no configuration, and the generated UUID becomes a variable for later actions.

#### Split Text

Split a text string into parts using a delimiter.

* **Input text**, the text to split. It supports variables.
* **Delimiter**, the character or string you split on. It supports variables.

The first and second results become variables for later actions.

#### Adjust Time

Add or subtract time from a date.

* **Date/time**, the starting datetime. Pick a system shortcut such as now, yesterday or tomorrow, or use a variable.
* **Time unit**, one of seconds, minutes, hours, days, weeks, months or years.
* **Offset**, the number of units. A positive number adds, a negative one subtracts. It supports variables.

#### Compare Dates

Compare two dates and output the relationship and difference.

* **First date** and **Second date**, each a system shortcut or a variable.

Outputs cover whether the first date falls before, after or on the second, plus the difference in every time unit: years, months, days, hours and the rest.

#### Parse Date

Extract date components from a date value.

* **Date value**, the date to parse. It supports variables.

#### Custom Action

Call one of your workspace's [custom actions](/docs/settings/workspace/custom-actions.md) as a step in the automation. A custom action is an outbound HTTP request to an external API. Define it first in **Settings → Custom Actions** and it appears in the action picker.

* **Choose the action.** The builder's action list groups custom actions under **Custom Actions**. Pick the one you want and it becomes this step, with the endpoint pre-filled from the action's definition.
* **Request body.** The fields sent to the API come from the custom action's **outgoing** attributes. Fill each one with a value, or with a variable from an earlier step. Array-type attributes stay out of the request body.

**Using the response.** Flapjax parses the API's response against the custom action's **incoming** attributes. Each one reaches later steps as `actions.<id>.<key>`, typed to that attribute's data type. An array response can feed a following Loop action.

Those response properties come entirely from the custom action's incoming attribute schema, so the builder asks you to configure nothing here.

{% hint style="info" %}
Define and manage custom actions in [Settings → Custom Actions](/docs/settings/workspace/custom-actions.md), covering the endpoint, method, headers and request and response schemas. That page also covers required fields, validation and response typing in full.
{% endhint %}
