> 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/mot-so-bien-mac-dinh.md).

# 📦Một số biến mặc định

Một số biến mặc định được dùng trong Automate

### Các biến hệ thống mặc định (System Variables)

Trong quá trình xây dựng kịch bản, GPM Automate tự động cung cấp sẵn một số biến hệ thống. Bạn có thể gọi các biến này ở bất kỳ hành động nào để lấy thông tin của Profile hoặc dữ liệu Excel đang xử lý mà không cần phải tự khởi tạo.

#### 1. Nhóm biến thông tin Profile

Các biến này giúp kịch bản nhận diện và xử lý dữ liệu theo từng Profile Browser đang vận hành:

* 🆔 `$profileId`: Trả về ID định danh duy nhất của profile đang mở.
* 🏷️ `$profileName`: Trả về tên hiển thị của profile đang mở.
* 🌐 `$profileProxy`: Trả về thông tin Proxy (IP) mà profile đang mở đang sử dụng.

#### 2. Nhóm biến vòng lặp

* 🔄 `$loopIndex`: Trả về chỉ số (thứ tự đếm) hiện tại của vòng lặp For. Biến này tự động tăng lên sau mỗi lượt lặp.

#### 3. Nhóm biến quản lý dữ liệu Excel (`$inputExcel`)

Khi kịch bản của bạn cấu hình sử dụng một file Excel đầu vào để đọc/ghi dữ liệu, hệ thống sẽ tự động kích hoạt các biến sau:

* 📂 `$inputExcel`: Đại diện cho chính file Excel đầu vào đang được liên kết trong kịch bản.
* 📍 `$inputExcelFileLocation`: Trả về đường dẫn (File Path) chính xác của file Excel đầu vào trên máy tính.
* 📊 `$inputExcelTotalRows`: Trả về tổng số dòng đang có dữ liệu bên trong file Excel đầu vào.
* 🔢 `$inputExcelCurrentRow`: Trả về số thứ tự của dòng hiện tại đang được truy xuất và xử lý trong quá trình đọc file Excel.

> 💡 Quy tắc chung về Biến: Trong GPM Automate, tất cả các biến (bao gồm biến hệ thống có sẵn và biến do bạn tự đặt tên khi làm kịch bản) đều bắt đầu bằng ký tự `$`


---

# 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/mot-so-bien-mac-dinh.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.
