Use for questions about Google Apps Script, Google's JavaScript-based cloud scripting language for automating tasks across Google products and third party services.

34
votes
2answers
13k views

How can I test a trigger function in GAS?

Google-apps-script supports Triggers that pass Events to trigger functions. Unfortunately, the development environment will let you test functions with no parameter passing, so you cannot simulate an ...
38
votes
5answers
44k views

Exceeded maximum execution time in Google Apps Script

I have an Apps Script that constantly gets this error. Judge by the notification email, it looks like the time limit is 5 minutes. Does anyone know if there is a way to extend this time limit? Or ...
53
votes
1answer
86k views

Is it possible to 'prefill' a google form using data from a google spreadsheet?

I'm looking for a way to 'pre fill' a google form with specific data from a google spreadsheet. The form will have the same 'standard' questions for everyone, but the data in the first two question ...
33
votes
2answers
127k views

Google Forms file upload complete example

How do I allow my viewers to use Google Forms to upload some files to my form and save it to my Google Drive?I am looking for a complete example: It must tell what code to add to the example Google ...
20
votes
2answers
39k views

Create Google Calendar Events from Spreadsheet but prevent duplicates

I'm trying to write a script that will take data from a Google spreadsheet and create events in my Google calendar.I managed that fine but it produced duplicates every time I ran it. So now I'm ...
12
votes
1answer
3k views

How to poll a Google Doc from an add-on

A documented restriction with document and sheet add-ons is that Apps Script cannot tell what a user does outside of the add-on. This tantalizing tip is given:It is possible to poll for changes in ...
12
votes
1answer
15k views

Linking to another HTML page in Google Apps Script

When linking from ScriptDbConsole.html to legend.html I get the following error message:Sorry, the file you have requested does not exist. Please check theaddress and try again.This would ...
26
votes
3answers
72k views

How to automatically import data from uploaded CSV or XLS file into Google Sheets

I have a legacy database system (not web accessible) on a server which generates CSV or XLS reports to a Google Drive folder. Currently, I am manually opening those files in Drive web interface and ...
17
votes
3answers
12k views

How to protect the Apps Script code in a Google spreadsheet?

I have written some code for my Google spreadsheet with the script editor.I want to share this spreadsheet with my clients but I don't want to share the code I have written.This code adds a menu ...
55
votes
6answers
43k views

Refresh data retrieved by a custom function in google spreadsheet

I've written a custom google-apps-script that will receive an id and fetch information from a web service (a price).I use this script in a spreadsheet, and it works just fine.My problem is that ...
6
votes
5answers
15k views

Detect user inserting row or column in a google spreadsheet and reacting in a script

In Google Apps Script, one of the basic tools is the onEdit trigger in a spreadsheet, which enables us to detect when a user edits a cell, and react to it.How about when a user inserts a row or ...
14
votes
4answers
52k views

Google Apps Script to open a URL

Is there a way to write a google apps script so when ran, a second browser window opens to www.google.com (or another site of my choice)?I am trying to come up with a work-around to my previous ...
5
votes
2answers
5k views

How can I generate a multipage text document from a single page template in google-apps-script?

I have to generate labels from a list of user data stored in a spreadsheet.Right now I get everything working nicely except that when I output more than 16 items (the number of labels per page) I ...
10
votes
6answers
15k views

Script to summarise data not updating

I have a Google spreadsheet of timesheet data; it has a sheet for each month, each sheet is a lot of six column blocks, one block per client.I have created a summary sheet that goes and gets the ...
10
votes
1answer
2k views

What happens when I “sleep” in GAS ? (execution time limit workaround)

Behind this (not so much I admit...) funny question is a real question about a workaround I use without really understanding how it works.First a brief description of my use case, all this is ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,