After a while, writing code becomes less about knowing all of the specifics of a language, framework, or platform, but more about being able to match patterns. After seeing a sufficient number of different problems, you get better at saying, “Hey, this bit of problem X seems a lot like this part of problem Y, maybe we could use that.”
In this post, learn about the Delegation Pattern that describes an object whose role it is to accept requests, delegate those responses to other objects, then return the responses to the original caller.
Source: Delegating Client-Side Requests with google.script.run in Google Apps Script – Jeff Everhart
In this post, I look at using template literals, an ES6 feature now available to Google Apps Script developers, to create dynamic multiline strings.
Source: ES 6 Features for Google Apps Script: Template Literals – Jeff Everhart
Most of the comments I get on this site have to do with someone trying something I’ve written about that isn’t working for them. In most cases, error messages can be your friends since they can point to the particular place your script failed and give you additional insight into why it failed.
This post will describe some of the ways you can use the built-in tools of the Google Apps Script environment to debug or troubleshoot your own scripts. My goal here is start from the easiest to implement and work towards more difficult, but more efficient, methods of debugging.
Source: Debugging in Google Apps Script – Jeff Everhart
After answering 100’s of Google Apps Script questions, I realized how many projects people are working on that start with a Google Spreadsheet as a base. A lot of my existing examples involve using a Google Form to trigger scripts that do things to data being written to a spreadsheet, so I typically have to describe what to do using quick code snippets or links to other docs.
In this post, we look at the easiest way to retrieve all of the rows of data from a Google Spreadsheet using Google Apps Script.
Source: Retrieve Rows from Google Spreadsheet with Google Apps Script – Jeff Everhart