> 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/huong-dan-cac-action/text-and-number/random-text.md).

# Random text

Random text là hành động dùng để tự động tạo ra một chuỗi ký tự ngẫu nhiên (bao gồm chữ cái và chữ số) với độ dài tùy chọn, sau đó lưu vào một biến đầu ra (Output variable).

Hành động này thường được sử dụng để tạo mật khẩu mới khi đăng ký tài khoản, tạo mã số định danh, hoặc tạo các nội dung văn bản không trùng lặp để tránh bị hệ thống quét spam.

🎥 Xem thêm video hướng dẫn: [Tại đây](https://youtu.be/nlEQsaxawt4).

#### Tham số cấu hình:

* Text Length: Độ dài (số lượng ký tự) của chuỗi văn bản ngẫu nhiên mà bạn muốn tạo ra.

#### Ví dụ thực tế: Tạo mật khẩu ngẫu nhiên để đăng ký tài khoản tự động

Giả sử bạn đang viết một kịch bản tự động đăng ký tài khoản hàng loạt trên một website và cần điền một mật khẩu ngẫu nhiên cho mỗi tài khoản để đảm bảo tính bảo mật:

* Cách cấu hình: Bạn gọi hành động Random text, thiết lập ô Text Length là `12` (để tạo chuỗi dài 12 ký tự), và đặt ô *Output variable* là `$randomPassword`.
* Kết quả: Khi chạy đến bước này, hệ thống sẽ tự động sinh ra một chuỗi ngẫu nhiên (ví dụ: `"a7K39pXq2wLm"`) và lưu vào biến `$randomPassword`. Ở các bước tiếp theo, bạn chỉ cần gọi hành động Key press truyền biến `$randomPassword` này vào ô nhập mật khẩu trên trình duyệt để hoàn tất việc đăng ký.


---

# 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/huong-dan-cac-action/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.
