Questions tagged [google-apps-script-triggers]

Filter by
Sorted by
Tagged with
1
vote
1answer
23 views

TypeError: Cannot read property 'range' of undefined at onformsubmit again after creating an event object

This is what I have written in Script editor so as to auto-apply a formula to a new added row when a new response is submitted on the Google Forms linked to my spreadsheet. First I was using ...
-2
votes
0answers
20 views

Google Forms email notification based off responses

I'm trying to make a Google Sheets script in Google App Script to respond to changes to a spreadsheet from a form. it will eventually be used to send an email to the user with a list of URLs to access ...
0
votes
1answer
29 views

TypeError: Cannot read property 'range' of undefined at onformsubmit(Code:10:17)

I am getting this error when running :TypeError: Cannot read property 'range' of undefined at onformsubmit(Code:10:17) I have installed the onformsubmit trigger but it is not working. What is not ...
0
votes
1answer
21 views

Google form adding more than one row every time

I know that when a new response is submitted on Google form, a new row is auto-added to the linked spreadsheet. I use several onformsubmit triggers for my form and linked spreadsheet. But I do not ...
0
votes
1answer
35 views

Continuation token: Generate file listing of a google folder into a google sheet

I have a folder on Google with 18k files and need to list some variables from them into Google sheet. A solution for this was found on Insert image from Google Drive into Google Sheets However, ...
-1
votes
1answer
19 views

Google Sheets calendar script is timing out

function onEdit(e) { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getActiveSheet(); if(sheet.getName() != "Sheet2") { return; } var lastColoum = sheet....
0
votes
0answers
18 views

On edit script for timestamp on multiple columns with individual timestamp based on the time of the edit made vice all having the same timestamp

I have check boxes every other column starting on column C, and I want the date stamp to appear in column d row 2. The script works great for that, but I also need it be for column e (check box) ...
0
votes
0answers
32 views

Problem 'Select an active sheet first'

There is a problem and i cannot solve it. 'Please select an active sheet first. (line 5, file "Copy of Code")" function onEdit(event){ //wa13669601 var ss = SpreadsheetApp.getActiveSpreadsheet()...
0
votes
2answers
69 views

How to Clear Cell(s) based on the Value of another Cell

I am looking for a script that will clear cell(s) when the value of another cell changes or is equal to ("X"). In the attachment I would like when Column "G" gets checked marked (TRUE), then ...
0
votes
0answers
40 views

Google App Script to Hide & Show Rows Based on Dropdown Selection on Active Sheet

I am trying to create code that will automatically hide or show rows depending on the selection of the dropdown on whatever sheet is currently active. The drop down selection is a list of all the ...
0
votes
1answer
29 views

Determining location of checkbox that activated a script?

I have hundreds of checkboxes in multiple sheets on a single Google Sheets project. When a user clicks a checkbox, I want a script to activate. In that script, I need to know what cell the checkbox ...
0
votes
1answer
43 views

Using Google Apps Script in with arrayformula?

I'm using an array formula in Google Sheets to determine when a cell shows 'Expired' based on date. When the cell shows Expired, I've a script which should transfer rows with Expired to another sheet....
0
votes
1answer
32 views

How can I make some data on a Google Sheets auto-sorting but in different columns in every sheet?

If i want to sort different columns in every sheet, what do i have to change? function onEdit(event){ var sheet = SpreadsheetApp.getActiveSpreadsheet(); var editedCell = sheet.getActiveCell(); ...
0
votes
0answers
36 views

A script in Google Sheet to calculate the delay in attendance based on fixed time

I need a script to calculate the attendance for each employee based on his shift time. It must deduct the total delay or any break in the middle of the shift. For example, A shift time is between 8am ...
0
votes
1answer
78 views

How can I get to the bottom of a Google Sheet

I want to open my Google Sheets and go automatically to the bottom/last line entered as there are over 2000 lines. I have entered the below text in: tools > script editor, as seen in another post ...
0
votes
0answers
17 views

How to create trigger automatically when I open my spreadsheet [duplicate]

I am trying to create Time-based trigger automatically when a file is opened, the function works fine when I execute it manually but it doesn't work when i open the file. function onOpen(e){ var ...
0
votes
0answers
14 views

Auto-updating column in Google Sheet [duplicate]

Trying to figure out a way to have column next to modified column auto-update to show a timestamp of the last update. e.g. 1A is modified and in 1B auto-updated date, 2A modified and 2B auto-update ...
1
vote
1answer
14 views

Setting a trigger to send mail when data is added to a row that was empty

I`ve got an external app that sometimes adds data to the last row of a sheet, is there a way to trigger this to send a mail with the content of that row?
1
vote
2answers
506 views

Is there a way to allow users to access Google Sheets with installable triggers without manually signing in?

I have set up a Google Apps Script that validates data that is entered into various Google Sheets files. I am looking for a way to allow users to access those Google Sheets files without making them ...
0
votes
1answer
84 views

Help needed with script that auto-updates cells in column in Google Spreadsheet showing last modify date

I'm looking for some help with a script for a spreadsheet. I found a script (see below) that does half the trick for me, but I encounter two difficulties. What I am trying to accomplish is the ...
0
votes
1answer
204 views

Have script ignore first row [duplicate]

I am using this script to add in a date whenever a row is edited. I want it to ignore the first row. Thoughts on how to do this? function onEdit() { var s = SpreadsheetApp.getActiveSheet(); // ...
0
votes
3answers
272 views

Trying to run two scripts on same sheet and getting error

I found a code to run the two different scripts online, however i keep getting an error Missing ; before statement. Original function onEdit(e) { oneditfx1(e); oneditfx2(); } function ...
0
votes
0answers
331 views

hide rows in Google Sheets based on cell value in a different row

I'm trying to build a worksheet in google sheets with a checkbox which will hide and unhide lines 5 thru 60. My checkbox is in cell A4, and when checked cell A4 says "hide", and unchecked cell A4 ...
1
vote
1answer
519 views

Auto hide row based on cell text (formula based)

My plan is to hide an entire row if a specific cell in the row showed specific value. I already found the script and the script work amazing. But the problem now, since the script use onEdit function, ...
0
votes
1answer
41 views

Script sometimes it works sometimes it dosent

I have 2 columns to enter Lat and Long coordinates in ( E and F ), those also contain the Formulas (for all rows, I just happened to choose row 768below) =IFERROR("N"&left(index(Split(D768,"N"),1)...
0
votes
1answer
290 views

How to timestamp on new added cells in LIVE google spreadsheet?

The code below insert timestamp in google sheet by editing another column. However, there an issue which I have no idea how to solve. When I add new row manually, it successfully adds timestamp, BUT ...
0
votes
1answer
979 views

How to automatically set date in a cell when a different cell value is changed by a formula from data on another sheet?

I currently have a column, e.g. ColB, containing SUMIF functions with its data range from other sheets and a column, e.g. ColC, with dates that I want to automatically update to the last date ColB's ...
0
votes
0answers
15 views

Trying to figure out a Google Script

Looking for help on a script. To pull new rows from one sheet to update my report without duplicates or erasing manually made changes to current rows. I was originally using =ARRAY_CONSTRAINT() at the ...
0
votes
2answers
451 views

inputBox in onEdit does not work for users

I have a strange problem... Simple function like: function onEdit() { var ss = SpreadsheetApp.getActiveSpreadsheet() var sheet = ss.getActiveSheet() var ui = SpreadsheetApp.getUi() var response = ...
0
votes
1answer
189 views

Why don't work function onEdit(e) when using Zapier

I created a chatbot that using Zapier (through Webhook and JSON) for sending to my Google Sheet a name and a phone of user and Apps Script must generate a coupon code automatically. I used function ...
2
votes
3answers
2k views

How can I have onEdit trigger when specific cells are selected?

I can't seem to figure out how to get my script to trigger only on the edit of specific cells and on the current sheet. I've tried just about everything and it just refuses to run the script at all if ...
1
vote
1answer
731 views

Why would I be getting the error: Too many simultaneous invocations: Spreadsheets on a simple once a day trigger?

I've searched around and still can't find anything directly related to the failure message I'm receiving. The script hasn't changed and it used to run just fine, but now in the past week or so it's ...
-1
votes
1answer
173 views

Function OnEdit run slow and timeout error

I have a short timestamp script for my google spreadsheet. But it run quite slow and make a lots function onEdit(e) { var TIMERECIEVE = [0,-29]; var DATETRECIEVE = [0,-28]; var DATEDONE = [0,-...
0
votes
1answer
3k views

How to trigger a script in Google sheets when a value changes

I try to fire a script when a value in a certain cell or range of cells changes. (it's not changed by the user, so I can't use onEdit) I've tried to use onChange, but this doesn't fire my script at ...
0
votes
0answers
21 views

Two timestamps referencing different columns in one google sheet? [duplicate]

I'd like to have a timestamp occur in column 6 when an edit is made to column 1. But another timestamp to occur in column 6 when an edit is made to column 8. I would be open to having the 2nd ...
3
votes
1answer
38 views

Can I limit how frequently an 'on open' script runs?

Basically I have a bunch of functions that run on Open, but if possible I'd like to limit them to only run once per 60 minute period. Just so that if a user accidentally refreshes or closes the sheet, ...
2
votes
1answer
46 views

How do I lock a sheet in Google Sheets at a specific time every day?

I would like the sheet protected from 6pm - 10pm every day. I have the following script but it doesn't seem to protect the sheet at the designated time. I have this script with the Time-based trigger, ...
1
vote
1answer
328 views

Run a Script When Tab Programmatically added to a Google Spreadsheet

I'm trying to pull data from an Adwords report to a Google Sheet through an Adwords script. This will be done on a daily basis. Every time the Adwords script runs, a new tab is created (and an old one ...
1
vote
2answers
747 views

Jump to today's date when opened

I have found a similar question here: How to make Google Sheet jump to today's column when opened? I want to do a similar thing, but I have the dates in row 5 not in the column. I tried several ...
1
vote
2answers
2k views

Move cursor to cell in all sheets

I have the following script: function setActiveCells() { var wb = SpreadsheetApp.getActiveSpreadsheet(); var ws_names = wb.getRangeByName('an_sheets').getValues(); var ws_cells = wb....
2
votes
0answers
1k views

Change tab color based on cell value that is a formula OR cell background color

1st time question asker, so I'm apologizing in advance if my question is worded wrong or doesn't make sense or is, frankly, to wordy (I tend to over explain). I have a sheet with, currently, 10 tabs. ...
0
votes
0answers
32 views

Google Sheets Script Apply update function to only the sheet names “Analyses”

I want to apply the script below to only the sheet called "Analyses" function onEdit() { var sheetName = "Analyses"; var s = SpreadsheetApp.getActiveSheet(); // Get spreadsheet name var ...
-1
votes
1answer
898 views

Avoiding an authorization request for Google Scripts

I'm in the midst of trying to custom code some script that will automatically hide some sheets from some users in a shared company spreadsheet. Yesterday it seemed to be working fine, but now it seems ...
0
votes
2answers
761 views

The script does not have permission to get the active user's identity

Anyone know why this caused The script does not have permission to get the active user's identity.? I don't have any functions that asks for the user identity. So I'm a little confused. function ...
0
votes
1answer
39 views

Copy data to new column in Google Sheets

I have a sheet with IMPORTHTML that I want to copy data from one column to a new column daily. function saveData() { var spreadsheet = SpreadsheetApp.getActive(); spreadsheet....
0
votes
1answer
1k views

How to trigger a script when a new text value is added to specific column?

I've built a sheet that generates messages for clients based on certain input data. The message appears in a cell in column B when all the required data has been entered. When a new text value is ...
4
votes
1answer
22k views

Diference between onEdit or onChange trigger? [closed]

From what I've gathered online, onEdit only works when you edit a cell (not when a row is added or when a note/comment is added) and onChange will capture that a change has occurred and trigger when ...
-1
votes
1answer
47 views

One time check to see if document is shared with a specific user

I'm trying to figure out how to write an Apps Script that checks "IF" a Google Drive URL is shared with a specific user. I do not want this to be a continuous check, just a "one time check". Example ...
0
votes
1answer
753 views

Google Script to set the current month once a day only in a cell

Currently, I'm using (Month(NOW()) to set the current month number in cell $D$1 of a spreadsheet. I know Month and Now are volatile functions and they're making the over sheet update way too slowly, ...
1
vote
3answers
4k views

How to execute a trigger only when one of the sheets is changed

When I have multiple sheets in a spreadsheet, I want to execute a trigger only when One of the Sheets is changed, not the others. OnChange() or OnEdit() is executing the trigger for any data change. ...