3

I have an apps script that captures the onEdit event when I edit a certain Google Spreadsheet cell manually, and applies various formatting changes based on the change.

However, when I edit the same cell using the Google Drive API, the script doesn't seem to run.

Is there some way to trigger an event via the api which can be caught by the apps script? Or some other solution for this?

GJ.
  • 5,226
  • 13
  • 59
  • 82

1 Answers1

1

Publish as a web app:

it is possible to trigger Google apps script code using a URL, i.e. from the Google apps script editor Menu->publish->Publish as web app. You can then pass the id of the cell as a parameter to the "web app". and have the web app call the onEdit.

I suspect the "google-spreadsheet-api" has no way to do this, as even basic things such as "insert a row in the middle of a sheet", don't exist.

eddyparkinson
  • 3,680
  • 4
  • 26
  • 52