56,944 questions
0
votes
1
answer
49
views
How to apply cell background color as Theme color in google sheets via apps script?
Hopefully, the title is clear.
What I am NOT asking.
How to update the cells background color to match the Theme via hex color code.
How to update the spreadsheet theme colors themselves via appscript....
-1
votes
1
answer
65
views
Different behaviour running code from IDE compared to button on sheet [closed]
I am testing out array handling with checkboxes and have the following code:
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
function arrayTest() {
var bigArray = ...
-4
votes
0
answers
32
views
Data will not load in User's Environment - Google Sheets Data [closed]
We have a website that is functioning well. The user submits a request and Google Sheets loads. When the user opens the admin page the data from the sheets will not load.
He gets the following error....
0
votes
1
answer
54
views
How replace the content of the active document?
I’m building a Google Docs add-on using React + Google Apps Script (via clasp). From the sidebar, I receive a .docx file as a Base64 string (binary content).
I can successfully convert the .docx to a ...
0
votes
0
answers
78
views
Ebay API data visibility issue [closed]
I am working on eBay data automation using Google Sheets. My code extracts data from eBay via the API for specific fields. However, one field — i.e., the Shipping Label — has a value of 0 for some ...
-4
votes
0
answers
46
views
Keep getting "invalid key" error - google apps script to send documents automatically to docusign for signature [closed]
Thanks everyone for the tips and guidelines on posting, I am updating it below.
Goal of the apps script is to automatically send docx documents for signature to Docusign.
Issue is: Every time I run ...
1
vote
2
answers
78
views
Comparing multiple flags at once
I have a script which checks the value of a series of flags before deciding on an execution pathway. Because of the way the script executes, the flag values are held as script properties, therefore ...
Advice
0
votes
4
replies
48
views
Slides Add-On accessing Sheets Data and Narrowing Scopes
I have an Add-On under review in the Google Marketplace.
My Add-On runs in Google Slides and needs to access Google Sheets data to create various visuals in Slides. Specifically my Add-On pulls data ...
0
votes
1
answer
60
views
Filter in Filter or Query/array for multiple sheets
I'm a long time reader, first time poster.
I'm having a problem showing invoice details for each company id for this sheets.
https://docs.google.com/spreadsheets/d/1iTJ8PR3snsbZKh01-...
2
votes
0
answers
37
views
Google Drive Add-on homepage renders twice when onItemsSelectedTrigger is present and no items are selected
I'm developing a Google Workspace Add-on for Google Drive and have run into a strange rendering bug.
When my add-on is opened in the Drive sidebar, the card generated by my homepageTrigger function is ...
Best practices
0
votes
4
replies
64
views
Handling Multiple Sheet Inputs
I have a spreadsheet that receives data inputs externally. That data is used by sheet formulas to calculate an output which is then collected via an HTTP request.
What is the best way to allow google ...
0
votes
1
answer
76
views
Checkbox behavior
So as per previous suggestions, I'm using checkboxes to replace the .getUi method so my project will work properly on mobile devices. I've come across a strange scenario and I wanted to confirm this ...
2
votes
1
answer
59
views
Stacked column chart to use column A as header in App Script
I have this table and the chart I want as below:
To acheive this I have to switch rows/columns, and use column A as headers.
However I cannot find the corresponding command for the checkbox "Use ...
-4
votes
0
answers
88
views
Fix for a (Drawing) Button assigned to an Apps Script, ‘Script Function cannot be found’ error only temporally fixes problem. Why? [closed]
Elsewhere on Stackoverflow (Google Sheets - Script function could not be found) a fix is detailed, however the fix only solves the problem for a temporary period – typically a day or so - then fails ...
1
vote
2
answers
96
views
Checking for changed checkbox value
To get around the fact you can't pop user dialogue windows on mobile devices, I have created a simple function which posts any error messages to a cell and waits for the user to check a checkbox to ...
1
vote
1
answer
72
views
Filtering a 2D Array
I have a column of checkboxes, which drives some downstream processing if they are checked. At the moment, my code creates the array of checkbox values but only uses it to check if any checkboxes have ...
0
votes
1
answer
110
views
Looking for a specific word in a Title in a cell then pushing a numerical code to a different cell in Google Sheets
My situation in Google Sheets: I have a list of target words and phrases in column A (as few as 20 to as many as 400), in column B I have 3 and 4 digit number codes assigned to each target word and a ...
0
votes
0
answers
47
views
Error while opening Dialog inside google chat using appscript
I have a add-on app where i have added multiple commands . In that I have a slash command called /share which should open dialog . so its opening and closing after some time and the error says
Server ...
0
votes
0
answers
31
views
Appscript doPost Logs not showing up [duplicate]
I am using the reserved doPost(e) function to handle my posted CSV file data. When I try to access the data using e.postData.contents and log the contents, nothing is logged. Actually, it is more like ...
0
votes
1
answer
83
views
Critical: Persistent API_KEY_INVALID (400 Bad Request) from both Apps Script and Node.js using Google AI Studio API [closed]
I am facing a critical authentication issue where a newly generated Google AI Studio API key consistently fails with a 400 API_KEY_INVALID error, both from Google Apps Script and a standard Node.js ...
-1
votes
1
answer
46
views
How to loop an Apps Script / Cheerio web scraper over multiple urls? [closed]
I have this Apps Script / Cheerio function that successfully scrapes the data I want from the url. The site only displays 25 entries at this url. I can find additional entries on subsequent pages (by ...
-1
votes
1
answer
97
views
Persistent 404 NOT_FOUND on Vertex AI for all Gemini models from Google Apps Script, despite full configuration [closed]
I'm facing a persistent 404 NOT_FOUND error when trying to call any Gemini model (e.g., gemini-1.5-pro-latest, gemini-1.0-pro) via the Vertex AI API from a Google Apps Script. I have exhausted all ...
1
vote
1
answer
50
views
Why does my Telegram bot repeat the same response after clicking an inline button (callback_query) when using a Google Apps Script webhook
I’ve built a Telegram bot hosted on Google Apps Script, using a webhook to handle updates.
When I click on an inline button, the bot sends the correct reply, but it keeps repeating the same response ...
0
votes
1
answer
60
views
breakglass/elevated permissions? [closed]
I have a script which applies protection (ie, performs a .removeEditors) via an installed trigger to a sheet row depending on some user input. There is a possible use case whereby the user (not the ...
1
vote
1
answer
62
views
How to test a Google Drive add-on?
I have written a simple add-on using google apps script, and "deployed" it as "Add On".
But whatever I do, I cannot figure out how to connect that add on to my drive account so I ...
0
votes
0
answers
49
views
copyTo Error: Exception: The parameters (SpreadsheetApp.Range,number,(class)) don't match the method signature for SpreadsheetApp.Range.copyTo
I have a spreadsheet from last year and it worked OK then. Without edits, I opened it and now it throws this execution error:
Exception: The parameters (SpreadsheetApp.Range,number,(class)) don't ...
1
vote
1
answer
100
views
Google Sheets script - slow running
I have the following code to copy the last row (effectively used as a template) and paste it a user-defined number of times into the sheet, effectively inserting new rows:
function InsertNewRows() {
...
1
vote
1
answer
69
views
Google Sheets script .protect() working intermittently
Depending upon a specific input in a set of cells on my Google Sheet, I want to be able to freeze a particular row and stop it being updated.
I have the following script:
function testFreeze() {
...
0
votes
0
answers
74
views
Google App Script randomy fails with "Summary of failures for Google Apps Script: Not found"
I have a Google Apps Script project that fails randomly.
Sometimes, it will work fine for days and then fail multiple times in a day
Note: The code doesn't change. Code make use of email, google sheet ...
0
votes
0
answers
49
views
Gmail API 403 "Delegation denied" error using Service Account DWD (Apps Script) despite Super Admin role
I am running a Google Apps Script to programmatically update Gmail signatures for users across my Google Workspace domain using a Service Account with Domain-Wide Delegation (DWD).
Despite confirming ...
0
votes
0
answers
39
views
Publish group google calendar event via google script
Through the google calendar publish event interface, it is possible to copy an URL link which can be used by others to see that event, if they have access to the calendar.
Google Calendar Publish ...
0
votes
1
answer
63
views
Guide User to Log Into Workpace Account with Published Apps Script Web App for Only My Domain
I have a published Web App in Apps Script set to "anyone in my domain can view" that I need to "execute as me". If an end user is only signed into Google accounts that aren't in my ...
-1
votes
1
answer
61
views
Google Workspace Add-on rejected with generic 'Add-on error' when calling external API (UrlFetchApp) [closed]
I have developed a Google Workspace Add-on (published from a standalone Apps Script project) that relies on making an external API call for verification and event logging. The app works perfectly when ...
0
votes
1
answer
69
views
Sort Tabs Alphabetically keeping Certain Tabs first and ignoring Hidden Tabs
I have a file that includes a variety of reference sheets and sheets that are only used at the end of the academic year plus a tab/sheet for individual students. Students come and go so I need the ...
1
vote
0
answers
52
views
Google Apps Script getOAuthToken() times out when calling authenticated Cloud Function, despite all configurations checked
Goal:
I am trying to call a 2nd Gen Google Cloud Function (Python, private/requires authentication) from Google Apps Script (GAS).
The Problem:
The execution consistently fails. When ScriptApp....
-6
votes
1
answer
149
views
Cors issue with app script and javascript
I have a javacript that create an Html file and i wanna send it to some email addresses
So i made an app script doPost seen below...
But everytime try to send the emails with my button on my web page ...
0
votes
0
answers
37
views
Inconsistent Master/Theme Application when Batch-Inserting Slides via Apps Script
I am facing a strange and inconsistent issue with theme application when generating presentations using the Slides API and an Apps Script helper function.
My Goal:
I'm building a service to generate ...
0
votes
0
answers
36
views
Modify the signature label in gmail [duplicate]
I am developing a script that will update all the user signatures in our workspace. It works however the signature label is "My Signature" instead of the primary email e.g. [email protected].
...
0
votes
0
answers
64
views
Error 405: Moved Temporarily from Google Apps Script even though server still accepts the payload
Assume the following simple setup for sending telemetry to Google Sheets:
Curl -> Google Apps Script deployed as Web App -> Google Sheet -> Cell 1:1
Google Apps script is a simple doPost() ...
0
votes
1
answer
68
views
Time values not adhering to set format
As part of an onEdit function, I compare two times. If the second time is less than the first time, I will get the user to re-enter the time so that it is later. My problem is in comparing the two ...
0
votes
2
answers
97
views
Make onEdit work for two separate tables within the same sheet [closed]
How would I be able to make this function work for two separate tables within the same sheet?
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Leaderboard"); ...
1
vote
1
answer
64
views
Range selection and clear script not working
I have a script which is trying to clear a range of cells. However, it doesn't do anything:
function smlsmlTest() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet(...
1
vote
2
answers
88
views
Fetching overridden events from Google Calendar
I have a Google Apps Script to automate the description of Google Calendar events. The script runs once a week and tries to fetch, and modify, the occurrence for the week to follow.
The code to find ...
1
vote
2
answers
90
views
Referencing multiple columns in e.range.getColumn()
I have an onEdit script that check for updates to certain cells and then does stuff based on the contents of the cell:
function onEdit(e) {
var sheet = e.source.getActiveSheet();
if (sheet....
1
vote
2
answers
177
views
How do I add a row after a group of data in Google Sheet to overcome its time limit?
I'm very new to using Apps Script, and I'm working with a sheet with over 82,000 rows. I'd like to run a script to create an empty row after a group of surnames (column A) sorted alphabetically to ...
0
votes
0
answers
35
views
Set up installable trigger function on Android? [duplicate]
I have the following code:
/**
* Setup function to install the onEdit trigger
* Run this once to set up the installable trigger
*/
function setupTrigger() {
try {
// Delete any existing ...
2
votes
2
answers
168
views
Change default indentation in Google Apps Script editor
How do I change the default indentation in the Google Apps Script editor. It defaults to 2. Even though there are lines, I find it difficult to align the code blocks, especially when they are quite ...
0
votes
0
answers
68
views
Google AppScripts, sending email as another user
I have created a Google Sheet and paired AppScript with which I am sending emails. Now, I understand that there is a limitation with the SendMail function where you can’t amend the “from” field, ...
1
vote
1
answer
145
views
Autocomplete for nested vars imported from a library
I’m building a Google Apps Script library and I’d like to expose some constants as a nested object.
var CONFIG = {
LEVEL0: {
LEVEL1_A: 'A',
LEVEL1_B: 'B'
}
};
When I use this library in ...
1
vote
0
answers
86
views
Google Apps Script fails to automatically request necessary OAuth scopes for SpreadsheetApp and ScriptApp
I'm experiencing a very unusual issue with Google Apps Script that I haven't encountered before, despite having built similar scripts multiple times. The script seems to be failing to automatically ...