Questions tagged [google-apps-script-triggers]

Filter by
Sorted by
Tagged with
0
votes
0answers
13 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
10 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
184 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
38 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
46 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
80 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
26 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 ...
0
votes
1answer
74 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
69 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
91 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
14 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
145 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
106 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
461 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
159 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 ...
-1
votes
1answer
54 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
1k 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
20 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
34 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
49 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
36 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
149 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
408 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
885 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
915 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
19 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
27 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
634 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
711 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
15k 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
553 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
3k 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
714 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 (...
1
vote
2answers
448 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

Script to copy values only

I have a script which copies new form data from one sheet to another. However, I only want the values and not the formatting to paste. Here is the script: function onFormSubmit() { // moves a ...
-2
votes
1answer
3k 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 ...
3
votes
2answers
4k 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
21k 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 ...
3
votes
2answers
3k views

onOpen doesn't execute

I've got a google spreadsheet I created yesterday and used Tools -> Script Editor to create a function in a single file called Code.gs function onOpen(e) { var email = (Session.getEffectiveUser()....
6
votes
4answers
20k 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
519 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
18k 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 ...
37
votes
3answers
85k 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 ...