Sharing some reusable Google Apps Script snippets with the world.
Google Scripts allow you to combine Google services in powerful ways using JavaScript. Youn can write scripts to:
- Extend the functionality of services like Google Sheets, adding menu buttons and macros, or configuring automated tasks.
- Orchestrate tasks that combine Google services (eg, get data from a Google Sheet and use it to create a Google Calendar event and sent an email with Gmail.)
- Rapidly deploy scripts that run on a timer, or in response to user events.
This is a collection of scripts I have written, made as legible and reusable as possible. Feel free to use them in your projects.
I usually develop scripts locally, in TypeScript, then compile them into GAS-comptatible JavaScript using clasp. When I share code here, I will try to share the original TypeScript version and the compiled, JavaScript version.
- If you use clasp, copy the TypeScript code.
- If not, copy the plain JavaScript code into
.gs
files in the online editor.
This site was created/mainted by Dustin Michels.
- You can reach me on Twitter, LinkedIn, and Keybase.
- If you encounter issues are want to contribute code, you can use the GitHub page.