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