FREE COURSE | BEGINNER

Google Apps Script

Learn practical Google Apps Script skills through guided workflows and hands-on practice.

Learning objectives

Apply essential features, complete the interactive lab and build a practical mini project.

01. Script editor

Open Extensions > Apps Script from a spreadsheet to create a bound script.

Example / workflow

Create a test spreadsheet and open the editor.

Try it yourself

Save a function named hello.

02. JavaScript functions

Apps Script uses JavaScript functions, variables and control flow.

Example / workflow

function hello() { console.log("Hello"); }

Try it yourself

Run hello and inspect the execution log.

03. Spreadsheet services

SpreadsheetApp accesses spreadsheets; scripts may request authorization.

Example / workflow

function hello() { SpreadsheetApp.getActiveSheet().getRange("A1").setValue("Hello"); }

Try it yourself

Run in a test sheet with expected permissions.

04. Reading and writing ranges

getValues returns a two-dimensional array; setValues writes matching dimensions.

Example / workflow

const values = SpreadsheetApp.getActiveSheet().getRange("A2:B6").getValues();

Try it yourself

Inspect values in a function using console.log(values).

05. Loops and conditions

Use map or loops to transform rows and conditions to classify scores.

Example / workflow

const status = score >= 75 ? "Pass" : "Review";

Try it yourself

Test scores of 74 and 75.

06. Triggers

Simple triggers such as onOpen run on events with restrictions; installable triggers may require authorization.

Example / workflow

function onOpen() { SpreadsheetApp.getUi().createMenu("Lab").addItem("Hello", "hello").addToUi(); }

Try it yourself

Save and reopen a test spreadsheet with hello defined.

07. Debugging and permissions

Use execution logs and test data; review requested scopes before granting access.

Example / workflow

Run a test function and inspect Executions for errors.

Try it yourself

Correct a misspelled method and rerun.

08. Interactive automation lab

Run a predefined local simulation of grade classification; it never contacts Google.

Example / workflow

Change scores and the passing threshold, then run the simulation.

Try it yourself

Compare the resulting status column.

LOOPNODELAB™ Google Apps Script Lab

Browser-based learning simulation. Changes stay on this page.

Simulation controls

Predefined logic only. No Google account access.
RowA · NameB · ScoreC · Status
2Student 1
3Student 2
4Student 3
5Student 4
6Student 5
Ready to run.

09. Mini project: Grade processing

Read five scores from B2:B6 and write statuses to C2:C6 in a test sheet.

Example / workflow

Use getValues, map and setValues in a bound function.

Try it yourself

Verify output and avoid overwriting existing data.

Actual Apps Script example (threshold 75)

function processGrades() {
  const sheet = SpreadsheetApp.getActiveSheet();
  const scores = sheet.getRange("B2:B6").getValues();
  const result = scores.map(([score]) => [
    typeof score === "number" && score >= 75 ? "Pass" : "Review"
  ]);
  sheet.getRange("C2:C6").setValues(result);
}

Run only in a test spreadsheet with B2:B6 populated and C2:C6 available. The browser lab above does not execute this source.

Knowledge Check