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
1 answer

How to make the library work with the caller script PropertiesService?

Until Google extends the import/export API to container-bound Apps Script projects, I have moved most of my project to a library which can use that API, and then made Google Docs project into a shell that just calls through to the library. My…
Paul Draper
  • 78,542
  • 46
  • 206
  • 285
5
votes
1 answer

SyntaxError: Unexpected token in object literal in Google Apps script

I cannot figure out why this error is being thrown at me because it is random: SyntaxError: Unexpected token in object literal It is part of a function that I use to grab a label from the cache. If I reload my script from start without doing…
Bjorn Behrendt
  • 1,204
  • 17
  • 35
5
votes
1 answer

Google Application Script - onChange or OnEdit

I have a google application script that changes a value in A1 in onLoad event in a spreadsheet. This triggers a cascade of changes. I would like to detect the event when let's say cell F200 is changed because of the edit to cell A1. How do I set up…
user1305722
  • 111
  • 1
  • 3
  • 5
5
votes
1 answer

Google application script - using setInterval in in onOpen trigger - error "undefined"

I am trying to use setInterval function in onOpen trigger. When I run it I am getting " "setInterval" is not defined." error. Are there any restrictions to using setInterval in Google Application Script? This is the code: setInterval(function(){ …
user1305722
  • 111
  • 1
  • 3
  • 5
5
votes
2 answers

Custom Google Spreadsheet/Sheets toolbar

Is it possible to customise the toolbar of a Google Spreadsheet/Sheets by adding a custom icon linked to a script/macro? I have only seen customised spreadsheet menus.
antonio
  • 10,629
  • 13
  • 68
  • 136
5
votes
1 answer

onEdit simple trigger never seems to be triggered

I've been using OnEdit for some time and its been working great - however just now ive came accross a problem - basically when column 6 (f) is edited I want it to check the value - if it is "In Progress" I want it to then run a function to send an…
Andy
  • 823
  • 5
  • 17
  • 37
5
votes
2 answers

Can I use Google Visualization API to query a spreadsheet in apps script?

I have a Google Spreadsheet with about 3000 rows of data (and about 30 columns). The data is laid out in standard fashion with column headers and one row per data item. The data represent case studies and articles used in various academic courses,…
Carrie
  • 1,037
  • 2
  • 12
  • 19
5
votes
2 answers

Google App script extracting data from website

So I am writing a script which look at review done on google+ pages and updates a google spreadsheet. I have found out that the line in the html which holds this value is 103 I just need to make it possible for me to…
5
votes
3 answers

How to align text in google docs table cell

I creating a google doc by script and want to insert table to it by this code: var row1 = "some city" var row2 = "some text" var rowsData = [[row1, row2]]; var table = body.appendTable(rowsData); table.setBorderWidth(0); …
Karen Fisher
  • 747
  • 1
  • 8
  • 25
5
votes
4 answers

Converting string to web-safe Base64 format

I am testing how to update user picture using the Admin SDK Directory Service with Google Apps Scripts with the following function: function updatePhoto(){ var fileId = 'XXXXXXXXXXXXXXXXXXX'; var b = DocsList.getFileById(fileId).getBlob(); var…
user2054013
  • 133
  • 3
  • 3
  • 8
5
votes
4 answers

Refresh Button / Auto Update GOOGLE SPREADSHEET

I hope you can help me. I have been trying to get this working for quite some time. I am taking the API from a website import it into google spreadsheets VIA importjson()…
user3321164
  • 61
  • 1
  • 1
  • 2
5
votes
4 answers

Has Google lowered the email limits for Google Apps Script?

Popular opinion seems to be that a Google Apps Script can send up to 500 e-mails per day. See, for example, What is the email limit on Google Apps Script?. I checked the official quotas at script.google.com/dashboard and it says "Email Recipients:…
Dan Litwin
  • 71
  • 1
  • 3
5
votes
2 answers

How to get fixed cell value, not formula?

I have a cell in Google Sheets, with =NOW() formula in it. All I need - to get the value, generated by formula (22.01.2014 15:23:51), not the formula by itself. If I try: var nowtime = SpreadsheetApp.getActiveSheet().getRange('A1').getValues();, I…
sortas
  • 1,527
  • 3
  • 20
  • 29
5
votes
4 answers

Moving a column in Google Spreadsheet

Now I feel like I'm asking too many questions on this site :), but it seems like no has asked this question. IF they did, please link me there. I just want to move a particular column to another place (before or after another column) in the same…
ssurendr
  • 354
  • 5
  • 16
5
votes
1 answer

Getting latest Form Response sometimes gets the one before it instead

I'm wondering if this has to do with particularly busy times for Google Apps Script, because it seems like it has to do with an (occasional) delay in updating the length of a formResponse[] array. I'm using the following code to get the latest…
cmdr_keen
  • 169
  • 1
  • 2
  • 8
1 2 3
99
100