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
2 answers

How do I (or can I) modify the border of a table in a document with Google Apps Script?

Is there any way of modifying the border of an individual cell within a document table using Google Apps Script? The TableCell Class reference documentation (here) doesn't have any methods that seem to allow this. This issue seems to suggest that…
brad
  • 9,573
  • 12
  • 62
  • 89
5
votes
1 answer

Google Forms very slow performance

I have a google form that I am working on with some scripting done using GAS in the background that loads drop down lists with a lot of different info. The form itself is quite large, about 16 sections and it is loading and responding to scrolling…
IntegrateThis
  • 853
  • 2
  • 16
  • 39
5
votes
3 answers

Send emails using Sendgrid with google appscript

I am creating a googlesheet addon to send mails.And for sending mails I am using sendgrid. I cannot find any documentation or example code for sending mails with Google Appscript. This is the code I am using, but it is no good. var data = { …
kadamb
  • 1,532
  • 3
  • 29
  • 55
5
votes
2 answers

google maps direction api taking traffic in account

I am trying to write a simple script in order to calculate in a google sheet the travelling time between two locations, by taking in account the traffic. I am using the class DirectionFinder of the google Maps API. I have managed to calculate the…
5
votes
2 answers

How to backup bound Google Apps Script

I have looked fairly extensively on this site and on the web and cannot find any posts on how to backup bound Google Apps Scripts. Is there a way to do this and how? I use a backup solution for anything in Google Drive, although when restoring any…
Gadget
  • 71
  • 1
  • 1
  • 3
5
votes
3 answers

How to select account in Google App Scripts for users with multiple accounts?

For users that are logged into multiple accounts, how can a script let the user pick an account? For example, Gmail, Google Drive, etc. provide a way for the user to select which account to use with a selectable option on the top-right of the…
Oscar Wahltinez
  • 1,155
  • 3
  • 12
  • 24
5
votes
2 answers

Google Apps Script/Sheet Returns Bad Request 400

I have a fairly simple script running on a Google Sheet. The script accepts a webhook POST and writes the content of the webhook as a new row in the spreadsheet. The script does function as expected and it writes a new row when it receives data.…
5
votes
3 answers

How to pass a range into a custom function in Google Spreadsheets?

I am trying to compare two google sheets (for duplicate values) over a predefined range.. I am aware that google lets you compare sheets via tools, but i need a more customized comparison hence the function. I want to create a function which takes…
5
votes
1 answer

Google Apps Script and RFC 3339 issue

In the Google reference documentation I found a short function to convert RFC3339 date string to a valid Date object. The code is very simple and goes like this : function parseDate(string) { var parts = string.split('T'); parts[0] =…
Serge insas
  • 45,904
  • 7
  • 105
  • 131
5
votes
4 answers

Spreadsheet Non-Adjacent Column data

I want data from a spreadsheet using app script. I am trying to get data from multipe rows of two non-adjacent colums, but I am unable to do so using following syntax. Say A1 to A19 and C1 to C19. Please tell me if something is wrong with the…
HSPL
  • 55
  • 1
  • 5
5
votes
1 answer

How to conect Google Apps Script JDBC to Amazon RDS with SSL

Google launched support for SSL connections in the JDBC service. Google added three new connection parameters to support this feature: _serverSslCertificate, _clientSslCertificate, and _clientSslKey. The documentation is available…
Laishidua
  • 51
  • 5
5
votes
1 answer

How to get the origin URL from a "doPost" request on google apps script

I've been trying to identify the origin of a POST request made to a Google Apps Script doPost() content service; function doPost(request) { // Something like this: var originURL = request.headers.URL; // http://myurl.com } Since I have…
LeandroP
  • 337
  • 2
  • 8
5
votes
3 answers

Concatenate two ranges in Google Sheets

tl;dr: How do I make two ranges appear as one as an argument to a function? For example, I want to look at every cell in column E except E5: =MY_FUNCTION( somehowjoin( E1:E4, E6:E ) ) Background I'm writing a project tracker in Google Sheets, like…
Phrogz
  • 296,393
  • 112
  • 651
  • 745
5
votes
2 answers

How do I use setValues to paste the data I got from getValues? Google Spreadsheet

I can't seem to wrap my head around 2D arrays. I have set up the following code. but I'm unable to get setValues to work (the end of the code.) I'm pretty sure I need to set it up as an array, but every way I've tried to set it up has resulted in a…
S. Roberts
  • 55
  • 1
  • 1
  • 6
5
votes
1 answer

Google app script web app, how to create a login button?

I have create script backed by a Google Spreadsheet in Google Drive and published it as a web app, setting "Execute the app as: me" and "Who has access to the app: Anyone, even anonymous". The main page serves html content from the spreadsheet. The…
thedayofcondor
  • 3,860
  • 1
  • 19
  • 28