範例
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本節提供使用 Apps Script API 的範例和開發工具。
食譜
本節列出的「配方」範例,說明如何將常見的 Apps Script 動作表示為 Apps Script API 要求。
這些範例會以特定語言的 Apps Script API 要求通訊協定呈現,並使用 Google API 用戶端程式庫。如需範例,請參閱「執行函式」指南。
本節的食譜分為下列類別:
開發資源
Apps Script 的 clasp
指令列工具可讓您在本機開發及維護 Apps Script 專案。clasp
是 Node.js 開放原始碼專案,使用 Apps Script API 管理專案;您可以在 clasp
GitHub 存放區中查看 API 的呼叫方式。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[[["\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/)."]]