Audit log
onEdit calls appendRow on a Log sheet with timestamp, user email, sheet name, and edited address from the event object.
appendRow adds one new row to the bottom of the first used table on a sheet, filling values left to right across columns. It is the quickest way to log an event, store a form response field set, or push one record without calculating the next row number manually.
Use appendRow for single new records: log each onEdit event, save a webhook payload, add a form row from e.values, or queue a job entry with timestamp and user.
Skip appendRow when inserting many rows at once. Build a 2D array and setValues at getLastRow + 1 is faster. Use insertRowBefore when order in the middle of the sheet matters.
Call sheet.appendRow([col1, col2, col3]) with a flat array of cell values in column order.
Apps Script places the row after the current last row of the sheet table.
{:"Values types follow setValue rules"=>"strings, numbers, dates, booleans."}
Missing array slots leave trailing cells blank on that row.
For multi-column consistency, keep array order aligned with your header row.
Combine with LockService when concurrent triggers might append at once.
onEdit calls appendRow on a Log sheet with timestamp, user email, sheet name, and edited address from the event object.
onFormSubmit maps e.values into [id, name, email, answer] and appendRow on Responses mirror tab.
catch block appendRow on Errors with message and stack snippet for later review.
Build this without starting from a blank cell
Use a Better Sheets tool for appendRow, then watch a walkthrough when you want the full pattern.
Watch how appendRow works
Guides that explain appendRow in more depth.
In this post, we'll cover how to remove rows automatically in Google Sheets using Apps Script, ensuring you save time and streamline your spreadsheet management. You're probably already familiar with the manual way of right-clicking and deleting rows, but there's a more efficient way to handle this—automation! Manual versus Semi-Automatic Deletion You may know that you can manually delete rows in Google Sheets by right-clicking and selecting "Delete row." You can even select multiple rows...
Read post →Nothing is better than Google Sheets. You just need to learn more about the unlimited power of Google Sheets. Functions, Formulas, Apps Script and more.
Read post →Did you know you can use Google Apps Script to turn a Google Sheet into a free, auto-syncing database for your website? This guide shows you exactly how to set it up. You’ll prepare your spreadsheet, write a few lines of code and publish your site. Don’t worry if you’re not a developer, we’ll walk you through it. Why Use Google Sheets as a Database? For small projects, Google Sheets offers many advantages over traditional databases: * Free hosting and storage * Easy to edit data without...
Read post →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 →Triggers tell Apps Script when to run a function: on edit, on open, on a schedule, or when a form is submitted. Simple triggers use reserved names like onEdit. Installable triggers are created in the Apps Script Triggers page and can do more, including running as a specific user or on a timer.
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 →MailApp is an Apps Script service that sends email from your Google account without opening Gmail. You call MailApp.sendEmail with a recipient, subject, and body, often using cell values as the content. It is the fastest way to notify someone when a row is added or a deadline hits in a tracker.
Read guide →Done reading about appendRow?
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.