google-apps-script

Why is my script pushing an incorrect URL? [/u/2 inserted into script URL]

混江龙づ霸主 提交于 2021-02-05 12:00:52
问题 I'm an GAS novice, attempting to keep an application afloat during a time of transition, and the following issue began presenting recently. Although the script is pushing a URL (for another published script) into a menu item link ... (see images) ...the URL set via the script is not what is being accessed by some (not all) individuals in the published application. Rather than their link opening a URL beginning with "https://script.google.com/macros/s/AK..." , some users being directed to URLs

Why is my script pushing an incorrect URL? [/u/2 inserted into script URL]

跟風遠走 提交于 2021-02-05 12:00:07
问题 I'm an GAS novice, attempting to keep an application afloat during a time of transition, and the following issue began presenting recently. Although the script is pushing a URL (for another published script) into a menu item link ... (see images) ...the URL set via the script is not what is being accessed by some (not all) individuals in the published application. Rather than their link opening a URL beginning with "https://script.google.com/macros/s/AK..." , some users being directed to URLs

getRange(string) works but getRange(number) fails [duplicate]

梦想与她 提交于 2021-02-05 11:58:27
问题 This question already has an answer here : How to declare a variable range to a spreadsheet? (1 answer) Closed 4 months ago . Below is code without an explanation, that i will add later, as SO doesn't like something. I will keep adding to this section until it is happy, and then paste in the actual later. Basically just look for comment lines 'works' and 'fails'... actually, i finally added a comment below, as SO seems to not like it in the body... sorry... /* * Sends emails with data from

Blob attachments in MailApp.sendEmail?

我的梦境 提交于 2021-02-05 11:34:29
问题 I have a PDF and fetch its contents and store it in a Blob. However, I"m not able to attach this blob as an attachment to an email using MailApp.sendEmail() The attachments paramter of options says "files to send in an email. Each item is a JavaScript objects with the following properties: String fileName, String mimeType (optional) and String content." Although, I can set the mimeType to 'application/pdf', it doesn't work - probably because of the encoding involved. Here is a sample code var

Blob attachments in MailApp.sendEmail?

核能气质少年 提交于 2021-02-05 11:34:07
问题 I have a PDF and fetch its contents and store it in a Blob. However, I"m not able to attach this blob as an attachment to an email using MailApp.sendEmail() The attachments paramter of options says "files to send in an email. Each item is a JavaScript objects with the following properties: String fileName, String mimeType (optional) and String content." Although, I can set the mimeType to 'application/pdf', it doesn't work - probably because of the encoding involved. Here is a sample code var

Trying to create a script that on form submit sends an email to the submitter if they answered false

…衆ロ難τιáo~ 提交于 2021-02-05 11:31:23
问题 I'm looking on form submit to send an email to the submitter if they filled any of the questions as false, but the script is sending emails to any submitter who entered all true as well. I know the if script works with numbers as I used it in another project but when I changed the question to true false it seems to have broken the if statement. I also know the rest of the script works because it worked before I added the "if (certification == 'FALSE') {" line. var EMAIL_SENT = 'EMAIL_SENT';

How to get the list of all sheet in a dropdown list in a sidebar

冷暖自知 提交于 2021-02-05 11:24:11
问题 I'm working in an sidebar menu in an google sheet, to set some variables that i need in my script. My script is already working. It is easy, on form submit, it will create an event in my calendar. However, in order to simplify the installation of my script, I would like to show a dropdown list in my sidebar with the names of all the sheet of my worksheet. I see various post, that show how to do a dropdown list like this : How to create a drop down list in Input Box? How can I create a HTML

Google Script checking that the data within one column on one sheet is the same as another column in another sheet

萝らか妹 提交于 2021-02-05 11:14:29
问题 I am trying to create a Google Script to check that the data within one column on one sheet is the same as another column in another sheet, any ideas where I am going wrong? Thanks :) Code below: function myFunction() { //data from Salesworks var sheet = SpreadsheetApp.getActive().getSheetByName("Sales Works TEST"); var data_salesworks = sheet.getRange('D3:D121').getValues(); //data from Google Form var sheet = SpreadsheetApp.getActive().getSheetByName("V3 New Form Responses"); var data_sheet

Google Script checking that the data within one column on one sheet is the same as another column in another sheet

回眸只為那壹抹淺笑 提交于 2021-02-05 11:13:57
问题 I am trying to create a Google Script to check that the data within one column on one sheet is the same as another column in another sheet, any ideas where I am going wrong? Thanks :) Code below: function myFunction() { //data from Salesworks var sheet = SpreadsheetApp.getActive().getSheetByName("Sales Works TEST"); var data_salesworks = sheet.getRange('D3:D121').getValues(); //data from Google Form var sheet = SpreadsheetApp.getActive().getSheetByName("V3 New Form Responses"); var data_sheet

Comparing Dates in Google Sheets Script Editor

有些话、适合烂在心里 提交于 2021-02-05 10:01:31
问题 I am very new to this, so please bear with me. I am trying to get my code to look at each cell in a column, then compare that date to the current date, and if they match send an email. I am aware I will need a loop of some sort to get it to look through the column, but I haven't even gotten that far. I've tried every method I can find online to just get it to compare one cell to the date and send the email. I tested the email function prior to adjusting it to compare the date, so I know that