Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Apps Script Trigger Addon

The new Google Spreadsheets have add-ons like Google Analytics. They can generate an report using the GA API. Now I need to programmatically trigger this add-on function. However the add-on is not a script with functions, but a black box it seems. There are scheduleable triggers to run my own defined functions, but I see no way to talk to the add-on and start the "get data" function it provides to the user (within the Spreadsheet UI). Is there any way to run the add-on on a scheduled basis?

like image 941
mischa2002k2 Avatar asked Feb 14 '26 08:02

mischa2002k2


1 Answers

Unfortunately, I don't think so.

If methods in an add-on could be called programmatically, that add-on would be published as a Library. I did some digging and found the key of the Google Analytics add-on ("M6DHyOggPdtxTHKxmzonxqGg3No8Xsi1r"), tried to add it, and got the error:

You do not have access to library GoogleAnalytics, used by your script, or it has been deleted

A workaround might be to programmatically emulate a click on the appropriate menu item, but I don't believe that is currently supported by Apps Scripts.

like image 86
Stephen M. Harris Avatar answered Feb 17 '26 22:02

Stephen M. Harris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!