{
  "id": 7282868,
  "title": "Your API wrote the row. Why did onEdit not run?",
  "url": "https://urgent.news/2026/09/14/your-api-wrote-the-row-why-did-onedit-not-run",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-14T08:50:25.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/bulldo_gs/your-api-wrote-the-row-why-did-onedit-not-run-c6k"
  },
  "original_language": "en",
  "account": "A successful spreadsheet write and a successful event handler are two distinct observations. It is possible for a write to occur without the corresponding event handler appearing in the execution history. Modifying permissions might address the perceived issue, but it is not the correct solution. Google's documentation confirms that script executions and API requests do not trigger spreadsheet triggers. An onChange handler is not a substitute for processing a Sheets API write. To distinguish between a script write and an event, you can create a test Sheet using the provided MIT-licensed event recorder. This tool logs handler labels and event-shape metadata without copying any cell values, form answers, document IDs, or user identities. Create a tab called \"TriggerProbe\" and paste the recorder into its bound Apps Script project. Save the file and add three specific triggers for spreadsheet edits, changes, and form submissions. Check for the presence of an onEdit execution and a simple-edit log, which serves as your positive control. From the project trigger panel, add probeInstalledEdit for spreadsheet edits, probeChange for changes, and probeSheetSubmit for form submissions. Review the consent settings and use a single installer account. Do not add any additional triggers to the reserved onEdit. Repeat the edit process and submit fictional data through a disposable Form linked to this Sheet. Run the writeTriggerProbe function to confirm that a script write occurred, not an event. The completion message from writeTriggerProbe will verify this distinction. Do not infer delivery from the cell changing; instead, record a fixed observation window and any handler executions. Ensure that the observations are based on the actual event delivery, not just the cell content change. If you have a Google Sheets API client authorized, use the values.update method with RAW to write the string \"api-probe\" to the same cell. Keep the response separate from the trigger logs. If you do not have API authorization, record \"not run\" instead. Do not press Run on an event handler, as the editor does not provide the event. After completing the test, remove the three installed triggers and confirm that they have been removed from the list. Delete the recorder code as well, as a saved simple onEdit will survive the trigger list cleanup. Dispose of the disposable artifacts, including the disposable Sheet and Form. Note that this recorder provides local fixture checks rather than measured Google event-delivery results. Document the expectations, actual observations, and any cases that did not run separately in your notes. For a comprehensive diagnostic and cleanup guide, refer to the canonical version. The sources for this information include Google's trigger restrictions, event objects, and the Sheets API values.update documentation.",
  "summary": "A successful spreadsheet write and a successful event handler are two separate observations. If your integration writes a row and the handler never appears in execution history, changing its permissions may solve the wrong problem. Google documents that script executions and API requests do not activate these spreadsheet triggers. An installable onChange is not a workaround for a Sheets API…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}