Skip to content
Advertisement

Tag: google-apps-script

ToggleButton for Google HtmlService

What is the easiest way to get some kind of toggle switch for Google HtmlService? Google UiApp used to be able to create a simple ToggleButton like the following: var toggleButton = app.createToggleButton(‘ON’, ‘Off’).setId(‘MySwitch’); But UiApp has been deprecated. “Please use HtmlService instead” I’ve tried https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_radio_value https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_checkbox_value But found I cannot make them a two-stage item. Then I tried I

Give permission in a gmail addon

I’m trying to put together a script for Gmail in Google Apps Scripts add-on that will reply to all email on weekends with an out of office message: I keep getting this error however: Exception: The script does not have permission to perform that action. Required permissions: (https://www.googleapis.com/auth/gmail.labels || https://www.googleapis.com/auth/gmail.metadata || https://www.googleapis.com/auth/gmail.readonly || https://www.googleapis.com/auth/gmail.modify || https://mail.google.com/) This happened after I

JS sort array by two columns of Dates

I am trying to sort an multidimensional array by dates in two columns. Each element of the array looks like that [Thu Feb 25 10:00:00 GMT-05:00 2021, Tue Mar 09 10:00:00 GMT-05:00 2021, 1326M98301, 1326M98301, product 3, 1.0, 2.188120526039E12] I want to sort it first by the second column and then by the first. Lets say that first column is

Advertisement