DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
Mountain View desk3 min

Google Sheets API Writes: Why onEdit Doesn’t Run and What to Do

A successful Sheets API write does not run onEdit. Use an explicit processing call, notification, or scheduled reconciliation for programmatic changes.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If a Google Sheets API request successfully writes a row, that write still will not run onEdit(e). Google says script executions and API requests do not cause triggers to run; the same restriction applies to simple and installable triggers. To process API-written rows, call the processing function from the code that performs the write, send an explicit notification to a separate processor, or schedule a job to find pending rows.

Why a successful API write does not fire onEdit

onEdit(e) is a response to a person changing a cell value in the spreadsheet, not a general callback for every change to a sheet. Google’s Apps Script documentation states that “Script executions and API requests don’t cause triggers to run.” It gives the example that calling Range.setValue() does not cause the spreadsheet’s onEdit trigger to run. Google’s simple-trigger documentation explains this restriction.

As an Amazon Associate I earn from qualifying purchases.

Installing an edit trigger does not change the result: Google says installable triggers also do not run when the event results from a script execution or API request. There is a narrow exception for Form.submitGrades() and installable form-submit triggers, but it does not apply to a Sheets API write or make that write fire onEdit. Google’s installable-trigger documentation describes the restriction and exception.

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

Choose a workflow for the kind of change

What needs a response Suitable mechanism Constraint
A person edits cell values Simple onEdit(e) or an installable edit trigger Neither fires for script or API writes. Google’s simple-trigger guide; installable-trigger guide.
A person makes a structural change, such as inserting a row Installable onChange() trigger This is a different event class, and it does not bypass the restriction on script and API actions. Google’s installable-trigger guide; EventType reference.
A script or API writes a row that must be processed Call the processing function explicitly, notify a processor, or reconcile pending rows on a schedule These are application workflow designs, not automatic row-change triggers prescribed by Google.

Handle API-written rows explicitly

Call the processor after the write

For a pipeline whose writer you control, call the row-processing function after the API write succeeds. Keep business logic separate from the trigger wrapper: the user-edit handler and the API-writing path can both call the same function, while the API path does not depend on a trigger that will never fire for its write.

#1 Best Overall
Sale
Amazon Basics Wired QWERTY Keyboard, Works with Windows, Plug and Play, Easy to Use with Media Control, Full-Sized, Black
  • KEYBOARD: The keyboard works for Windows with hot keys that enable easy access to Media, My Computer, Mute, Volume up/down, and Calculator
  • EASY SETUP: Experience simple installation with the USB wired connection
  • VERSATILE COMPATIBILITY: This keyboard is designed to work with multiple Windows versions, including Vista, 7, 8, 10 offering broad compatibility across devices.
  • SLEEK DESIGN: The elegant black color of the wired keyboard complements your tech and decor, adding a stylish and cohesive look to any setup without sacrificing function.
  • FULL-SIZED CONVENIENCE: The standard QWERTY layout of this keyboard set offers a familiar typing experience, ideal for both professional tasks and personal use.

Notify a separate processor

If one system writes the row and another processes it, have the writer send an explicit message or request after a successful write. Treat this as application-level coordination; it is not an Apps Script edit event.

Reconcile pending rows

If processing can wait, mark new rows as pending and use a time-driven job to scan for them. Google documents installable time-driven triggers, but finding and processing pending rows is an application pattern you implement—not an automatic callback for rows written through the API or a script. Google’s installable-trigger guide.

Rank #2
Sale
Logitech K120 Full Size Wired Keyboard USB Plug-and-Play Windows - Black
  • All-day Comfort: The design of this standard keyboard creates a comfortable typing experience thanks to the deep-profile keys and full-size standard layout with F-keys and number pad
  • Easy to Set-up and Use: Set-up couldn't be easier, you simply plug in this corded keyboard via USB on your desktop or laptop and start using right away without any software installation
  • Compatibility: This full-size keyboard is compatible with Windows 7, 8, 10 or later, plus it's a reliable and durable partner for your desk at home, or at work
  • Spill-proof: This durable keyboard features a spill-resistant design (1), anti-fade keys and sturdy tilt legs with adjustable height, meaning this keyboard is built to last
  • Plastic parts in K120 include 51% certified post-consumer recycled plastic*
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Do not confuse an edit trigger with a change trigger

Google distinguishes ON_EDIT, such as a user entering a cell value, from ON_CHANGE, such as a user adding a row. The EventType reference documents these event classes. Use an edit trigger for user-entered values and an installable change trigger when your workflow depends on user-driven structural changes. Switching to onChange() is not a workaround for API writes: installable triggers retain the script/API restriction.

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

Change events include a changeType, such as INSERT_ROW, but do not identify exactly what changed or how. Code may need to inspect the current sheet state to determine what to do. Google’s event-object documentation describes the available event context.

Quick Recap

SaleBestseller No. 1
SaleBestseller No. 2
Logitech K120 Full Size Wired Keyboard USB Plug-and-Play Windows - Black
Logitech K120 Full Size Wired Keyboard USB Plug-and-Play Windows - Black
Plastic parts in K120 include 51% certified post-consumer recycled plastic*; Product carbon footprint: 4.02 kg CO2e
$12.39
Bestseller No. 3
Rii RK907 Ultra-Slim Compact USB Wired Keyboard for MAC and PC-Black(1PCS)
Rii RK907 Ultra-Slim Compact USB Wired Keyboard for MAC and PC-Black(1PCS)
Simple Wired USB Connection,You will enjoy a comfortable and quiet typing experience
$9.99
SaleBestseller No. 4
Logitech MK120 Full Size Wired Keyboard and Mouse Combo - Black
Logitech MK120 Full Size Wired Keyboard and Mouse Combo - Black
Product carbon footprint: 5.03 kg CO2e
$17.77
SaleBestseller No. 5
Lenovo 300 USB Keyboard, Wired, Adjustable Tilt, Ergonomic, Windows 7/8/10, GX30M39655, Black
Lenovo 300 USB Keyboard, Wired, Adjustable Tilt, Ergonomic, Windows 7/8/10, GX30M39655, Black
This full-size keyboard includes concaved key caps fitted for your fingertips; The complete ergonomic design includes an adjustable tilt to improve your typing comfort
$13.39
Best Value
Sale
Lenovo 300 USB Keyboard, Wired, Adjustable Tilt, Ergonomic, Windows 7/8/10, GX30M39655, Black
  • The Lenovo 300 USB keyboard offers an intuitive and comfortable island key design with 2 5 zone layout including separate number pad
  • This full-size keyboard includes concaved key caps fitted for your fingertips
  • Spill resistant keys with a board drain help keep your PC keyboard protected and keep you productive
  • The complete ergonomic design includes an adjustable tilt to improve your typing comfort
  • OS independent – This convenient computer keyboard works with laptops desktops and any computer with a USB port
Rank #4
Sale
Logitech MK120 Full Size Wired Keyboard and Mouse Combo - Black
  • Durable and Reliable: This USB keyboard features a curved space bar, spill-resistant design (2), durable keys that can withstand 10 million keystrokes, and sturdy, adjustable tilt legs
  • Comfortable, Familiar Typing: You’ll enjoy a comfortable and familiar typing experience thanks to the deep-profile keys and standard layout with full-size F-keys and number pad
  • Full-size Sculpted Mouse: The high-definition optical USB mouse puts comfort and control in your hands with smooth, accurate tracking and an ambidextrous shape that feels good hour after hour
  • Simple Set-Up: Simply plug the keyboard and mouse into the USB ports on your desktop, laptop, or netbook and you're ready to work; compatible with Windows 7, 8, 10 or later
  • Clear and Convenient: The bold, bright white and long-lasting characters make the keys on this PC or laptop keyboard easy to read and extra durable
Rank #3
Rii RK907 Ultra-Slim Compact USB Wired Keyboard for MAC and PC-Black(1PCS)
  • A plug-and-play USB connection with Low-profile keys give you a quiet, comfortable typing experience
  • Simple Wired USB Connection,You will enjoy a comfortable and quiet typing experience
  • The keyboard for business and office working is the budget-friendly keyboard that is built for longer use
  • Low profile keys for a more comfortable and quiet keystroke, desktop-centric design, splash resistant

If an actual person’s edit does not run the handler

  1. Confirm the source. Establish that a person edited the cell in Sheets, rather than an API request or script. Those programmatic writes do not fire the trigger.
  2. Check the trigger setup. A simple trigger must be in a supported bound-script context; for an installable trigger, confirm that the intended trigger exists for the spreadsheet. Google notes that triggers do not run when a file is opened read-only and that simple triggers have authorization and execution restrictions. Google’s trigger guide.
  3. Inspect the event object. Use the event context rather than assuming which cell changed. Google’s example accesses the edited range with e.range; Sheets event objects can include the source spreadsheet and, for installable triggers, a trigger UID. Google’s event-object guide.
  4. Check the installable trigger’s owner. Installable triggers run under the account of the person who created them, so that account’s authorization and permissions apply. This affects execution context, but it does not make API or script writes trigger the handler. Google’s installable-trigger guide.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.