> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-en/action-guides/text-and-number/random-number.md).

# Random number

Random number is the action of generating a random integer within a range from a minimum value to a maximum value set, then storing the result in an output variable.

This action is often used to create simulated data (age, number of friends to befriend), randomly select a line of data, or create a flexible random wait time according to your own logic.

#### Configuration parameters:

* Min: The smallest number that can be obtained.
* Max: The largest number that can be obtained.
* Output variable: The name of the variable that stores the generated random number.

#### Real-world example: Randomly select the number of posts to interact with

When managing a social media account, to avoid having each account scroll through the same number of posts, which may raise suspicion from the system, you should have each account interact with a random number of posts.

* Configuration method: You call the Random number action, set Min to `3`, Max to `7`, and the *Output variable* field to `$randomPosts`.
* Result: When the flow reaches this step, the system will randomly draw a number between 3 and 7 (For example: Profile 1 draws the number `4`, Profile 2 draws the number `6`). You just need to pass this `$randomPosts` variable into the End field of the subsequent For loop, and each account will automatically scroll and interact according to the distinct number it drew.

<figure><img src="/files/ZWtufIoNQTV7Pv07VqoS" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.gpmautomate.com/automate-en/action-guides/text-and-number/random-number.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
