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

Execute Google Apps Script using C#

I am new to Google Calendar API. I created function to add events to the Google calendar using Google Apps Script. This works well. But I want to execute the Google Apps Script from C# application. How to do that?
Jesuraja
  • 3,774
  • 4
  • 24
  • 48
5
votes
3 answers

Google Apps Script To Copy Entire Google Drive File Structure; How To Avoid Timeouts?

My organization is switching to a Google Business account, and everyone needs to transfer their Drive files to their new accounts. Drive will not allow transfer of ownership between these accounts, so I've created a script to copy files and folders…
5
votes
3 answers

Calling a Google Apps Script web app with access token

I need to execute a GAS service on behalf of a user that is logged to my system. So I have her/his access token. I would like somehow to transfer the token to the web app and without having to authorize again the user to use it for some activities.…
Martin Dimitrov
  • 4,796
  • 5
  • 46
  • 62
5
votes
3 answers

Google Script send form values by email, error: cannot read property "namedValues"

Project key: MyvPlY2KvwGODjsi4szfo389owhmw9jII I am trying to run a script that sends the contents of my form by email each time the form is submitted. I was following the instructions from this link below exactly until I started getting errors and…
5
votes
4 answers

How to get a form linked to a sheet using google app script?

In class Spreadsheet there is getFormUrl() which returns the url for the form attached to the spreadsheet, null if there is no form. But now that you can have a form attached to each sheet, how do you get the ID or Url of the form attached to a…
Dana
  • 683
  • 1
  • 6
  • 21
5
votes
1 answer

Google OAuth2 and app script in IFRAME sandbox

I am a newbie as far as web development is concerned and even more so with Google App Scripts and OAuth2.0. Having said that, I have researched enough and also tried several tricks, but still can't get past this issue. I borrowed sample from…
5
votes
3 answers

Lookup, Match and Concatenate

I need a formula/function to concatenate cell values from one column and multiple rows. The matching criteria is applied to a different column. Here is my example of what I have to do: Islington | "Bunhill" | EC2M Islington | "Bunhill" |…
5
votes
2 answers

Remove custom script from Google Spreadsheet

I have a google spreadsheet with a custom script to update stuff. This sheet has been copied a few times and it currently has 2 scripts projects in the script editor. One of these is now old and should be deleted to avoid confusion. Searching how…
MrPurpleStreak
  • 1,477
  • 3
  • 17
  • 28
5
votes
0 answers

Google Apps Script: check the referring URL of the request (standalone web app)

I'd like to perform a check on the referring URL of a (standalone, anonymous) Google Apps Script, and take some action if the referring URL is one of two known "good" URLs. Is there a way to do this? The best I've come up with so far involves…
Jimadine
  • 998
  • 13
  • 26
5
votes
1 answer

Can a Google Spreadsheet Apps Script library contain a user dialog?

Are there restrictions on what may be in an Apps Script library to be used by Google Spreadsheets? Specifically, can a library include an HTML dialog? I've created a spreadsheet script that adds a menu item to present the user with a dialog box. …
Peter D
  • 121
  • 7
5
votes
2 answers

How to pass a doGet(e) parameter to another function?

I am able to capture a variable from the url of a published app script, but I am not sure how I can pass that variable to another function. The below script will not run the onRun function if a variable is included. My goal is to pass 2…
Bjorn Behrendt
  • 1,204
  • 17
  • 35
5
votes
2 answers

Improve Script performance by caching Spreadsheet values

I am trying to develop a webapp using Google Apps Script to be embedded into a Google Site which simply displays the contents of a Google Sheet and filters it using some simple parameters. For the time being, at least. I may add more features…
Luke
  • 2,434
  • 9
  • 39
  • 64
5
votes
1 answer

set Notification forspreadsheet trigger in google apps script onEdit()

I have created a trigger for spreadsheet onEdit(). This works fine. What I want to achieve: When I set the trigger programmatically, by default the notification is set to "Daily" and "around 3 am". How do I set this to "immediately" using…
DinEsh
  • 113
  • 1
  • 7
5
votes
2 answers

Can One Script Trigger a Function In Another Script?

I need to find a way to have one Google Apps script file trigger a function in another script file. My goal is to have a master script that copies another script file and creates a new file (this is already done), then triggers a function in the new…
Joel Gross
  • 71
  • 1
  • 6
5
votes
2 answers

How to create a defined named range in google sheets using script

Is it possible to create named ranges in Google sheets using google script? I would then want the spreadsheet to be able to use these in formulas.