Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

A row written through the Google Sheets API won’t run Apps Script’s onEdit(e) handler. Google says script executions and API requests do not cause triggers to run; the same restriction applies to simple and installable triggers. To process an API-written row, call the processing function from the code that performs the write, notify a separate processor, or arrange a scheduled check for pending rows.

Why the row was written but onEdit stayed silent

onEdit(e) is an event handler for a user changing a cell’s value, not a general callback for every change to a spreadsheet. Google’s Apps Script documentation says, “Script executions and API requests don’t cause triggers to run.” It gives the specific example that calling Range.setValue() does not cause the spreadsheet’s onEdit trigger to run. So an API write can succeed while the handler never starts. Google’s simple-trigger guide describes this restriction.

Installing an edit trigger does not change the outcome. Google says installable triggers also do not run when an event results from script execution or an API request. The trigger type does not turn a programmatic write into a user edit. Google’s installable-trigger guide documents the same limitation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

onEdit and onChange handle different user events

Use an edit trigger when a person changes cell values. Use an installable change trigger when a person makes a structural change, such as adding a row. Google classifies these as separate event types: ON_EDIT is an edit such as entering a value, while ON_CHANGE can represent a structural change such as adding a row. The event-type reference describes the distinction.

#1 Best Overall
Google Sheet Shortcut Mouse Pad, Large Mousepad for Google Excel Spreadsheet, Extended Gaming Pad for Desk, 31.5”x11.8” Waterproof Anti Slip Keyboard Pad with Google Sheet Shortcuts (Windows)
  • 【Google Sheet Shortcut】The Large mouse pad with shortcuts specifically designed for Google Sheets, making it easy for you to use Google Docs and improve work efficiency.
  • 【HD Printing】Printed with high-tech precision for vibrant colors and sharp details, this mouse pad provides quick access to essential functions—an ideal addition to any workspace
  • 【High Quality】Crafted from smooth microfiber cloth, this large gaming mouse pad offers a comfortable surface with reinforced stitched edges to prevent fraying. Its 3mm thickness ensures long-lasting durability
  • 【Perfect Fit】Measuring 31.5 x 15.7 inches, this mouse pad offers ample space for your keyboard, mouse, and other accessories—perfect for both work and gaming
  • 【Easy Maintain】Simply wipe with a damp cloth to keep your workspace clean and tidy

Switching to onChange() will not make API writes trigger Apps Script. The installable-trigger restriction still applies. Change events also include a changeType, such as INSERT_ROW, but they do not identify exactly what changed or how; the handler may need to inspect the sheet’s current state. See Google’s installable-trigger guide and event-object reference.

Choose a processing path for programmatic writes

What you need Suitable approach Important constraint
React to a person editing cell values Simple onEdit(e) or an installable edit trigger Neither runs for script or API writes. Google’s simple-trigger guide and installable-trigger guide explain the restriction.
React to a person making a structural change, such as adding a row Installable onChange() trigger It is a separate event class and does not capture API writes. Google’s event-type reference describes the distinction.
Process a row written by an API or script Call the processing function directly, send an application-level notification, or use scheduled reconciliation These are workflow designs based on the trigger restriction, not automatic Apps Script responses to the write. Google’s simple-trigger guide and installable-trigger guide document the restriction.

Call shared processing logic after the write

For a pipeline you control, put the row-processing logic in a regular function. After the API write succeeds, call that function from the code responsible for the write. A user-edit handler can call the same function for human edits. This keeps the business logic reusable without relying on an API request to produce an edit event.

Rank #2
Google Sheet Cheat Sheet Mouse Pad, Large Mousepad Shortcuts for Google Excel Spreadsheet, Gaming Pad for Desk, Waterproof Anti Slip Keyboard Pad, Windows(80x40CM)
  • 【Google Shortcut Keys Mouse Pad 】- Extended Large Keyboard Shortcuts for Google Sheets, Mac Shortcuts,Window Spreadsheet Shortcuts Keys Shortcuts Gaming Keyboard Mouse Pad Mousepad Desk Mat
  • 【HD Printing】Printed with high-tech precision for vibrant colors and sharp details, this mouse pad provides quick access to essential functions—an ideal addition to any workspace
  • 【High Quality】Crafted from smooth microfiber cloth, this large gaming mouse pad offers a comfortable surface with reinforced stitched edges to prevent fraying. Its 3mm thickness ensures long-lasting durability
  • 【Perfect Fit】Measuring 31.5 x 15.7 inches, this mouse pad offers ample space for your keyboard, mouse, and other accessories—perfect for both work and gaming
  • 【Easy Maintain】Simply wipe with a damp cloth to keep your workspace clean and tidy
function handleEdit(e) {
  processRows(e.range);
}

function writeRowAndProcess(values) {
  // Perform the API write, then call the processing logic
  // after the write succeeds.
  processWrittenValues(values);
}

This is a workflow pattern, not a special trigger feature. Adapt the function arguments and error handling to the API client and the row-processing task.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Coordinate separate writer and processor systems

If one system writes the spreadsheet and another processes rows, have the writer send an explicit message or request after a successful write. Treat that as application-level coordination: it is not an Apps Script edit event. Choose a notification design that lets the processor identify the affected row and handle failures or retries appropriately.

Rank #3
Google SketchUp Keyboard Shortcut Sticker
  • Google SketchUp - New Color Keyboard Shortcut Sticker (keys 11.5x13 mm)
  • Keyboard Sticker Shortcut for Google SketchUp are laminated and made with typographical method on high-quality Matt Vinyl using non-toxic materials. Thickness - 80mkn. Made in USA.
  • High quality sticker for keyboard! Once you apply the stickers, you can start editing right away.Stickers help all types of users, from beginner to professional.
  • Shortcut will help improve your productivity by 15-40%, saving you time, while helping you enjoy your work
  • Keyboard Shortcut Google SketchUp . KEYBOARD NOT INCLUDED

Reconcile pending rows on a schedule

If processing can be delayed, mark rows as pending and run a time-driven job that finds and processes them. Google documents time-driven installable triggers, but a scheduled scan is an application design you build; it is not an automatic row-change callback. Google’s installable-trigger guide lists the available trigger types.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

If a person edited the cell and the handler still did not run

First confirm that the change was made by a person in the spreadsheet rather than by an API request or script. Then check that the simple trigger is in a supported bound-script context, or verify that the intended installable trigger is set up for the spreadsheet. Google notes that triggers do not run when a file is opened read-only and documents authorization and execution restrictions for simple triggers. See the simple-trigger guide.

Rank #4
Google Sheet Cheat Sheet Mouse Pad, Large Mousepad Shortcuts for Google Excel Spreadsheet, Gaming Pad for Desk, 31.5”x15.7” Waterproof Anti Slip Keyboard Pad, Mac (80x40CM)
  • 【Google Shortcut Keys Mouse Pad 】- Extended Large Keyboard Shortcuts for Google Sheets, Mac Shortcuts,Window Spreadsheet Shortcuts Keys Shortcuts Gaming Keyboard Mouse Pad Mousepad Desk Mat
  • 【HD Printing】Printed with high-tech precision for vibrant colors and sharp details, this mouse pad provides quick access to essential functions—an ideal addition to any workspace
  • 【High Quality】Crafted from smooth microfiber cloth, this large gaming mouse pad offers a comfortable surface with reinforced stitched edges to prevent fraying. Its 3mm thickness ensures long-lasting durability
  • 【Perfect Fit】Measuring 31.5 x 15.7 inches, this mouse pad offers ample space for your keyboard, mouse, and other accessories—perfect for both work and gaming
  • 【Easy Maintain】Simply wipe with a damp cloth to keep your workspace clean and tidy

When a handler does run, use its event object to determine what happened instead of assuming a particular cell. For example, Google’s edit-trigger example uses e.range to identify the edited range. The event object can also include the source spreadsheet and, for installable triggers, a trigger UID. Google’s event-object reference lists the available context.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An installable trigger runs under the account of the person who created it, so that account’s permissions apply. This affects authorization; it does not make programmatic writes trigger the handler. Google’s installable-trigger guide explains how these triggers run.

The narrow Form.submitGrades() exception

Google documents one exception to the installable-trigger rule: Form.submitGrades() can cause an installable form-submit trigger to run. That exception is specifically about submitting form grades and a form-submit trigger. It does not mean that a Sheets API write will fire onEdit. Google’s installable-trigger guide describes the exception.

Quick Recap

Bestseller No. 2
Bestseller No. 3
Google SketchUp Keyboard Shortcut Sticker
Google SketchUp Keyboard Shortcut Sticker
Google SketchUp - New Color Keyboard Shortcut Sticker (keys 11.5x13 mm); Keyboard Shortcut Google SketchUp . KEYBOARD NOT INCLUDED
$7.79

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.