Detecting changes from an add-on sidebar or dialog
You’ll find various techniques for this around this site, but they are all based on polling. This means that the client app running in the browser occasionally polls the Server and asks it to send back data about sheet being worked on. There is no simple way to have the Server contact the Client when it detects a change. That’s where Ephemeral exchange (efx), a cross platform cache, comes in.
To standardize and tailor access for Sheets push notification, you can use this library, cSheetEfx which contains all you’ll need in one place.
All the code mentioned here is on github.
These pages will walk you through getting this set up.
For more like this, see Google Apps Scripts snippets
Continue with the guidance on how to push changes from Google Sheets server to client by following the links below