Questions tagged [google-apps-script]

Use for questions about Google Apps Script, Google's server side Javascript-based cloud scripting platform for automating tasks across Google products and third-party services. Use in addition to relevant product-specific (e.g. [google-sheets], [google-docs]) or API-specific (e.g. [google-drive-api]) tags where applicable

Google Apps Script Logo

Google Apps Script is a server side Javascript-based cloud scripting platform for automating tasks across Google products and third-party services.

Here you'll find links to wonderful resources, helpful tips on asking better questions, and secret chat room links.


How to ask?

General information:
  • Well researched questions are better received by the community. You can start researching by reading or searching the issue in the official developer documentation and the FAQ. Don't ask questions because you want to know the answer, ask questions because you want others to know the answer!

  • Avoid asking questions that are goal oriented. Split up your goal into smaller questions and ask them one by one. For eg, avoid asking "How to create a Google sheet with sports information from this API?". Instead, start writing your code and if you run into a problem getting the correct information, ask "How to send the correct authentication request to this sports API using my username and password, as sending it directly gives me 404?". The latter is a programming question. The former is a business project. Asking volunteers to do unpaid work is frowned upon. See Why is "Can someone help me" not a actual question?

  • Always provide minimal reproducible example. The code should be as minimal as possible, preferably within ten to fifteen lines of code. This requires you to debug your code and takes effort on your part. You can start the process by "Starting from scratch". Don't start with where you are and start reducing. Start from scratch and start adding one by one. See minimal reproducible example.

  • If you reach this point and you are still struggling on how to fix / improve your first question, please read What is the proper way to approach Stack Overflow as someone totally new to programming?. You might also post a question on Meta Stack Overflow including a link to your post. If you get an error when trying to post to Meta, please checkout I'm asking a question about my own post, but I'm still prompted that I need 5 reputation to post here. What gives?.

Specific information:

Tag usage guidance

This is a summary of tags related to Google Apps Script and how to use them in the question being asked.


Community Chat Room

Note: Stack Overflow chat requires a minimum reputation of 20 or be "invited" by a Stack Overflow moderator.


Official Resources


Community Resources


Best Practices


FAQ:

:

53079 questions
5
votes
4 answers

A summary of all Google Apps Script triggers in my account

Is there any place where I can see the summary of all the Apps Script timed triggers installed for all my documents on Google Drive?
the-happy-hippo
  • 1,203
  • 1
  • 9
  • 13
5
votes
1 answer

Apps Script - Programmatically submit answers from Google Sheet to Google Form - ERROR - "Sorry, this response has already been submitted."

I have a Google Form and a Google Spreadsheet. timestamp | name | email | revenue | Edit Url 2015-2-2 02:22:22 | David | | | 2015-2-2 07:22:22 | Paul | | | 2015-2-2 09:22:22 | Olive | | …
Cyzanfar
  • 6,997
  • 9
  • 43
  • 81
5
votes
1 answer

Character encoding issue when using Google Apps Script to extract data from web page

I have written a script using Google Apps Script to extract text from a web page into Google Sheets. I only need this script to work with a specific web page, so it does not need to be versatile. The script works almost exactly as I want it to…
5
votes
2 answers

Creating a script that runs every second

I am trying to create a script that edits a particular cell on a particular sheet every second with a random text like, "SetTime". This Particular Cell is: X2 This Particular Sheet is: "System_Info" You may ask why I need this, essentially, I have a…
Shaun Cockram
  • 101
  • 1
  • 2
  • 10
5
votes
3 answers

Google apps script execution API service authorization fails once per hour

I'm executing a Google apps script with my C# app about once every 1.5 minutes. The apps script moves content between spreadsheets, and edits sheets. I also use the Drive API. My script runs fine over long periods, except for the fact that I get an…
5
votes
1 answer

Cannot call FormApp.getUi() from bound Google Forms script

As the title says, I'm trying to get the UI of a Google Form from a script, so that I can show an alert box to the user with some information. This is the relevant part of the function: function Foobar(){ ... var ui = FormApp.getUi(); …
Christian Fratta
  • 294
  • 3
  • 10
5
votes
3 answers

Get current Month Google Apps Script (a lot of IF-statements)

I have done a script that prints out the current month in the Logger. I think this could be done in a better way with Arrays. This is what I have so far: function myFunction() { var date = new Date(); var mt = date.getMonth(); var currentD …
John Smith
  • 387
  • 2
  • 8
  • 24
5
votes
1 answer

How to Edit existing google form item (question) using google Apps Script

I have a Google script to construct a google form. The script fills the form using a Spreadsheet which contains the questions and corresponding options. The question displayed in the form needs to be updated at regular intervals. I hope to update…
Abhi
  • 177
  • 1
  • 3
  • 16
5
votes
1 answer

Is it possible to convert a bound script to a standalone script?

I thought by using "Save a Copy" from a bound script, I would create a standalone version. After I copied the script, I wasn't able to find the script from my Google Drive. Is it possible to do what I'm trying to do?
user1113883
5
votes
1 answer

Google Apps Script Add-On Source Code/Security

I'm building a Google Apps Script Add-On and wanted to know whether anyone can access the underlying source code when I publish it to the Marketplace? I want to store a password/private key in the code and wanted to make sure no one who installs…
Zahir Ally
  • 326
  • 3
  • 5
5
votes
2 answers

Menu items do not appear in Google Sheets add-on

I am trying to make this add-on plugin that can help me and other to export sheet in to JSON. In my testing it's the menu shows up and all the functionality works (as you see in screenshots). When I sent for publish on Google Web Store the "Docs…
5
votes
3 answers

Google Apps Script targeting header on doc with different first page headers

I have a simple little apps script that refreshes our dynamic logo on request. The problem is I can't target the header if the designer checks "Different first page header/footer" checkbox. Is there away to target the different header if it's…
Ian Davis
  • 63
  • 1
  • 4
5
votes
4 answers

Google Apps Script: Setting color of an event using Calendar API

I would like to set specific colors for events. I believe I have to use the Calendar API. I cannot figure out how to do this. The code I am trying is: var event = CalendarApp.getOwnedCalendarById(calendarID).createEvent(class, startTime, endTime,…
jockster
  • 111
  • 1
  • 2
  • 4
5
votes
3 answers

How do you delete an image from a google sheet

I would like to remove/delete an image that I inserted into a google sheet. I used the code: sheet.insertImage(url,col,row); to insert the image. But, I want to remove the image later in the code and insert a different image. or not have an image…
user3158459
  • 61
  • 1
  • 4
5
votes
3 answers

replaceText() RegEx "not followed by"

Any ideas why this simple RegEx doesn't seem to be supported in a Google Docs script? foo(?!bar) I'm assuming that Google Apps Script uses the same RegEx as JavaScript. Is this not so? I'm using the RegEx as such:…
Terrence
  • 747
  • 1
  • 10
  • 27