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

# HƯỚNG DẪN CÁC ACTION

- [📦Một số biến mặc định](https://docs.gpmautomate.com/huong-dan-cac-action/mot-so-bien-mac-dinh.md): Một số biến mặc định được dùng trong Automate
- [🧱Các block](https://docs.gpmautomate.com/huong-dan-cac-action/cac-block.md)
- [Normal block](https://docs.gpmautomate.com/huong-dan-cac-action/cac-block/normal-block.md): Khối lệnh tuần tự (Normal block)
- [For](https://docs.gpmautomate.com/huong-dan-cac-action/cac-block/for.md): For là khối lệnh dùng để lặp đi lặp lại một nhóm hành động với số lần được xác định trước. Vòng lặp này sử dụng một biến đếm mặc định là $loopIndex để theo dõi tiến trình lặp.
- [While](https://docs.gpmautomate.com/huong-dan-cac-action/cac-block/while.md): While là khối lệnh dùng để lặp đi lặp lại một nhóm hành động liên tục cho đến khi một điều kiện (Condition) được thỏa mãn thì mới dừng lại.
- [If, Else if và Else](https://docs.gpmautomate.com/huong-dan-cac-action/cac-block/if-else-if-va-else.md)
- [Hướng dẫn viết Điều kiện](https://docs.gpmautomate.com/huong-dan-cac-action/cac-block/huong-dan-viet-dieu-kien.md): Khi sử dụng các khối điều hướng như If, Else if, hoặc While, bạn cần thiết lập một biểu thức điều kiện để hệ thống kiểm tra lúc chạy. Biểu thức này sẽ trả về kết quả Đúng (true) hoặc Sai (false).
- [📊Variables](https://docs.gpmautomate.com/huong-dan-cac-action/variables.md)
- [Set variable](https://docs.gpmautomate.com/huong-dan-cac-action/variables/set-variable.md)
- [Increase variable](https://docs.gpmautomate.com/huong-dan-cac-action/variables/increase-variable.md): Increase variable dùng để cộng thêm một giá trị số (được xác định ở mục Increase by) vào một biến.
- [Decrease variable](https://docs.gpmautomate.com/huong-dan-cac-action/variables/decrease-variable.md): Decrease variable dùng để trừ đi một giá trị số (được xác định ở mục Decrease by) từ một biến.
- [Count](https://docs.gpmautomate.com/huong-dan-cac-action/variables/count.md)
- [⚙️Workflow](https://docs.gpmautomate.com/huong-dan-cac-action/workflow.md)
- [Exit loop](https://docs.gpmautomate.com/huong-dan-cac-action/workflow/exit-loop.md)
- [Next loop](https://docs.gpmautomate.com/huong-dan-cac-action/workflow/next-loop.md)
- [Stop](https://docs.gpmautomate.com/huong-dan-cac-action/workflow/stop.md)
- [Throw](https://docs.gpmautomate.com/huong-dan-cac-action/workflow/throw.md)
- [Delay](https://docs.gpmautomate.com/huong-dan-cac-action/workflow/delay.md): Dừng chờ trong 1 khoảng thời gian.
- [🔤Text & number](https://docs.gpmautomate.com/huong-dan-cac-action/text-and-number.md)
- [Random text](https://docs.gpmautomate.com/huong-dan-cac-action/text-and-number/random-text.md)
- [Split text](https://docs.gpmautomate.com/huong-dan-cac-action/text-and-number/split-text.md)
- [Read json](https://docs.gpmautomate.com/huong-dan-cac-action/text-and-number/read-json.md)
- [Regex](https://docs.gpmautomate.com/huong-dan-cac-action/text-and-number/regex.md)
- [Random number](https://docs.gpmautomate.com/huong-dan-cac-action/text-and-number/random-number.md)
- [Math execute](https://docs.gpmautomate.com/huong-dan-cac-action/text-and-number/math-execute.md)
- [2FA code](https://docs.gpmautomate.com/huong-dan-cac-action/text-and-number/2fa-code.md)
- [📁File & Folder](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder.md)
- [File exists](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/file-exists.md)
- [Copy file](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/copy-file.md)
- [Move/rename file](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/move-rename-file.md)
- [Delete file](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/delete-file.md): Xoá file theo đường dẫn File Path.
- [File read all text](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/file-read-all-text.md)
- [File read all lines](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/file-read-all-lines.md)
- [File read random line](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/file-read-random-line.md)
- [File write all text](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/file-write-all-text.md)
- [File append line](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/file-append-line.md)
- [Create empty excel](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/create-empty-excel.md)
- [Read excel file](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/read-excel-file.md)
- [Write excel file](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/write-excel-file.md)
- [Append excel file](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/append-excel-file.md): Thêm dữ liệu mới vào cuối một file excel hiện có mà không ghi đè nội dung hiện tại.
- [Folder exists](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/folder-exists.md)
- [Create folder](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/create-folder.md)
- [Move / rename folder](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/move-rename-folder.md)
- [Delete folder](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/delete-folder.md)
- [Folder get file list](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/folder-get-file-list.md)
- [📋Clipboard](https://docs.gpmautomate.com/huong-dan-cac-action/clipboard.md)
- [Get clipboard text](https://docs.gpmautomate.com/huong-dan-cac-action/clipboard/get-clipboard-text.md): Lấy nội dung văn bản hiện có trong clipboard.
- [Set clipboard text](https://docs.gpmautomate.com/huong-dan-cac-action/clipboard/set-clipboard-text.md)
- [🌐HTTP](https://docs.gpmautomate.com/huong-dan-cac-action/http.md)
- [HTTP Request](https://docs.gpmautomate.com/huong-dan-cac-action/http/http-request.md)
- [HTTP Download](https://docs.gpmautomate.com/huong-dan-cac-action/http/http-download.md): Tải xuống một file về máy tính thông qua giao thức HTTP.
- [🖼️Image Search](https://docs.gpmautomate.com/huong-dan-cac-action/image-search.md)
- [Wait to image](https://docs.gpmautomate.com/huong-dan-cac-action/image-search/wait-to-image.md)
- [Image exists](https://docs.gpmautomate.com/huong-dan-cac-action/image-search/image-exists.md)
- [Image search](https://docs.gpmautomate.com/huong-dan-cac-action/image-search/image-search.md)
- [Ví dụ kết hợp cho Image](https://docs.gpmautomate.com/huong-dan-cac-action/image-search/vi-du-ket-hop-cho-image.md)
- [Image to Base64](https://docs.gpmautomate.com/huong-dan-cac-action/image-search/image-to-base64.md)
- [🤖AI](https://docs.gpmautomate.com/huong-dan-cac-action/ai.md)
- [ChatGPT](https://docs.gpmautomate.com/huong-dan-cac-action/ai/chatgpt.md)
- [DeepSeek](https://docs.gpmautomate.com/huong-dan-cac-action/ai/deepseek.md)
- [📧Mail](https://docs.gpmautomate.com/huong-dan-cac-action/mail.md)
- [Read mail code](https://docs.gpmautomate.com/huong-dan-cac-action/mail/read-mail-code.md)
- [Read outlook (Oauth2)](https://docs.gpmautomate.com/huong-dan-cac-action/mail/read-outlook-oauth2.md)
- [🧭Navigation](https://docs.gpmautomate.com/huong-dan-cac-action/navigation.md)
- [New tab](https://docs.gpmautomate.com/huong-dan-cac-action/navigation/new-tab.md)
- [Active tab](https://docs.gpmautomate.com/huong-dan-cac-action/navigation/active-tab.md)
- [Close tab](https://docs.gpmautomate.com/huong-dan-cac-action/navigation/close-tab.md)
- [Close all tab](https://docs.gpmautomate.com/huong-dan-cac-action/navigation/close-all-tab.md)
- [Go to URL](https://docs.gpmautomate.com/huong-dan-cac-action/navigation/go-to-url.md)
- [Back URL](https://docs.gpmautomate.com/huong-dan-cac-action/navigation/back-url.md)
- [Reload](https://docs.gpmautomate.com/huong-dan-cac-action/navigation/reload.md)
- [Get URL](https://docs.gpmautomate.com/huong-dan-cac-action/navigation/get-url.md)
- [Wait URL Changed](https://docs.gpmautomate.com/huong-dan-cac-action/navigation/wait-url-changed.md)
- [🎯Element](https://docs.gpmautomate.com/huong-dan-cac-action/element.md)
- [Wait element](https://docs.gpmautomate.com/huong-dan-cac-action/element/wait-element.md)
- [Get element attribute](https://docs.gpmautomate.com/huong-dan-cac-action/element/get-element-attribute.md)
- [Get element text](https://docs.gpmautomate.com/huong-dan-cac-action/element/get-element-text.md)
- [Count element](https://docs.gpmautomate.com/huong-dan-cac-action/element/count-element.md)
- [🖱️Mouse](https://docs.gpmautomate.com/huong-dan-cac-action/mouse.md)
- [Mouse click](https://docs.gpmautomate.com/huong-dan-cac-action/mouse/mouse-click.md): Click chuột vào một element.
- [Mouse try to click](https://docs.gpmautomate.com/huong-dan-cac-action/mouse/mouse-try-to-click.md)
- [Mouse move](https://docs.gpmautomate.com/huong-dan-cac-action/mouse/mouse-move.md)
- [Mouse press and hold](https://docs.gpmautomate.com/huong-dan-cac-action/mouse/mouse-press-and-hold.md)
- [Mouse release](https://docs.gpmautomate.com/huong-dan-cac-action/mouse/mouse-release.md)
- [Mouse scroll](https://docs.gpmautomate.com/huong-dan-cac-action/mouse/mouse-scroll.md)
- [⌨️Keyboard](https://docs.gpmautomate.com/huong-dan-cac-action/keyboard.md)
- [Key press](https://docs.gpmautomate.com/huong-dan-cac-action/keyboard/key-press.md): Gõ một nội dung lên trang web.
- [File upload](https://docs.gpmautomate.com/huong-dan-cac-action/keyboard/file-upload.md)
- [Select dropdown](https://docs.gpmautomate.com/huong-dan-cac-action/keyboard/select-dropdown.md)
- [📜Scroll](https://docs.gpmautomate.com/huong-dan-cac-action/scroll.md)
- [Random scroll](https://docs.gpmautomate.com/huong-dan-cac-action/scroll/random-scroll.md)
- [Scroll to top](https://docs.gpmautomate.com/huong-dan-cac-action/scroll/scroll-to-top.md)
- [Scroll to bottom](https://docs.gpmautomate.com/huong-dan-cac-action/scroll/scroll-to-bottom.md)
- [Scroll to element](https://docs.gpmautomate.com/huong-dan-cac-action/scroll/scroll-to-element.md)
- [🔀Switch](https://docs.gpmautomate.com/huong-dan-cac-action/switch.md)
- [Switch to default](https://docs.gpmautomate.com/huong-dan-cac-action/switch/switch-to-default.md)
- [Switch to frame](https://docs.gpmautomate.com/huong-dan-cac-action/switch/switch-to-frame.md)
- [Switch to popup](https://docs.gpmautomate.com/huong-dan-cac-action/switch/switch-to-popup.md)
- [🍪Cookie](https://docs.gpmautomate.com/huong-dan-cac-action/cookie.md)
- [Import cookie](https://docs.gpmautomate.com/huong-dan-cac-action/cookie/import-cookie.md)
- [Export cookie](https://docs.gpmautomate.com/huong-dan-cac-action/cookie/export-cookie.md)
- [⚠️Alert](https://docs.gpmautomate.com/huong-dan-cac-action/alert.md)
- [Accept alert](https://docs.gpmautomate.com/huong-dan-cac-action/alert/accept-alert.md)
- [Cancel alert](https://docs.gpmautomate.com/huong-dan-cac-action/alert/cancel-alert.md)
- [📑Tab & Popup](https://docs.gpmautomate.com/huong-dan-cac-action/tab-and-popup.md)
- [Wait popup](https://docs.gpmautomate.com/huong-dan-cac-action/tab-and-popup/wait-popup.md)
- [Has popup](https://docs.gpmautomate.com/huong-dan-cac-action/tab-and-popup/has-popup.md)
- [💻Javascript](https://docs.gpmautomate.com/huong-dan-cac-action/javascript.md)
- [Execute JS code](https://docs.gpmautomate.com/huong-dan-cac-action/javascript/execute-js-code.md)
- [Get extension id](https://docs.gpmautomate.com/huong-dan-cac-action/javascript/get-extension-id.md)
- [Screenshot](https://docs.gpmautomate.com/huong-dan-cac-action/javascript/screenshot.md)
- [🔗References](https://docs.gpmautomate.com/huong-dan-cac-action/references.md)
- [Call workflow](https://docs.gpmautomate.com/huong-dan-cac-action/references/call-workflow.md)
- [📊Google service](https://docs.gpmautomate.com/huong-dan-cac-action/google-service.md): Đọc và ghi nội dung lên Google Sheets
- [Read google sheet](https://docs.gpmautomate.com/huong-dan-cac-action/google-service/read-google-sheet.md)
- [Write google sheet](https://docs.gpmautomate.com/huong-dan-cac-action/google-service/write-google-sheet.md): Ghi dữ liệu lên trên google sheet


---

# 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.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.
