Mẫu
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Phần này cung cấp các mẫu và công cụ phát triển sử dụng Apps Script API.
Recipe
Các ví dụ về "công thức" được liệt kê trong phần này minh hoạ cách thể hiện các thao tác phổ biến của Apps Script dưới dạng các yêu cầu của Apps Script API.
Các ví dụ này được trình bày trong giao thức yêu cầu Apps Script API bằng một ngôn ngữ cụ thể thông qua thư viện ứng dụng API của Google, hãy xem hướng dẫn Thực thi một hàm để biết ví dụ.
Các công thức trong phần này được chia thành các danh mục sau:
- Thực thi các hàm Apps Script – Các công thức cho biết cách gọi từ xa các hàm Apps Script từ các ứng dụng khác.
- Quản lý dự án – Các công thức cho thấy các thao tác cơ bản đối với dự án, chẳng hạn như tạo dự án mới, truy xuất tệp kịch bản và cập nhật nội dung dự án.
Tài nguyên phát triển
Công cụ dòng lệnh clasp
cho Apps Script cho phép bạn phát triển và duy trì các dự án Apps Script trên máy cục bộ. clasp
là một dự án nguồn mở Node.js sử dụng Apps Script API để quản lý dự án; bạn có thể xem cách gọi API này trong kho lưu trữ clasp
GitHub.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-31 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\u003cp\u003eThis section offers samples and development tools utilizing the Apps Script API, including recipes demonstrating common Apps Script actions as API requests.\u003c/p\u003e\n"],["\u003cp\u003eRecipes are categorized into executing Apps Script functions remotely and managing projects (creating, retrieving, updating).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eclasp\u003c/code\u003e command-line tool enables local development and maintenance of Apps Script projects using the Apps Script API.\u003c/p\u003e\n"]]],[],null,["# Samples\n\nThis section provides samples and development tools that use the Apps Script API.\n\nRecipes\n-------\n\nThe 'recipe' examples listed in this section demonstrate how to express common\nApps Script actions as Apps Script API requests.\n\nThese examples are presented in Apps Script API request protocols in a\nspecific language using Google API client libraries, see the\n[Executing an function](/apps-script/api/how-tos/execute) guide\nfor examples.\n\nRecipes in this section are divided into the following categories:\n\n- [Executing Apps Script Functions](/apps-script/api/samples/execute) --- Recipes that show how to remotely call Apps Script functions from other apps.\n- [Project Management](/apps-script/api/samples/manage) --- Recipes that show basic project actions such as creating new projects, retrieving script files, and updating project content.\n\nDevelopment resources\n---------------------\n\nThe [`clasp` command-line tool](/apps-script/guides/clasp) for Apps Script lets\nyou develop and maintain Apps Script projects from your local machine. `clasp`\nis a Node.js open-source project that uses Apps Script API for project\nmanagement; you can see how the API is called in the\n[`clasp` GitHub repository](https://github.com/google/clasp/)."]]