google-apps-script

Debug a Google Apps Script which is triggered by post request?

痞子三分冷 提交于 2020-07-20 04:29:23
问题 I have a simple script in Google Sheets which is trigger by a command in Slack and just adds the Slack message as a new row. It is quite a simple function and is deployed as a web app and does work: function doPost(req) { var sheet = SpreadsheetApp.openById('[My Sheet Id]'); var params = req.parameters; Logger.log(params.text); sheet.appendRow(params.text); return ContentService.createTextOutput("Saved your entry:" + params.text); } However the Logger.log function never logs anything in the

Debug a Google Apps Script which is triggered by post request?

一笑奈何 提交于 2020-07-20 04:29:07
问题 I have a simple script in Google Sheets which is trigger by a command in Slack and just adds the Slack message as a new row. It is quite a simple function and is deployed as a web app and does work: function doPost(req) { var sheet = SpreadsheetApp.openById('[My Sheet Id]'); var params = req.parameters; Logger.log(params.text); sheet.appendRow(params.text); return ContentService.createTextOutput("Saved your entry:" + params.text); } However the Logger.log function never logs anything in the

pre-fill google form from google apps script

怎甘沉沦 提交于 2020-07-19 18:15:00
问题 I have a student registration form, there's student id which is a required field. I have a google apps script function which tells if this student is registered for any class or not. Is there a way to auto-fill the field course registered via calling the google apps script function yes or no. 回答1: Yes you can create a pre filled response with the forms ID, not that the pre filled fields are showed in the URL Function formPrefill(formId){ var form = FormApp.openById(formId); try{ var items =

pre-fill google form from google apps script

谁都会走 提交于 2020-07-19 18:13:33
问题 I have a student registration form, there's student id which is a required field. I have a google apps script function which tells if this student is registered for any class or not. Is there a way to auto-fill the field course registered via calling the google apps script function yes or no. 回答1: Yes you can create a pre filled response with the forms ID, not that the pre filled fields are showed in the URL Function formPrefill(formId){ var form = FormApp.openById(formId); try{ var items =

Eliminate Ref# Reference Does Not Exist Issue

陌路散爱 提交于 2020-07-19 06:40:21
问题 In the UpdateDemogInfoDA script, I allow the user to enter new information, capture that in another worksheet (JBD) and then overwrite the old info with the new info in the Sample Data tab. Then when new look up button is pushed, the formulas to look up based on the CustID populate. For some reason, and only for certain cells like Directions and Keycode, the data is getting converted to: REF#! Reference Does Not Exist error. I cannot figure out why. I am including the code for both the

Rate Limit Error to Nest Thermostat - Response Code 429

a 夏天 提交于 2020-07-19 06:06:06
问题 I use a very cool Google Script I found on Github (source: https://gist.github.com/beezly/9b2de3749d687fdbff3f) to fetch the temperature on my Nest thermostat and log it into a Google Spreadsheet. It is working great when I run the script manually, but not when I use a time trigger to run it automatically. When posting the credential to the API on this line: Line 12: var response = JSON.parse(UrlFetchApp.fetch('https://home.nest.com/user/login', options).getContentText()); The exception

Google app script,gmail addon get TextInput value

风流意气都作罢 提交于 2020-07-19 04:20:08
问题 I have create simple gmail addon using google script,in that i have struggle here, how to get textinput value when we perform some action,i have checked the document, i couldn't find any methods TextInput The below code i have tried, var card = CardService.newCardBuilder(); card.setHeader(CardService.newCardHeader().setTitle("Login Here")); var section = CardService.newCardSection() var cleint_id_Input = CardService.newTextInput() .setFieldName("client_id") .setTitle("Please enter clinet id")

Populate a Google Form responses from a Google Spreadsheet

|▌冷眼眸甩不掉的悲伤 提交于 2020-07-17 08:57:08
问题 I am trying (and not succeeding at the moment) to populate a Google Form from a Google Spreadsheet using the items that I have picked up from this website and this extremely useful answer provided by Mogsdad here. Ideally, I'm looking for: The Logger.log (URL) logs URL's for all the data stored in the spreadsheet, is it possible to just log the last entry and use this to generate the URL? Is it then possible for the pre-filled URL to auto submit once populated with the data? I have found this

How to call a function via a link/button on a Google Slide?

一曲冷凌霜 提交于 2020-07-16 06:48:27
问题 I want to be able to send a formatted email by clicking a link/button on a Google Slide. An example scenario would be sending a feedback form to all staff after a meeting, with the link on the very last slide. I already have the code for the email in Google Script and it works perfectly fine when I run it (I also have an HTML file for the format), but I cannot find a way to run it via a link/button on a slide. I would rather not run it every time the slide is open, only when a special link

How to call a function via a link/button on a Google Slide?

旧巷老猫 提交于 2020-07-16 06:48:07
问题 I want to be able to send a formatted email by clicking a link/button on a Google Slide. An example scenario would be sending a feedback form to all staff after a meeting, with the link on the very last slide. I already have the code for the email in Google Script and it works perfectly fine when I run it (I also have an HTML file for the format), but I cannot find a way to run it via a link/button on a slide. I would rather not run it every time the slide is open, only when a special link