> 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-guide/text-and-number/random-text.md).

# Random text

Random text is an action used to automatically generate a random string of characters (including letters and numbers) with an optional length, and then save it to an output variable (Output variable).

This action is often used to create new passwords when registering accounts, generate identification codes, or create unique text content to avoid being flagged by spam detection systems.

🎥 Watch the tutorial video: [Here](https://youtu.be/nlEQsaxawt4).

#### Configuration parameters:

* Text Length: The length (number of characters) of the random text string you want to generate.

#### Practical example: Generate a random password for automatic account registration

Suppose you are writing a script for bulk account registration on a website and need to fill in a random password for each account to ensure security:

* Configuration method: You call the Random text action, set the Text Length field to `12` (to create a string of 12 characters), and set the *Output variable* field to `$randomPassword`.
* Result: When you reach this step, the system will automatically generate a random string (for example: `"a7K39pXq2wLm"`) and save it to the variable `$randomPassword`. In the subsequent steps, you just need to call the Key press action to input this `$randomPassword` variable into the password field in the browser to complete the registration.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
