> 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-text.md).

# Random text

Random text is the action of automatically generating a random string of characters (including letters and numbers) of an optional length, and then storing it in an output variable (Output variable).

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

#### Configuration parameters:

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

#### Real-world example: Generate a random password for automatic account registration

Suppose you are writing a script to automatically register multiple accounts 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 store it in 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 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-text.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.
