> 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/file-and-folder/file-read-all-text.md).

# File read all text

File read all text là hành động dùng để đọc trọn vẹn nội dung của một file văn bản định dạng `.txt` cùng một lúc. Toàn bộ dữ liệu bên trong file sẽ được trả về dưới dạng một chuỗi văn bản (string) duy nhất và lưu vào một biến đầu ra (Output variable).

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

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

* File Path: Đường dẫn tuyệt đối dẫn đến file `.txt` cần đọc (Ví dụ: `D:\data\content.txt`).
* Output variable: Tên biến lưu cấu trúc chuỗi ký tự vừa đọc được.

#### Ví dụ thực tế: Đọc nội dung bài viết chuẩn bị sẵn

Giả sử bạn chuẩn bị một bài viết dài (gồm nhiều câu, dấu xuống dòng, khoảng trắng) lưu trong file văn bản `D:\GPM\post.txt`. Bạn muốn lấy toàn bộ nội dung này để tự động điền vào ô đăng bài trên trình duyệt:

* Cách cấu hình:
  * File Path: Điền đường dẫn `D:\GPM\post.txt`
  * Output variable: Đặt tên biến lưu kết quả là `$textContent`.
* Kết quả: Hệ thống sẽ bốc trọn vẹn mọi ký tự và cấu trúc dòng có trong file gán vào biến `$textContent`. Ở các bước tiếp theo, bạn chỉ cần gọi hành động Key press truyền biến `$textContent` này vào ô nhập liệu của website là xong.

<figure><img src="https://275605936-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN9cKpvJdcLU6FS8VMSTs%2Fuploads%2Fgit-blob-f0deced56398a9c3e39151c886b7fb7288c367e4%2Fimage%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>


---

# 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/file-and-folder/file-read-all-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.
