236 questions
0
votes
1
answer
60
views
Getting 404 when trying to execute GCP scripts().run using service account
I'm trying to access an Apps Script I have created, via Python using a service account that I have which is linked to my GCP project.
I've created an API executable deployment, and set the project ...
1
vote
2
answers
141
views
Google Apps Script 403: The caller does not have permission
Task
I'm creating a Apps Script that adds new Feedback row to the containing Google Sheet whenever the API is invoked.
Setup.
I have a Google Sheet named Feedback
Created the Apps Script (Code.gs - ...
2
votes
0
answers
57
views
Is it possible to mass replace scripts in the Google spreadsheet (extensions -> apps script) with a given name?
I need to create a script in python/google scripts that will replace the script in the sheet. The source script that will be used for the replacement will be saved as Google Script and will have a ...
1
vote
1
answer
120
views
How can we run a function from Standalone Script A to create a time-based trigger in Script B or any copy of Script B using Google Apps Script?
I have tried everything, including enabling the Google Apps Script API in console.cloud.google.com, setting the project number of that project in Script A, and ensuring that the Script ID of Script B ...
3
votes
1
answer
307
views
How to clasp list, clasp clone, clasp pull and/or clasp push a Google Apps Script project bound to a Google Doc container (eg. Google Sheet)
How can clasp access Google Apps Script projects bound to their Google Doc container using clasp list, clasp clone, clasp push, clasp pull? Without proper use they fail with errors like:
clasp list: ...
0
votes
0
answers
94
views
Google Apps script exceeds execution time without really triggering
Here's a rephrased version:
I have a script that runs every minute, but occasionally, about once a day, it fails with an "Exceeded maximum execution time" error.
To investigate the cause of ...
-1
votes
1
answer
253
views
Running multiple Google Apps scripts sequentially (one after another)
I am working on a sheet that pulls data from an API, then runs calculations on it. Because of timeouts and limitations, I need to run one script, wait for the calculations to finish, then run another ...
0
votes
2
answers
63
views
Appscript REST Api slowness
I am calling the following appscript function using google.script.run from my mobile application.
Code
function addOrUpdateEntry(response) {
let sheetName = "X";
var lock = ...
0
votes
1
answer
160
views
Error 500 on POST https://script.googleapis.com/v1/scripts/{scriptId}:run
I have a dummy function inside the Apps Script that I want to execute with Postman.
Apps Script simple dummy function
Every seems to be OK in my postman request, but I always recieve an error 500.
...
0
votes
1
answer
122
views
Why does running Apps Script function from Apps Script API returns 500?
Keep in mind the difference between Apps Script(AS for short) projects (code.gs) and the Apps Script API.
The general idea is to be able to create AS projects, write functions inside and execute them, ...
-1
votes
1
answer
68
views
Is there a way to run Apps Script web applications in a "queue", respecting the completion of one execution to start the next?
I have a web application that is started by my CRM, but sometimes it runs twice in a very short period of time and this is affecting the proper functioning of the code, causing 2 simultaneous ...
0
votes
1
answer
63
views
Permission issues deleting files with Google Drive API in ruby
I have a Google Apps Script that creates json files from spreadsheet tabs:
function makeJSON() {
var spreadsheetId = 'someId';
var spreadsheet = SpreadsheetApp.openById(spreadsheetId);
var ...
0
votes
0
answers
134
views
POST request to Google Apps script from Spring Boot controller
I am trying to do a post request to google apps script function through a spring boot application and I am getting unauthorized exception.
My spring Boot controller function is as below
@PostMapping(&...
0
votes
0
answers
350
views
Call Google Apps Script from a Google Cloud Function
I am attempting to write a Google Cloud Function that will call an Apps Script function that is deployed as an API Executable.
I have confirmed:
the Apps Script is deployed as an API Executable and ...
0
votes
0
answers
148
views
User Access Ctrl for Google Script App with 'Execute as Me' option
I have a Google App Script based WebApp for basic CRUD operations with Google sheet as source of data.
This will app be used by multiple users in the team but with restricted access. i.e some users ...
0
votes
0
answers
854
views
Can I save a Google Sheet as an older XLS, rather than a XLSX file?
I want to achieve this with Google Apps Script, or the Google Drive API directly.
I know it is possible to create a new XLSX file from a Google Sheet
var url = file.exportLinks[MimeType....
1
vote
1
answer
145
views
How to send localhost Blob(Clipboard Image Data) send to other server (Google Apps Script)
I want to send Blob(Clipboard Image Data, Client Javascript) to other server (Google Apps Script) for storing in Google Drive.
client and server is not same domain.
I try below code but It's not ...
0
votes
3
answers
486
views
Apps Script API Getting a 404 error when using `https://script.googleapis.com/v1/scripts/${fileId}:run`
I'm trying to run a function in another script file. Here is my code:
function testGet(fileId = "1JjRpqhqJMvXETMMzlYFnuulni6DuwLl9jxlYnGNNm45NwzPXdtcWOK0a") {
const url = `https://script....
1
vote
0
answers
155
views
How do I update my users' contacts and contact photos with the Google People API?
I'm attempting to create contacts for my Google Workspace users to be pushed to their iOS devices via MDM Account Configuration. I'd like to include a contact photo with each contact, as well.
I'm ...
0
votes
1
answer
821
views
Calling Google Apps Script functions with Python: "Requested entity was not found"
Trying to call a GAS function with Python from Cloud Shell Editor, but not sure what I'm doing wrong. I scoured through stackoverflow, and tried using executable API, but that forced me to use OAuth2....
0
votes
1
answer
240
views
Enable Apps script API for user via apps script
Despite of what documentation says as of today, I have managed to use Apps script API with a service account
I'm trying to find a way to programmatically enable the Apps Script API for all my domain ...
0
votes
0
answers
135
views
Share App Script to Google Sheet template for External use
First of all I am no pro/ don't really understand coding etc., just using everything that is available online.
I have added to my google sheet template App Script code which works fine. As I will be ...
1
vote
1
answer
217
views
screenshot from copy of google slide
I'm new to google App Script.
I made this script for copying a template slide show and after the copy is made i fill it with tekst of a google sheet.
When it's ready I want to make screenshots of the ...
3
votes
2
answers
338
views
Google Apps Script Importation of a CSV file into Google Sheets from Gmail Sub-Label
I am very new to google apps script and I am trying to automated some daily reports. I receive updated reports to my inbox daily and I am trying to use a code to grab this updated CSV report daily ...
0
votes
1
answer
145
views
Personal Gmail Google Doc Apps Script Will Not Allow Authorizing - This app is blocked
I can't seem to authorize a Google Doc Apps Script to run. When adding permissions Google keeps returning:
"This app is blocked
This app tried to access sensitive info in your Google Account. To ...
0
votes
2
answers
707
views
onEditHandler works but onSelectionChange fails with Exception: You do not have permission to call UrlFetchApp.fetch. Required permissions:
I want that when the button is clicked (which is just an image within the cell), the function to translate the text is fired:
When using onSelectionChange, the following error is output:
Exception: ...
0
votes
0
answers
37
views
How to work around with App Script API with Service account [duplicate]
I want to call Apps Script API in my app, it works fine with web user authentication but has a 403 error when I change to using a service account.
I discovered that the reason is that the Apps Script ...
1
vote
0
answers
61
views
Where can I find a list of Google print parameters
I am trying to write scripts to automate creating a PDF from a range of cells in Google Sheets. I can't find a list of the print parameters for Google Print. Where can I find these?
I've found the ...
0
votes
1
answer
1k
views
Google App Script - Set trigger when data is added to a specific column via a function
I have a table in which column I gets updated programmatically via an Array Formula. And when that happens, i.e a new row of data is added in column I, I want to run the fillTemplateAndDuplicate ...
3
votes
1
answer
747
views
Sanitize data in Google Apps script (XSS)
The script:
The script i'm working on is getting input from Google Forms and after some things done with the data from the form the script will build up an e-mail and send it to a user / some users.
...
0
votes
1
answer
608
views
Google Apps Script: appendRow() getting values like [Ljava.lang.Object;@66e6c522
function doGet(e){
var p = e.parameters;
try {
if ("username" in p) { // user info get
let id = p.ID;
let username = p.username;
let time = p.time;
let email =...
0
votes
1
answer
209
views
Unable to call DocumentApp.openById. with onEdit() in GooglApps Script and Sheets
I'm still very new to Javascript and Apps script in particular so sorry if this is dumb.
I'm currently trying to create a mail merge tool.
The Idea is that each field in a spreadsheet is manually ...
0
votes
0
answers
214
views
Speed up adding Items to Forms with Apps Script
I'm wondering if there is a more efficient way to add Items to Google Forms with App Script.
My script is taking a long time and I'm wondering if there's anyway to add items more efficiently using an ...
0
votes
0
answers
1k
views
NodeJS Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential
I am trying Google Apps Script API. I receive this
Request is missing required authentication credential" error by trying service.scripts.run({ // params }).
Can somebody help me figure out, ...
0
votes
1
answer
103
views
How to allow other user to execute script on Google Apps Script
I have script that works fine on my account but I want other user to be able to use that script over API Executable.
var serviceScript = new ScriptService(new BaseClientService.Initializer(...
1
vote
1
answer
274
views
Enable other users to run Google App Script Function on protected sheet
I'm new to Google App Script and have created this function that allows members to submit data through a form. I want to protect the sheet where form records the data in so that the other users can't ...
0
votes
1
answer
655
views
Running Google Apps Script for a Google Doc from inside a Google Chrome extension
I am trying to make a chrome extension that adds an extra custom menu to google docs. I have already figured out how to make an extension, and I also have figured out how to make an extra menu in apps ...
1
vote
1
answer
102
views
Adding Google Classroom ID based on user enrollment code
I have a spreadsheet where a user can list classes and Google Classroom enrollment codes, represented by the array userClassCodes. This array is allowed to contain blank values when the range contains ...
0
votes
1
answer
177
views
Is there branching functionality on a Google Apps Script Project?
I am new to Google Apps Script projects, and have a Google Calendar add-on that I have been working on. My users recently came across some bugs, and I realized that I had no idea how to go back to the ...
1
vote
1
answer
1k
views
Use base64 encoded image in Google Chat card image widget
I am using the Google Chat card api to send a card back to a user to answer their questions. I wish to include an image within the results, however a direct URL cannot be provided since it is only ...
0
votes
1
answer
565
views
403 The caller does not have permission when calling Apps Script API from a Cloud Function
I'm building a Workspace addon that you launch from Google Drive and that will be executed as a background task.
To do so my apps script addon calls a Google Cloud Function that calls the Apps Script ...
1
vote
1
answer
698
views
Automate running several projects at once in google script
I have multiple spreadsheet bound projects, and I want once in a while run all of them together. Is there a possibility to automate this, as I do not want open each project and run it manually. And as ...
0
votes
2
answers
842
views
"The script completed but the returned value is not a supported return type."
I created a very simple app script that returns ContentService.createTextOutput("Hello"), associated it with a Google Cloud project, and created a JavaScript program to get the return value. ...
1
vote
1
answer
704
views
Is there way to Pre-Fill name from the signed in Google Account in Google Forms?
I need to pull the name off of the GSuite Business account name and have it automatically be filled in the form when opened along with the email address. Is this possible using Apps Script?
0
votes
1
answer
253
views
Google Apps Script API give entire organization read access for a Script
I am developing an add-on for Google Docs. The add-on is being constantly updated and therefore I have created an auto-update mechanism which works by saving the last script version used to a Document ...
0
votes
1
answer
2k
views
How do I connect a script application to the Google Cloud Platform?
How do I connect a script application to the Google Cloud Platform?
I found how to do it manually.
But how to do it programmatically?
File file3 = new File()
.setName("appsscript&...
0
votes
0
answers
72
views
Iterating API parameter in google app script
I'm trying to use this API to fetch data directly in my google spreadsheet, I'm using Google AppScript.
Below is my API
=ImportJSON("https://rest.yyy.com/v2/matches?date=2022-06-01(Date start - ...
0
votes
0
answers
210
views
Google Calendar trigger - Script function not found
I implemented a Google Calendar AddOn for hundreds of users which also installs a calendar trigger for each user to run some business logic whenever something changes in the user's calendar. The ...
0
votes
1
answer
519
views
404 requested entity was not found error in appscript deployment api
Hello i am trying to deploy an appscript project using the rest api for appscript, it gives me a 404 error in response, my code looks like this
The google appscript api is enabled on my account and i ...
2
votes
2
answers
429
views
Apps script that shares a google sheet to a specific group of people
I have an apps script that creates a new Google worksheet each time a new entry is made in Column A of sheet1 of a Master Sheet and renames that new worksheet to the last entered data in column A of ...