24 posts tagged with “code-snippet”

For Loop Using Dynamic Set

What Does This Code Snippet Do? Unlike the incremental For Loop where you specify the number of iterations you want the loop to execute…

For Loop Using Increments

What Does This Code Snippet Do? This code snippet is a basic For Loop that takes in a set iteration length and also lets you specify where…

Filter Out Rows Using Regex

Using Regex Using Regular Expressions allows you to analyze a value and find a match according to some logic. It's a pretty vast topic, so I…

Filter Out Blank Rows

What you'll need Before you can filter anything, you'll need a data set to filter by. More specifically, you'll need a data Array. An array…

Get Unique Values from Array

What is a Unique Array? Just as straight forward as it sounds, it's an Array where all of the values within it are unique - meaning, there…

Converting JSON into a flat Array

This code snippet helps you convert an object into a flat array that you can use to import into a Google Sheet. Important Note: This snippet…

Basic REST API GET Call Using JSON

This is a basic REST API call that parses out JSON data and returns it back to you. To do a POST request using JSON data, check out the…

Get Data from a Sheet

There are a few different ways to get all of the data from a specific sheet. The fastest way is to use the .getDataRange() method. The only…

Sending Emails Using Apps Script

The built-in libraries in Google Apps Script makes sending emails extremely easy. By default, you have two libraries to choose from: MailApp…

Create a Custom Menu Option

The onOpen trigger is mainly used to add in additional menu options that can help you execute scripts without having to open up your Script…

Auto-Sorting Your Google Sheet

Sorting your Google Sheet using Apps Script is very simple. Firstly, you'll need to decide how you want to sort your data - either by the…