google-apps-script-addon

Is there a way to use the same google-app-script in multiple different workbooks?

断了今生、忘了曾经 提交于 2020-08-20 11:19:16
问题 I have created 20+ Goolge Sheets workbooks. I have also written scripting to run each one. The one thing I would love to do is instead of have 20+ codes to run in each one, I would like to have 1 code that was used throughout each of my workbooks. Does anyone have any insite on how to make this happpen? I have tried using the library function. I am not sure if I am doing it correctly though. **//This is my Menu//** function onOpen() { var submenu = [{name: "Submit Order", functionName:

Add-on menu doesn't get created when published through G-Suite Marketplace SDK, but does through Chrome Web Store

独自空忆成欢 提交于 2020-07-31 05:01:08
问题 Whether by using createAddonMenu() or createMenu(), I can't create menu when add-on is installed through GSM, or when opened with "Integrate With Google" via G-Suite Marketplace SDK. "Test as add-on" via Script Editor works, installation via Chrome Web Store works, and I have no idea what might be wrong. I'm not sure if the script runs in the first place. I've tried existing solutions from StackOverflow such as calling functions in different order, but nothing seems to work. Does someone know

How to reproduce “You do not have access to perform that action” on onOpen that only creates a menu

China☆狼群 提交于 2020-07-08 13:27:26
问题 Tl;Dr My partner and I published a Google Sheets add-on that is "randomonly" throwing "You do not have access to perform that action" when opening a spreadsheet. The onOpen function doesn't require authorization to be executed. Is there a way to reproduce/debug this error? The following is "minimal complete and verifiable example" except that so far I was not able to reproduce the error. It is a simple onOpen function that the only thing that it does is to create a menu with two options. file

We're sorry, a server error occurred while reading from storage. Error code PERMISSION_DENIED

天大地大妈咪最大 提交于 2020-07-05 07:46:11
问题 I wrote a google scripts editor addon, and published it to the google marketplace with private visibility (it is only visible to the users in my organization). I tested the addon with all types of permissions (installed for current user, enabled in current document, installed and enabled) in the script editor, and everything works as intended. However, after publishing the addon to the marketplace and installing it in a test spreadsheet, I keep getting this error: We're sorry, a server error

G Suite Add-on refusing to connect to drive? How to solve “drive.google.com refused to connect” error?

走远了吗. 提交于 2020-06-29 05:47:06
问题 I am trying to use a G Suite Add-on called YAMM that I regularly use. Recently, I have been encountering an error "drive.google.com refused to connect" often. When I contacted the developer, they say it is Google's problem. How do I get it fixed? 回答1: This happens if you have signed in with multiple gmail accounts in your web browser. To solve this problem as an end user, open an incognito window, sign in with your gmail account used to install the add-on and use the addon - https:/

G Suite Add-on refusing to connect to drive? How to solve “drive.google.com refused to connect” error?

橙三吉。 提交于 2020-06-29 05:46:10
问题 I am trying to use a G Suite Add-on called YAMM that I regularly use. Recently, I have been encountering an error "drive.google.com refused to connect" often. When I contacted the developer, they say it is Google's problem. How do I get it fixed? 回答1: This happens if you have signed in with multiple gmail accounts in your web browser. To solve this problem as an end user, open an incognito window, sign in with your gmail account used to install the add-on and use the addon - https:/

Cannot create conference with 3rd party Conference Solution from conference solutions Dropdown in Google Calendar

浪子不回头ぞ 提交于 2020-06-28 03:56:21
问题 I am creating G-Suite add-on to integrate 3rd part conference solution with Google Calendar events. I added chosen 3rd party Conference Solution to manifest file: { "timeZone": "America/Denver", "dependencies": { "enabledAdvancedServices": [{ "userSymbol": "Calendar", "serviceId": "calendar", "version": "v3" }] }, "exceptionLogging": "STACKDRIVER", "oauthScopes": [ "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/admin.directory.user.readonly", "https://www

How to solve common errors in Google Apps Script development [closed]

两盒软妹~` 提交于 2020-06-22 10:42:26
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 9 days ago . Improve this question The Q&A is currently a subject of meta discussion - please, do participate. Current plan is to split where possible (and no canonicals exist) into separate Q&As. The answer to the question is a community wiki and the question intended to become one when the

Add container-bound script to a Google Docs file programmatically

人走茶凉 提交于 2020-05-15 05:43:18
问题 I am uploading files to Google Drive using the Drive REST API. I would like to have some default add-ons enabled on those files by default. I was reading about container-bound scripts here. But it is only possible to add container-bound script after opening the file in Google Docs UI. Is there any way to bind a script to a file while uploading or after uploading programmatically? 回答1: You can create the project of container-bound script type in Google Docs using Apps Script API. And when you

2 Time triggers - Google app scripts

谁说我不能喝 提交于 2020-04-30 09:28:49
问题 i looked at the google app script installable trigger docs online (https://developers.google.com/apps-script/support) , and one of the examples shows how 2 create 2 time triggers. function createTimeDrivenTriggers() { // Trigger every 6 hours. ScriptApp.newTrigger('myFunction') .timeBased() .everyHours(6) .create(); // Trigger every Monday at 09:00. ScriptApp.newTrigger('myFunction') .timeBased() .onWeekDay(ScriptApp.WeekDay.MONDAY) .atHour(9) .create(); } My code: function