Google Apps Script samples

Explore Google Apps Script samples and solutions that show you how to automate tasks, extend Google Workspace user interfaces, and integrate into Google and external services.

View samples by use case, featured Google products, and type:

About sample types

The following provides an explanation of each sample type:

Quickstart

Quickstart samples offer quick, proof-of-concept code samples to get you working with Apps Script in under five minutes. Quickstarts are available for most Apps Script project types.

Find quickstarts organized by project type at the left under Samples by project type or try this simple automation that creates a Google Doc and emails you a link to it.

Solution

Solution samples are fully functional Apps Script projects. Solutions address realistic business problems and showcase how you can automate workflows across Google Workspace. Often, you can implement solutions without needing to edit or update the code.

Find solutions organized by project type at the left under Samples by project type or try this popular mail merge solution.

Codelab

Codelabs are hands-on, step-by-step technical tutorials. They combine explanation, working best-practice sample code, and code exercises. Codelabs are available for most Google developer products and are published on the Codelab catalogue.

Find Apps Script-specific codelabs at the left under Codelabs.

Explore Apps Script code samples on GitHub

You can also find Apps Script samples on GitHub. You can fork these repositories and use the code as a reference for your own projects.

Explore Apps Script videos

Explore content from the Google Workspace Developers YouTube channel: