Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Listener on edit of a document with Google Sheets API v4

I am running a script locally with Node.Js using the "Google Sheets API v4" to read and record data in a Google Sheets. I would like to know if it is possible to create a listener with the same API that it is triggered when someone edit a document?

Cheers!

like image 800
Pascal Landry Avatar asked Dec 28 '16 11:12

Pascal Landry


2 Answers

To create a listener without many API calls you need the drive push api, or you can check for changes.

The google sheets API does not support this feature.

like image 156
Elliott Beach Avatar answered Oct 03 '22 22:10

Elliott Beach


You can also use triggers via App Scripts, onEdit() is called after every edit.

https://developers.google.com/apps-script/guides/triggers

like image 28
gieoon Avatar answered Oct 03 '22 20:10

gieoon