onInstall() triggers run when a script is installed from the add-on store or the script gallery. But we don't have Un-Install trigger to track uninstallation of the add-on.
Is there any way to trigger onUninstall in Google Apps Script?
That is not supported. OnInstall makes sense to prepare your app first time. Uninstall doesnt make much sense since your app won't run again.
If you want to provide some cleanup, provide it on a menu as a regular feature.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more