Filter overdue tasks
getValues on the Tasks range, loop rows where due date is before today, and collect assignee emails into an array for MailApp.
getValues reads every cell in a range into a two-dimensional JavaScript array. The outer array is rows and the inner arrays are columns. It is the standard way to pull a table from a sheet, loop through it, filter rows, and write results elsewhere in one efficient pass.
Use getValues when you process batches: scan an entire data tab, find rows matching a condition, build email lists, or transform values before one setValues write back.
Skip getValues when you only need one cell, or when the range is enormous and you should filter on the server with QUERY or read a named subset. Reading millions of cells can time out.
Define a range with getRange('A2:E') or getDataRange() on the sheet.
Call range.getValues() to get a 2D array like [[a1,b1],[a2,b2]].
Loop with for loops or array methods. Row index 0 is the first row in the range, not row 1 on the sheet.
Adjust column indexes when your range does not start at column A.
After processing, write back with setValues on the target range of the same dimensions.
Use getDisplayValues if you need formatted text instead of raw values.
getValues on the Tasks range, loop rows where due date is before today, and collect assignee emails into an array for MailApp.
Read column C with getValues, strip non-digits in JavaScript, and setValues back to the same range in one write.
Map each row to an object using header names from row 1, then JSON.stringify the array for UrlFetchApp.
Build this without starting from a blank cell
Use a Better Sheets tool for getValues, then watch a walkthrough when you want the full pattern.
Watch how getValues works
Loops in Apps Script let you repeat code over rows, columns, sheets, or API pages. You read ranges into arrays with getValues(), process each item in a for or forEach loop, then write results back in one setValues() call when possible. Batch reads and writes beat cell-by-cell updates for speed and quota limits.
Read guide →The Script Editor is the Apps Script workspace inside your spreadsheet where you write JavaScript that talks to Sheets, Gmail, and other Google services. You open it from Extensions > Apps Script. Every function you save can be run manually, bound to a trigger, or linked from a custom menu.
Read guide →Automation means work happens without repeating the same clicks every day: imports update, emails send, rows move, and dashboards refresh. In Sheets, automation usually stacks built-in features, Apps Script, and sometimes the Sheets API or add-ons. Start with the lightest tool that still solves the job.
Read guide →A workflow is the path work takes through your sheet: intake, review, approval, done. Good workflows use consistent columns, statuses everyone understands, and just enough automation to move tasks forward without hiding steps from the team.
Read guide →Done reading about getValues?
Membership unlocks 636+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.