Snippets · 92 functions
Small pieces you can paste today
Every snippet is one complete function that compiles against the real Apps Script types. Open a collection, copy the piece you need, and change the placeholder values.
Collections
Pick the app or topic
Each collection lists what it uses so you know which permissions to expect.
- 12 snippets Google Sheets snippets
Twelve short functions for the Sheets tasks that come up again and again: reading rows, writing values, and shaping a tab.
- 12 snippets Gmail snippets
Twelve short functions for the Gmail tasks that come up again and again: searching, reading, sending, and labeling.
- 12 snippets Google Drive snippets
Twelve short functions for the Drive tasks that come up again and again: folders, files, copies, and sharing.
- 11 snippets Google Docs snippets
Eleven short functions for the Docs tasks that come up again and again: creating, writing, and reading content.
- 11 snippets Google Calendar snippets
Each snippet is a complete function you can run on its own to try one Calendar task, from reading a shared calendar to coloring one event.
- 12 snippets Dates, text, and array snippets
Each one is a complete, runnable function you can paste into the Apps Script editor to see a date, currency, or array helper work on real values.
- 12 snippets Triggers and script control snippets
Each snippet is a complete function that installs a trigger, remembers a value between runs, or reports a failure, ready to paste into the Apps Script editor.
- 10 snippets Web request snippets
Each snippet is a complete function that calls a URL with UrlFetchApp, ready to paste into the Apps Script editor and adapt to your own API.