google-apps-script-simple-triggers

UrlFetchApp.fetch() simply does not work in onEdit trigger

江枫思渺然 提交于 2019-12-01 03:24:07
I'm looking to call UrlFetchApp.fetch() based on user input on a sheet but nothing happens. No errors, just silently ignores the call. Same goes for MailApp.sendEmail() and GmailApp.sendEmail() This is on a Google Apps domain, and only domain users are using the Google Sheet. Simple triggers like onOpen or onEdit are not able to do anything that requires authorization like sending mails because they run silently and anonymously. This is all explained in the documentation . You should simply rename your onEdit function to something else - SpecialOnEdit for example ? - and create an installable

UrlFetchApp.fetch() simply does not work in onEdit trigger

末鹿安然 提交于 2019-11-30 22:55:45
问题 I'm looking to call UrlFetchApp.fetch() based on user input on a sheet but nothing happens. No errors, just silently ignores the call. Same goes for MailApp.sendEmail() and GmailApp.sendEmail() This is on a Google Apps domain, and only domain users are using the Google Sheet. 回答1: Simple triggers like onOpen or onEdit are not able to do anything that requires authorization like sending mails because they run silently and anonymously. This is all explained in the documentation . You should

Google Sheets OnEdit() - You do not have permission to call showModalDialog

大城市里の小女人 提交于 2019-11-26 22:07:27
问题 Since the beginning of this month this code has not more been working function onEdit(e){ var html = HtmlService.createTemplateFromFile( 'MyHtmlFile' ) .evaluate() .setWidth( 800 ) .setHeight( 400 ); SpreadsheetApp.getUi() // Or DocumentApp or FormApp. .showModalDialog( html, 'My page title' ); } When I edit a Spreadsheet's cell NO pop up is shown but I got this error in the console : Google Apps Script: You do not have permission to call showModalDialog 回答1: The onEdit() will have to be an