google-apps-script-addon

How to copy a Google sheet and keep it's project triggers and scripts?

三世轮回 提交于 2021-02-10 16:16:00
问题 I currently have a Google Sheet that I'm using as a master template. That is, I'm making a copy of this template for every request. I want to add a Google App Script (which onEdit POSTs to my server when the sheeting is completed) to my master template that will be duplicated and run for every copy of this template. I've tried doing this from an admin account, however, the scripts don't seem to 'stick' with any of the templates. Is this possible? 回答1: Installable triggers can be attached to

How to copy a Google sheet and keep it's project triggers and scripts?

99封情书 提交于 2021-02-10 16:14:59
问题 I currently have a Google Sheet that I'm using as a master template. That is, I'm making a copy of this template for every request. I want to add a Google App Script (which onEdit POSTs to my server when the sheeting is completed) to my master template that will be duplicated and run for every copy of this template. I've tried doing this from an admin account, however, the scripts don't seem to 'stick' with any of the templates. Is this possible? 回答1: Installable triggers can be attached to

Time Trigger on Google Sheet Add On

我与影子孤独终老i 提交于 2021-02-08 11:24:04
问题 I have created a Google Apps Script and now want to publish it as a Google Sheet add on. The way script should work is to fetch some details from an API on daily basis (via the time trigger) and send notification to the installer if any new information is found in the data fetched via the API. When people install this add-on, I want it to run automatically for them everyday, and send them email when changes are found as above. Is this doable with google sheet add on? 回答1: Yes it is feasible,

Time Trigger on Google Sheet Add On

别说谁变了你拦得住时间么 提交于 2021-02-08 11:23:42
问题 I have created a Google Apps Script and now want to publish it as a Google Sheet add on. The way script should work is to fetch some details from an API on daily basis (via the time trigger) and send notification to the installer if any new information is found in the data fetched via the API. When people install this add-on, I want it to run automatically for them everyday, and send them email when changes are found as above. Is this doable with google sheet add on? 回答1: Yes it is feasible,

add-on with LIMITED auth cannot open sidebar

坚强是说给别人听的谎言 提交于 2021-02-06 12:47:42
问题 I have a Google docs add-on which is programmed to open the sidebar as soon as the document is open. Of course this requires the add-on to be installed and enabled in the document. I see that, since a week, the sidebar auto open feature, which is very useful in our use case, no longer works. In StackDriver logs I see this report : onOpen(): {authMode=LIMITED, source=Document, user=} publi-2.0.72-2017-11-27-18-57 [this is the publication version tag] 2017-11-27T18:02:50.126Z : show menu 2017

Display PDF viewer inside the Google Apps Script Dialog

我们两清 提交于 2021-02-04 08:21:20
问题 I want to display a PDF inside a Dialog of a Google Spreadsheet Add-on Dialog. more about apps script dialog can be found here https://developers.google.com/apps-script/guides/html/ <iframe id="iframe" src="https://www.w3docs.com/uploads/media/default/0001/01/540cb75550adf33f281f29132dddd14fded85bfc.pdf" frameborder="0" height="500px" width="100%"></iframe> When I inspect, I see the message Resource interpreted as Document but transferred with MIME type application/pdf: "https://www.w3docs

Install trigger for google app script in custom addon

倾然丶 夕夏残阳落幕 提交于 2021-01-29 21:53:32
问题 I am still very new to addons and I am having trouble to install triggers and have the related functions to run. Below is the function to add 1 "on open" trigger and 1 "on edit" trigger to the sheet. function addTriggers() { var sheet = SpreadsheetApp.getActiveSheet(); var triggers = ScriptApp.getUserTriggers(sheet); if(triggers.length!=2)// { ScriptApp.newTrigger('sheetOpen') .forSpreadsheet(sheet) .onEdit() .create(); ScriptApp.newTrigger('sheetEdited') .forSpreadsheet(sheet) .onOpen()

Install trigger for google app script in custom addon

那年仲夏 提交于 2021-01-29 16:19:13
问题 I am still very new to addons and I am having trouble to install triggers and have the related functions to run. Below is the function to add 1 "on open" trigger and 1 "on edit" trigger to the sheet. function addTriggers() { var sheet = SpreadsheetApp.getActiveSheet(); var triggers = ScriptApp.getUserTriggers(sheet); if(triggers.length!=2)// { ScriptApp.newTrigger('sheetOpen') .forSpreadsheet(sheet) .onEdit() .create(); ScriptApp.newTrigger('sheetEdited') .forSpreadsheet(sheet) .onOpen()

Can I use Slides API to add an “Agree to Terms” dialogue before allowing viewer access to a Slides presentation?

浪子不回头ぞ 提交于 2021-01-29 10:16:23
问题 I have a Google Slides presentation that I'd like to gate with a request to agree to "Terms & Conditions" before viewing. (The dialogue box would include an external link to the legal fine print.) I see that with Google App Script adding a dialogue box is possible, but if one can be customized in this manner is unclear to me. Thanks in advance for any help on this. 回答1: You want to open a dialog, when users open the Google Slides. In this case, users are logged in to each Google account. You

Apps Script Addon: How to track admin domain install?

亡梦爱人 提交于 2021-01-28 14:39:48
问题 I'm trying to get the list of emails of users who installed my addon. I'm using the onInstall trigger to get the email and push it to my database. This is fine with individual installation (normal gmail or even admin who chooses to Individual Install) But with Domain Install , onInstall event was not fired So how can I track the Domain Installation? 回答1: We can use the LicenseNotification endpoint of the G Suite Marketplace API: https://developers.google.com/gsuite/marketplace/v2/reference