Questions tagged [google-apps-script-triggers]

0
votes
0answers
13 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
18 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
40 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
2answers
30 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 ...
0
votes
1answer
35 views

Why would I be getting the error: Too many simultaneous invocations 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 ...
0
votes
1answer
15 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
42 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
19 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
32 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, ...
0
votes
0answers
36 views

Auto date insert when opposite cell is populated in different columns - only if in a particular sheet in a document

I found this solution to autoinclude the date in a column when another one is modified and it works great. Auto date insert when opposite cell is populated What Im looking to do is: To modify this ...
2
votes
1answer
31 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
43 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
192 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
412 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....
0
votes
0answers
17 views

Blocking cell after changing it's color

I have created simple formula in google sheets which is going to be shared with many people. Sheet will be secured except few columns. I want to let those people edit cell's color in those columns. ...
0
votes
0answers
26 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 ...
0
votes
1answer
440 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
1answer
34 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
418 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 ...
1
vote
1answer
9k 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
46 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
466 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
2answers
2k 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. ...
0
votes
2answers
557 views

onEdit stops working when other function is run

I'm working on a script to help with a spreadsheet we use at work, but I'm having an annoying bug with the onEdit() function. After running the script from the script editor, it operates as intended (...
0
votes
2answers
337 views

Google App Script - changeType “REMOVE_GRID”

I'm using a Google spreadsheet. I'm attempting to create an onChange trigger that will activate a script when any sheet is added or deleted. I was able to get the script to work when a new sheet is ...
-2
votes
1answer
2k views

OnEdit not working when edit

I'm having an issue with this code and hope you could help me. I'm trying to run a script that builds a Data Validation when a cell is edited. I can tell it reads all the information but when I try to ...
0
votes
1answer
3k views

Make cell “flash” onOpen rather than onEdit

I need a Google sheets script which will make the background color of a cell flash. Currently I have a script which works fine, but onEdit. It would be far better in this case if the script could work ...
1
vote
2answers
3k views

How to make Google Sheet jump to today's column when opened?

I'm trying to adjust this code so that I can jump to today's date which are all across row 2 in my spreadsheet. function onOpen() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss....
10
votes
1answer
18k views

Add a script trigger to Google Sheet that will work in Android mobile app

I have a Google sheet that includes a script that should be run when clicking a button. The recommended way to do this (as far as I can tell) is to insert an image and then attach a script to the ...
6
votes
4answers
18k views

How to make Google Sheets jump to today's row when opened?

I have a sheet that has many rows to put data. Since there are too many rows, I want to have the cursor jump to a particular row when the sheet is opened. Edit not from OP: "The date column has the ...
2
votes
1answer
434 views

Creating multiple timestamps on Google Sheets to make dependent drop-down boxes work

I need timestamps on two different sheets to make two different dependent drop boxes work. I use the scripts below but can only get one sheet to work and not both sheets: Script time in function ...
1
vote
2answers
3k views

Script to automatically change text value

In GDocs under Tools > Preferences, I can define automatic corrections, so that if I type l*, it spells low, h* -> high, etc. In Google Spreadsheet there is nothing like that. Can I do that with ...
6
votes
4answers
17k views

How can I make some data Autosort in a spreadsheet on edit?

I am working with a simple spreadsheet that has name/lastnames in it. I need for the spreadsheet to automatically sort the entry alphabetically by the last name (column B). I have used the following ...
33
votes
3answers
79k views

Auto-updating column in Google Spreadsheet showing last modify date

Trying to figure out a way to have column two auto-update to show a timestamp of the last update. I realize the doc shows a timestamp of the last modification, but we have a lot of clients accessing ...