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 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:
When asking questions about google-sheets, Make sure to add input and expected output as markdown text table (NOT as IMAGE) to the question. Click here to create a table easily. Note that, if you share Google files, your email address can be accessed by the public/bots,
When asking questions about web-applications, always include the project publishing information:
- Execute as:
- Who has access:
When asking questions about script settings(ide), along with your code, also include your manifest file:
appsscript.json
Using relevant tags ensures your question reaches the right audience. See list of relevant tags below:
Tag usage guidance
This is a summary of tags related to Google Apps Script and how to use them in the question being asked.
- google-calendar google-contacts google-docs google-drive google-forms google-maps google-groups google-mail google-sheets google-sites google-slides - Product or service tag
- google-workspace - Use for paid/domain specific editions of Google workspace
- javascripttypescript - Language specific issues
- google-visualizationcharts - Google charts/sheets charts
- triggers - Event handling and triggers
- libraries - Library implementation/debugging. Use with javascript for implementing external javascript libraries
- web-applicationscorsjavascriptcssclient-serverhtml - Published Web apps and related issues. Use more specific tags where applicable.
- debuggingloggingstackdriver - Inbuilt IDE debugger/debugging techniques
- ide - Issues related to inbuilt IDE
- v8rhino - Runtimes specific issues
- claspgoogle-apps-script-api - Managing projects with Clasp/through api
- add-ongoogle-workspace-add-ons - Issues regarding editor addons and Workspace addons respectively
- jdbcsql - Issues with Jdbc driver and sql connections
Community Chat Room
Note: Stack Overflow chat requires a minimum reputation of 20 or be "invited" by a Stack Overflow moderator.
Official Resources
- Overview of Google Apps Script
- Official Developer Documentation
- Apps Script Introduction Codelab - Hands-on intro to Google apps script in 30 minutes
- Apps Script Fundamentals Codelab - Essential beginner's guide to Apps Script
- Release Notes - List of the major changes in each release of Google Apps Script
- Sample Apps made with Google Apps Script
- Guide on events and triggers
- G Suite Solutions Gallery - Sample solutions to solve common business challenges
- Google Apps Developer Blog - GSuite developer's blog
- List of Issues - sorted by vote count on Issue Tracker
- Bug report - Create an issue on Issue Tracker
- Feature request - Create an feature request on Issue Tracker
- V8 Runtime Overview New - New runtime engine based on Chrome V8
- V8 Migration New - Migrate Rhino-based scripts to V8
- New IDE Features New - A Welcome to the new Apps Script IDE - Google Blog
Community Resources
- FAQ Frequently Asked Questions - From StackOverflow's Best
- MDN JavaScript guide - A first splash into JavaScript
- MDN Arrays Guide - Essential introduction to arrays
- JavaScript wiki - Fundamentals and Tutorials
- Taking Advantage of Google Apps Script - Libraries, benchmarks, and samples.
- Taking Advantage of Web Apps - Webapp implementation and debugging information.
- Apps script pulse - Latest from Google Apps Script community
- Google Apps Script Community on Google Groups
- Awesome Apps Script - Resources, including tutorial sites, libraries, and more.
- Apps Script Starter - Build Apps Script Projects Locally
Best Practices
- Optimizing Scripts for Better Performance
- Html Service: Best Practices
- Troubleshooting script projects
FAQ:
Timeout:
Setting 1D array to setValues:
Dynamic dependant drop downs:
VBA auto conversion:
Testing a trigger function:
Multiple simple triggers: