Apps 脚本示例概览
bookmark_border
bookmark
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本部分提供了 Apps 脚本快速入门、解决方案和 Codelab。
以下是每种抽样的定义。
- 快速入门
快速入门示例提供快速的概念验证代码示例,可帮助您在不到 5 分钟的时间内开始使用 Apps 脚本。大多数 Apps 脚本项目类型都有快速入门。
在左侧的按项目类型划分的示例下查找按项目类型整理的快速入门指南,或者尝试此简单自动化,该自动化会创建一个 Google 文档,并通过电子邮件向您发送该文档的链接。
- 解决方案
解决方案示例是功能完备的 Apps 脚本项目。解决方案可解决实际的业务问题,并展示如何自动执行 Google Workspace 中的工作流。通常,您无需修改或更新代码即可实现解决方案。
在左侧的按项目类型划分的示例下查找按项目类型整理的解决方案,或尝试此热门的邮件合并解决方案。
- Codelab
Codelab 是实操型分步技术教程。它们将说明、有效的最佳实践示例代码和代码练习相结合。大多数 Google 开发者产品都有相应的 Codelab,这些 Codelab 发布在 Codelab 目录中。
在左侧的 Codelabs 下查找特定于 Apps 脚本的 Codelab。
您还可以在 GitHub 上找到 Apps 脚本示例。
您可以克隆这些代码库,并使用其中的代码作为自己项目的参考。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-22。
[null,null,["最后更新时间 (UTC):2025-08-22。"],[[["\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,["This 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."]]