Apps Script 範例總覽
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本節提供 Apps Script 快速入門、解決方案和程式碼研究室。以下是每種樣本的定義。
- 快速入門導覽課程
快速入門範例提供概念驗證程式碼範例,協助您在五分鐘內開始使用 Apps Script。大多數 Apps Script 專案類型都提供快速入門。
在左側的「Samples by project type」(依專案類型分類的範本) 下方,依專案類型尋找快速入門範本,或試試這個簡單的自動化作業,建立 Google 文件並透過電子郵件傳送連結給您。
- 解決方案
解決方案範例是功能完備的 Apps Script 專案。解決方案可解決實際的業務問題,並展示如何自動化 Google Workspace 的工作流程。通常您不需要編輯或更新程式碼,即可導入解決方案。
在左側的「按專案類型分類的範本」下方,依專案類型尋找解決方案,或試試這個熱門的合併列印解決方案。
- Codelab
程式碼研究室提供逐步技術教學課程,內容包括說明、最佳做法範例程式碼和程式碼練習。大多數 Google 開發人員產品都有 Codelab,並發布在 Codelab 目錄中。
在左側的「Codelabs」下方,尋找 Apps Script 專屬的程式碼研究室。
您也可以在 GitHub 上找到 Apps Script 範例。
您可以分支這些存放區,並將程式碼做為自己專案的參考資料。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[[["\u003cp\u003eThis section offers Apps Script quickstarts, solutions, and codelabs to help you learn and implement Apps Script effectively.\u003c/p\u003e\n"],["\u003cp\u003eQuickstarts provide concise code samples for a fast introduction, while solutions offer complete projects addressing real-world scenarios.\u003c/p\u003e\n"],["\u003cp\u003eCodelabs guide you through hands-on tutorials with explanations and practical exercises for deeper learning.\u003c/p\u003e\n"],["\u003cp\u003eExplore samples organized by project type or delve into specific quickstarts, solutions, and codelabs for targeted learning experiences.\u003c/p\u003e\n"],["\u003cp\u003eAccess additional resources on the Google Workspace Developers YouTube channel and GitHub for further exploration and reference.\u003c/p\u003e\n"]]],["Apps Script offers three types of samples: Quickstarts, Solutions, and Codelabs. Quickstarts are brief code samples for rapid prototyping. Solutions are complete projects that solve real-world business issues and often require no code modification. Codelabs are step-by-step tutorials with explanations, sample code, and exercises. Samples are organized by project type and can also be found on GitHub for reference. Google also provides helpful tips and latest features on their Youtube channel.\n"],null,["# Apps Script samples overview\n\n|-------------------------------------------------------------------------------------------------------------------------------------------|\n| Got 5 minutes? Help us improve our Google Workspace documentation by taking a quick [online survey](https://forms.gle/XcqRP3PJiQv9ADuj9). |\n\nThis section provides Apps Script quickstarts, solutions, and codelabs.\nFollowing is a definition of each type of sample. \n\n|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | Prefer to learn through video? The Google Workspace Developers channel offers videos about tips, tricks, and the latest features. [Subscribe now](https://www.youtube.com/channel/UCUcg6az6etU_gRtZVAhBXaw) |\n\n*Quickstart*\n\n: Quickstart samples offer quick, proof-of-concept code samples to get you\n working with Apps Script in under five minutes. Quickstarts are available for\n most Apps Script project types.\n\n: Find quickstarts organized by project type at the left under **Samples by\n project type** or\n [try this simple automation](/apps-script/quickstart/automation) that creates a\n Google Doc and emails you a link to it.\n\n*Solution*\n\n: Solution samples are fully functional Apps Script projects. Solutions address\n realistic business problems and showcase how you can automate workflows across\n Google Workspace. Often, you can implement solutions without needing to edit or\n update the code.\n\n: Find solutions organized by project type at the left under **Samples by\n project type**\n or [try this\n popular mail merge solution](/apps-script/samples/automations/mail-merge).\n\n*Codelab*\n\n: Codelabs are hands-on, step-by-step technical tutorials. They combine\n explanation, working best-practice sample code, and code exercises. Codelabs are\n available for most Google developer products and are published on the\n [Codelab catalogue](https://codelabs.developers.google.com/).\n\n: Find Apps Script-specific codelabs at the left under **Codelabs**.\n\nYou can also find Apps Script samples on [GitHub](https://github.com/googleworkspace/apps-script-samples).\nYou can fork these repositories and use the code as a reference for your own\nprojects."]]