---
title: RANDOM
url: https://www.tines.com/docs/formulas/functions/random/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# RANDOM

*[View on tines.com](https://www.tines.com/docs/formulas/functions/random/)*

Returns a random number in the range specified.

**Categories:** Numbers

## Syntax

```
RANDOM(min, max)
```

## Examples

### Example 1: Returns an random number between 1 and 10:

Input:

```json
{
  "my_action": {
    "message": 10
  }
}
```

Formula:

```
RANDOM(1, my_action.message)
```

Output:

```json
7
```

## Sample actions

```json
{
  "standardLibVersion": "14",
  "actionRuntimeVersion": "3",
  "agents": [
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "message": 10
        }
      },
      "position": {
        "x": 1860,
        "y": 4140
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "RANDOM",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "random": "=RANDOM(1, my_action.message)"
        }
      },
      "position": {
        "x": 1860,
        "y": 4245
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 1
    }
  ],
  "diagramNotes": []
}
```
