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

Google Apps Script Properties Quota Clarification

Hoping to get some clarification on what Google describes as the quotas for Google Apps Script Properties. The quotas and limits are found here: https://developers.google.com/apps-script/guides/services/quotas The page lists 50,000 writes to…
stmcallister
  • 1,682
  • 1
  • 12
  • 21
5
votes
1 answer

Convert all xls files available in a folder into "Google Doc Spreadsheets"?

The basic way to do that is turn conversion on when uploading files into Google Drive. Another way is to select the xls file in the folder and convert it one by one by hand. But if one has already many xls files uploaded in a folder, it may be…
miodf
  • 524
  • 3
  • 9
  • 21
5
votes
1 answer

Move cursor programmatically forward or back (easily) in Google Document

Whenever I insert an image in my document with the following code, var cursor = DocumentApp.getActiveDocument().getCursor(); var image = cursor.insertInlineImage(resp.getBlob()); the cursor is positioned before the image. It seems that it makes…
Fuhrmanator
  • 11,459
  • 6
  • 62
  • 111
5
votes
2 answers

Find and change unknown strings to UPPERCASE in Google Apps Script Document using JS

I write in Fountain markdown http://fountain.io/ in Google Docs. Fountain is used for writing screenplays. I want to make writing in fountain a little friendlier by auto-capitalizing certain elements (on open or with a button, whatever). Here is a…
wthman
  • 97
  • 1
  • 2
  • 7
5
votes
3 answers

Getting current user timezone

I have been using Session.getTimeZone() to get the current user's timezone. I just noticed it has been deprecated, and I can't see anything that replicates this functionality. My users are located all over the US and dates/times should be formatted…
Greg
  • 697
  • 1
  • 8
  • 22
5
votes
1 answer

Run Google Apps Script on Google-Spreadsheet event?

If I create a Google apps script, can I hook it up to Google spreadsheet to run based on an event, or must I manually invoke it? I don't know if Google Sheets supports any events. For example: a Google app script that strikes out rows in the…
John K
  • 28,441
  • 31
  • 139
  • 229
5
votes
1 answer

How can I create a progress spinner using HtmlService?

In scriptUi I was able to follow these instructions to create a simple progress spinner for long waits: https://sites.google.com/site/scriptsexamples/learn-by-example/uiapp-examples-code-snippets/progress-indicators I am now using HtmlService to…
Bjorn Behrendt
  • 1,204
  • 17
  • 35
5
votes
5 answers

How to (from a Google Spreadsheet) get the ID of a linked form

I have a Google Spreadsheet that a form is linked to and all form responses are stored in. What I am trying to find is the ID of the FORM itself. I tried this but this does not work.. (I'm running the following code FROM The script editor IN the…
user2283438
  • 61
  • 1
  • 2
  • 5
5
votes
2 answers

Alternative to scripDb for storing simple data?

Recently the scriptDb service was deprecated from google apps script, and will be shut off completely in the coming months. I have a project which utilizes this service and I wish to phase out the use of scriptDb before it's too late. Currently, my…
eclement
  • 101
  • 1
  • 5
5
votes
2 answers

Passing authentication from one Google Apps Script webapp to another Google Apps Script webapp

I have two Google Apps Scripts in my Google Apps account. Both have been published as webapps with the following settings. Script A: Execute as me Who has access to the web app:Anyone within XXXXXXX.com Script B: Execute as the user accessing…
WebHoundX
  • 153
  • 1
  • 6
5
votes
1 answer

Google Sheets not showing custom function in autocomplete

I can't get the google sheets autocomplete to show my custom function even when I use Google's version (see below). I have the jsdoc info correctly formatted, but it still doesn't show up. I'm sure I'm just overlooking something stupid, but I…
Brad
  • 65
  • 1
  • 1
  • 6
5
votes
1 answer

Is there a way to change the display name in email sent via Google Apps Script?

I'm testing email sent from Google Apps Script and it's sending it with the display name of the email address (the part before the @). It's a business address like: info@example.com and all that is showing is "info". I would like to make it like:…
MrGreggles
  • 6,113
  • 9
  • 42
  • 48
5
votes
1 answer

How does google know which onsubmit trigger to execute when a form is submitted if you have multiple forms sending responses to a single spreadsheet

I need clarification from someone. I understand that multiple forms can send their responses to a single spreadsheet in the new Google Sheets. So I created two Google forms and had them both send their responses to a new Google spreadsheet. I then…
user2284680
  • 93
  • 1
  • 7
5
votes
3 answers

Convert Node.JS code snippet to Javascript (Google Apps Script)

I would like to convert the following Node.JS code snippet to JavaScript in order to run it in Google Apps Script: From: Node.JS function getMessageSignature(path, request, nonce) { var message = querystring.stringify(request); var secret =…
AlexR
  • 5,514
  • 9
  • 75
  • 130
5
votes
1 answer

How to create a zip from an array of Blobs with a folder structure

I get how to create a zip from an array of Blobs, but is it somehow possible to define a folder structure within the zip itself? for example.. archive/img/file1.jpg