google-apps-script-addon

2 Time triggers - Google app scripts

白昼怎懂夜的黑 提交于 2020-04-30 09:27:21
问题 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

Can't get menu item to show in an unpublished add-on for google document

落花浮王杯 提交于 2020-04-17 22:54:29
问题 My code look like that: function onInstall(e) { onOpen(e); } function onOpen(e) { DocumentApp.getUi().createAddonMenu() .addItem("Format Your Text", "autoFormatting") .addToUi(); } function autoFormatting() { //some code } I have set a project in Google Cloud Platform and linked in to my Google Apps Script unbound project. Enabled the G Suit Marketplace SDK and configured it. The version is the correct one. When I test the script as add-on in any state (installed/enabled/both) the menu item

How to shuffle every second column with google apps script?

自闭症网瘾萝莉.ら 提交于 2020-04-16 06:09:11
问题 I want to randomize D:E, F:G, H:I, J:K if C is 4 with google apps script. At the moment I use this inefficient & time-consuming code: function shuffleAnswers() { var arr = [0, 2, 4, 6]; for (var i = 2; i < lastRow()+1; i++) { var amount = sheet().getRange(i,3).getValue(); if (amount == 4) { var source = sheet().getRange(i,4,1,2); var column = 4 + arr[(Math.random() * arr.length) | 0]; var destination = sheet().getRange(i,column,1,2); var valuesSource = source.getValues(); var

Google Apps Script withSuccessHandler is running before function fully executes

橙三吉。 提交于 2020-01-16 16:58:54
问题 I have two files in an Apps Script project. One is a .gs file acting as a "server" and one is a .html file containing JavaScript as per Google's Apps Script guidelines. Everything has been going swimmingly for the first 40 hours of development on this project. I have the following line of code outside of any function, in between two tags in the .html file: google.script.run.withSuccessHandler(setSheetData).getSheetData(); Documentation: https://developers.google.com/apps-script/guides/html

Google Apps Script withSuccessHandler is running before function fully executes

拟墨画扇 提交于 2020-01-16 16:57:01
问题 I have two files in an Apps Script project. One is a .gs file acting as a "server" and one is a .html file containing JavaScript as per Google's Apps Script guidelines. Everything has been going swimmingly for the first 40 hours of development on this project. I have the following line of code outside of any function, in between two tags in the .html file: google.script.run.withSuccessHandler(setSheetData).getSheetData(); Documentation: https://developers.google.com/apps-script/guides/html

Is it possible to publish a Google Apps Script Web App to G Suite Marketplace?

纵然是瞬间 提交于 2020-01-11 06:16:51
问题 I know it is possible to publish a Google Script Web App to Chrome Web Store, but it's possible to publish in Google Suite Marketplace? There's no "Publish to Marketplace" option in GAS editor, but I've looked at a Google Script-based apps manifest files from Chrome Web Store, and I think there's a possibility to do it. Unfortunately, I have some troubles with the last step of publishing (filling out the Google G Suite Marketplace Listing Review Request) so I'm not sure if a Google Script

Is it possible to publish a Google Apps Script Web App to G Suite Marketplace?

╄→гoц情女王★ 提交于 2020-01-11 06:16:43
问题 I know it is possible to publish a Google Script Web App to Chrome Web Store, but it's possible to publish in Google Suite Marketplace? There's no "Publish to Marketplace" option in GAS editor, but I've looked at a Google Script-based apps manifest files from Chrome Web Store, and I think there's a possibility to do it. Unfortunately, I have some troubles with the last step of publishing (filling out the Google G Suite Marketplace Listing Review Request) so I'm not sure if a Google Script

How to show/hide loading spinner in addon sidebar while Google Picker dialog is opened/closed?

北城余情 提交于 2020-01-06 06:59:55
问题 I followed this tutorial: https://developers.google.com/apps-script/guides/dialogs#file-open_dialogs and I can open a Google Picker after clicking a button inside my addon sidebar. I want to do 2 things for better UX for my users: The first thing is when the Google Picker is open, I want to show a loading spinner inside my addon sidebar (to prevent users from interacting with the sidebar), so that users can only interact with the Google Picker until it's closed After users choose a document

Unable to test add-on under 'Installed for current user' config (i.e. AuthMode.NONE)

拥有回忆 提交于 2020-01-04 06:13:11
问题 I'm trying to build my first editor add-on where the same codebase is supposed to work on Docs, Sheets and Slides. I'm still in the testing phases and that's where I've hit a roadblock. Here's the problem - As per the documentation for Installed versus enabled, if one were to select a test config as Installed for current user (but not yet enabled it), the Menu is supposed to be visible (this would be under AuthMode.NONE ); however, per my script, its throwing me an error that indicates -

There is no API Console project with the id specified in the manifest's api_console_project_id field

浪子不回头ぞ 提交于 2020-01-02 00:12:50
问题 I am trying to publish a spreadsheet web add-on but getting following error. There is no API Console project with the id specified in the manifest's api_console_project_id field Can anyone tell me why I am getting this error ? 回答1: Gosh... not sure why this was so hard. If Google are reading this: it'd be more user-friendly to run the various API checks before the user selects to publish their add-on and/or provide a link to the correct documentation! Then fix that super cryptic error message