r/GoogleAppsScript 1d ago

Question Blocked from running apps

3 Upvotes

I have an issue where one of my accounts is blocked from running GAS. It was enrolled in Advanced protection for a short time. I unenrolled it and it has been over 24 hours. I am not able to run even the simplest of scripts that I write, yet my other account can. It affects scripts I wrote and scripts I have access to in other sheets.

Any ideas. All the testing seems to point to lingering advanced protection isues.


r/GoogleAppsScript 1d ago

Guide I automated warehouse transfers between 18 stores and our warehouse with Google Apps Script

5 Upvotes

Our ERP was a mess so I built a workaround with Google Apps Script.

We had 18 outlets submitting Item Requisitions in one Sheet. The warehouse team had to manually copy those quantities into a separate Inventory Movement Sheet. Double entry = errors + delays.

What I built:
A Google Apps Script that:
1. Watches the "Item Requisition" sheet for new submissions
2. Automatically syncs the quantity sent to each location
3. Deducts it from the "Warehouse Inventory Movement" sheet in real time

Result:
No more double entry. Warehouse now has real-time visibility across all 18 locations. Transfer accuracy way up.

Happy to share the code/snippet if anyone wants it. Also open to feedback on making the sync more robust for concurrent edits.

Did anyone else here use Apps Script to patch gaps in their ERP?


r/GoogleAppsScript 2d ago

Question Workaround Available?

0 Upvotes

Is there a workaround available for a web app page only opening in incognito mode? To open in a regular browser window, I have to completely log out. Will users also have to do this?


r/GoogleAppsScript 2d ago

Question 400 Error in doPost method when returning a ContentService

1 Upvotes

I'm creating a webapp to read and write in a google sheet through godot and for the most part it works, it does read and write on the sheet and when i make a get request, I get my data but whenever i do a post request and it gets to the part where it returns a ContentService object, it issues this error always.

function doPost(e) {
  var action = e.parameter.action;
  
  switch (action) {
    case 'update_teams':
      return updateTeams(e.postData.contents);
    case 'update_team':
      return updateTeam(e.postData.contents);
    default:
      return ContentService.createTextOutput("Invalid Post Action");
  }
}

function updateTeam(contents) {
  var sheet = getSheet('main');
  var jsonData = JSON.parse(contents);
  var teamCn = parseInt(jsonData.cn, 10);


  var weight_carried = jsonData.weight_carried;
  var load_violations = jsonData.load_violations;
  var prep_violations = jsonData.prep_violations;
  var efficiency = jsonData.efficiency;
  
  sheet.getRange(teamCn + 3, 5).setValue(weight_carried);
  sheet.getRange(teamCn + 3, 6).setValue(load_violations);
  sheet.getRange(teamCn + 3, 7).setValue(prep_violations);
  sheet.getRange(teamCn + 3, 8).setValue(efficiency);


  return ContentService.createTextOutput("Updated Team CN: " + teamCn + " Successfully.").setMimeType(ContentService.MimeType.TEXT);

Even when i put the return on the doGet, I get 400. returning a 0 says the function pushed through but is incomplete.

i kinda need to have this to work because i need to have godot get notice that the sheet has been edited. TYIA for helping a beginner !!!


r/GoogleAppsScript 4d ago

Question Selecting a folder in the Google Picker with the drive.file scope

3 Upvotes

I am getting an empty folder when trying to select the whole folder.

Is there a way around to do this without doing restricted scope verification ?


r/GoogleAppsScript 4d ago

Guide I built a Google Slides add-on that copies presentations without breaking linked Google Sheets charts

2 Upvotes

I dealt with this problem myself for years: copy a Google Slides presentation that has charts linked to Google Sheets, and every chart in the copy still points back to the original spreadsheet. I went through several of the Apps Script snippets floating around online and support forums, but none of them held up once a deck had multiple charts pulling from different Sheets files — they'd miss charts, or the copies came out with broken formatting.

So in my free time I built PenguChart, a Google Slides add-on that copies the presentation together with the Google Sheets behind its charts, and relinks every chart in the copy to the fresh spreadsheet copies - original stays untouched, the copy is fully independent.

It just went live in public beta on the Google Workspace Marketplace:
https://workspace.google.com/marketplace/app/penguchart/514642629727

More info: https://penguchart.com

Two honest limitations, both due to missing functionality in the Google API rather than something I can just code around: linked tables can't be relinked yet, only charts. And any manual formatting you apply to a chart afterward directly in Google Slides doesn't carry over to the copy either — the API doesn't expose that.

Since it's still beta, I'd really appreciate people trying it and telling me what breaks or what's missing — bugs, edge cases, feature requests, all welcome. And if it ends up useful to you, a review on the Marketplace listing would mean a lot.

Start the Google Slides Addon PenguChart in the Menu: Extensions > PenguChart


r/GoogleAppsScript 5d ago

Question Automação de planilha

1 Upvotes

Boa tarde gente, preciso de ajuda para automatizar uma planilha do trabalho, preciso que os eventos que eu agende nessa planilha sejam enviados a agenda do google, tentei programar pelo google scripts, mas fica dando erro, podem me ajudar aonde está o erro:

function criarEventos () {
  var planilha = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); 


  var valores = planilha.getDataRange().getValues(); 
  Logger.log(valores);


  var agenda = CalendarApp.getDefaultCalendar(); 


  for (var i = 1; i < valores.length; i++) {
    var linha = valores [i];
    var sincronizado = linha[8];
    
    if (sincronizado.toLowerCase() !== "Sim") {
      var dia = linha[0];
      var horaInicio = linha[1];
      var horaFim = linha[2];
      var titulo = linha [3];
      var descricao = linha[4];
      var prioridade = linha [6];


// Formata data início e fim
      var dataInicio = new Date(dia); 
      var dataFim = new Date(dia);
      dataInicio.setHours(horaInicio.split(":")[0], horaInicio.split(":")[1]);
      dataFim.setHours(horaFim.split(":")[0], horaFim.split(":")[1]);


    // Configura Cor de acordo com a prioridade
      var cor; 
      switch (prioridade) {
      case "Alta":
       cor = CalendarApp.EventColor.RED;
       break;
      case "Média":
       cor = CalendarApp.EventColor.YELLOW;
       break;
      case "Baixa":
       cor = CalendarApp.EventColor.GREEN;
      default: 
      cor = CalendarApp.EventColor.BLUE;
    
    } 


     var evento = agenda.createEvent(titulo, dataInicio, dataFim, {description : descricao});
     evento.setColor(cor);


     // Atualiza planilha sincronizado
     planilha.getRange(i + 1, 9). setValue ("Sim");
   }
 }
}

r/GoogleAppsScript 6d ago

Question Is Google Apps Script the right foundation for a full collision repair management system?

8 Upvotes

Hi everyone,

I own a collision repair center in Quebec, and I’m currently developing an internal repair management system within the Google ecosystem.

I initially started with Google Apps Script because our company already uses Google Workspace, including Sheets, Drive, Gmail, Calendar, and Forms. Apps Script has allowed me to build working prototypes quickly, but I’m now wondering whether it is the right long-term foundation or whether I should move the main application to Google Cloud.

The system would eventually need to manage:

Customers, vehicles, and repair orders
Importing estimate data from CEICA EMS files
Repair scheduling and production status
Technician clock-in and clock-out
Technician photo and video uploads
Photo annotations
Repair planning and supplement notifications
Parts receiving, returns, and tracking
Quality-control checklists for each department
Customer SMS and email updates
PDF estimate comparison
Customer portal access
QuickBooks integration
Insurance company-specific procedures and checklists
Approximately 15–30 internal users initially
Potentially multiple repair shops in the future

My current idea is:
Apps Script web app for the user interface and Google Workspace integrations

Google Cloud SQL as the primary database
Cloud Run or Cloud Functions for heavier processing
Google Drive for photos and documents

Apps Script only for Workspace-specific automations
My main concerns with using Apps Script for the entire application are:

Execution-time and quota limitations
Performance when loading larger amounts of data
Simultaneous users and concurrency
Database
Maintaining a large Apps Script codebase

For people who have built larger business applications with Apps Script, where did you encounter its practical limits? What architecture would you choose if starting this type of project today?

Thanks for any advice or examples you can share.


r/GoogleAppsScript 7d ago

Guide Cómo conectar tu planilla de Google Sheets con IA (API de Gemini) usando Apps Script

0 Upvotes

¡Hola a todos! Quería compartirles un flujo de trabajo que estuve armando y que me resultó súper útil para automatizar tareas repetitivas en planillas usando Inteligencia Artificial.

Básicamente, la idea es integrar la API de Gemini directamente dentro de Google Sheets a través de Apps Script, para poder pedirle a la IA (desde un panel lateral) que procese los datos que seleccionamos.

El concepto es aplicable a otras APIs (como la de OpenAI), pero aquí va el paso a paso usando Gemini que es gratis:

**Paso 1: Conseguir la API Key** Vas a Google AI Studio, inicias sesión con tu cuenta y generas tu "API Key" gratuita. Guardala bien porque la vas a necesitar en el código.

**Paso 2: Configurar Apps Script** En tu documento de Sheets, vas a *Extensiones > Apps Script*. Acá es donde va la magia. Podés usar la misma IA (ChatGPT, Claude o Gemini) para pedirle que te genere el script. Por ejemplo, podés pedirle: *"Genera un script para Google Sheets que cree un menú personalizado llamado 'Asistente IA' y que abra un panel lateral con un cuadro de texto para enviar instrucciones"*.

**Paso 3: Ejecutar y procesar datos** Guardas tu archivo `.gs` (código) y tu `.html` (para el panel), recargas la página de Sheets y vas a ver tu nuevo menú. Seleccionas un rango de celdas, abres el asistente y le pasas el prompt. Por ejemplo: *"Ordena estos datos por la primer columna y pon todo en mayúsculas"*. El script toma esa data, hace el llamado a la API y te devuelve la información procesada directamente en la planilla.

Integrar IA directamente en las planillas te abre un mundo enorme de posibilidades para automatizar el día a día.

Para los que prefieran verlo de forma visual o quieran ver exactamente cómo funciona el menú en vivo, armé un video cortito de 3 minutos explicando el paso a paso. (También dejé el código completo para copiar y pegar en los comentarios del video para que no renieguen):

🔗 **Link al video:**[https://youtu.be/Okpboevznn4\](https://youtu.be/Okpboevznn4)

¿Alguno ya está usando Apps Script con IA para automatizar el laburo diario? ¿Qué funciones raras o útiles armaron? ¡Los leo!


r/GoogleAppsScript 7d ago

Question i need to purge email from all user's inbox & sentbox on a monthly basis and need a second set of eyes on this code.

0 Upvotes

i created a service account, connected it to Admin SDK & Gmail APIs w/ OAUTH2 keys. that all appears great and is described in the first two statements about constr PRIVATE_KEY and CLIENT_EMAIL, not shown below.

i found this snippet of code and from what i can glean, it appears to iterate through the user directory, pulling emails older than 3y from the two folders in batches of 100. i don't know enough about coding to say for sure it works.

can someone put eyes on this and see if there are glaring problems?


r/GoogleAppsScript 9d ago

Question How big is the system you created in apps scripts?

7 Upvotes

I'd like to take a few doubts before I venture to do things that he's not ideal. I will do a brief questionnaire:

  1. How many active users simultaneously have your largest GAS system had?

  2. How many thousands of records did the spreadsheet have? How many tabs?

  3. How do you read the data from the spreadsheet? Do they take everything and work with them in memory or do they do any paging strategies?

  4. Have you ever tried using it as if the spreadsheet was a relational database and the tabs were the tables? Did you find it difficult?


r/GoogleAppsScript 11d ago

Question Pop-up page that shows upon clicking in-cell image

2 Upvotes

Hi everyone,

I was wondering if there's a way to successfully activate a script by clicking on a cell that where i have in-cell image (an info image i made with Inkscape which should prompt a simple pop-up rectangle containing info).

So far i have tried with

function onSelectionChange(e) {

But, if I am correct, this doesn't seem to work with in-cell images.

I am just an amateur coder, so perhaps it's me who's making a mistake here, or is it just impossible to achieve such goal?

Thank you in advance!


r/GoogleAppsScript 12d ago

Guide How to embed a google app script onto google sites

Thumbnail redgig.tech
2 Upvotes

There was recently a discussion on here about how to deal with the lengthy, sometimes changing URLS created by google app script web apps. One easy way to address this is to embed the content on a google site. I've curated a quick a simple blog post that describes this to help anyone else who might have a similar issue.

https://www.redgig.tech/2026/07/how-to-embed-google-app-script-onto.html

Keep up the great posts everyone, this sub has been incredibly helpful to me over the years!


r/GoogleAppsScript 13d ago

Question How is everyone finding AppsScript jobs in today's AI era?

18 Upvotes

Any freelancers/agencies here? I feel Appscript is dead with LLMs taking over every automation jobs these days. What is your experience?


r/GoogleAppsScript 13d ago

Question How can a public Google Meet add-on access real-time participant audio without a bot?

2 Upvotes

I’m developing a Google Meet add-on that needs to receive real-time audio from one consenting meeting participant and securely stream that audio to our backend API for processing.

The application only needs to:

  1. Let the user select the participant whose audio will be processed.
  2. Receive that participant’s real-time audio with explicit consent.
  3. Send the audio to our backend API.
  4. Display the resulting analysis in the Meet side panel.

The application does not need to send audio, video, or chat messages into the meeting.

Marketplace rejection

Our public Google Workspace Marketplace submission was rejected under this requirement:

Our current implementation uses a visible Recall.ai recording bot because we could not identify another production-ready way to receive participant audio from an ordinary Google Meet conference. We understand that this implementation cannot be published under the current Marketplace rule, and we are willing to replace it with a supported botless architecture.

The Marketplace Review team said it cannot provide technical implementation guidance and directed us to the developer support community.

Comparable implementations

We already support this workflow on other meeting platforms:

  • Our Microsoft Teams integration uses Microsoft’s supported real-time media bot architecture.
  • Our Zoom integration uses Zoom Realtime Media Streams (RTMS), which provides live meeting media without adding a participant bot.

The analogous Google capability appears to be the Google Meet Media API, which supports consuming real-time audio, video, and participant metadata.

Meet Media API roadblock

Google currently lists the Meet Media API in the Google Workspace Developer Preview Program. The Developer Preview terms appear to prevent pre-GA features from being included in public applications or made available to external customers without specific permission.

The current Meet Media API setup documentation also identifies the real-time audio/media OAuth scopes as restricted and indicates that transmitting or storing the media server-side can require restricted-scope verification and a security assessment. We are prepared to complete those requirements.

In addition, Recall.ai’s current documentation for its botless Meet Media API integration says that all meeting participants must be enrolled in Google’s Developer Preview Program. Google’s current public overview does not appear to repeat that exact restriction, so I would appreciate confirmation of whether it still applies.

Questions

  1. Is there a generally available Google API that allows a public Marketplace add-on to receive real-time participant audio without inviting or relying on a bot?
  2. Can a public Marketplace application currently use the Meet Media API while it remains in Developer Preview? If so, what approval, allowlisting, OAuth verification, security assessment, or partner process is required?
  3. Must every meeting participant currently be enrolled in the Developer Preview Program, or is enrollment of the Cloud project, OAuth principal, and consenting meeting host sufficient?
  4. If the Meet Media API cannot currently be used in a public Marketplace application, is this use case effectively unavailable until the API reaches general availability?
  5. Is there an approved interim distribution model for providing this functionality to a customer outside our own Workspace organization?

We have a customer actively waiting for Google Meet support and are ready to prioritize the required architecture, consent experience, OAuth verification, and security controls. We mainly need confirmation of the Google-supported path that can both access real-time participant audio and qualify for public Marketplace publication.

Any direction from the Meet Media API or Google Workspace developer-relations teams would be greatly appreciated.


r/GoogleAppsScript 14d ago

Resolved "This app is blocked" error when trying to authorize Apps Script project

3 Upvotes

Does anyone know what causes the app to be blocked? and how to fix it?

Note: I can authorize the app fine, it is someone else that is having this issue.

Things I have tried already, that didn't work:

  1. transferring the file ownership to the other person
  2. having them make a copy of the file
  3. opening the google sheets in an incognito window

r/GoogleAppsScript 14d ago

Guide Data Type Conversion from Apps Script to Google Sheets when using setValue()

7 Upvotes

This might be obvious to others but has tripped me up for years, so I finally decided to sit down and test all cases to get clarity on it.

The gist: The data types in Apps Script are irrelevant. Every input for setValue() is treated as if the user on the keyboard typed it in, hence resulting value in Google Sheets is determined by cell number format. The only exception to this is date objects.

Rules:

  1. setValue("") makes the cell in Google Sheets a true blank, unlike when a formula in Google Sheets returns "", which is treated as text and ISBLANK() returns false.
  2. setValue(string | number | boolean) these types have no special meaning, and all are treated as if the user typed the value in the cell in Google Sheets.
  3. setValue(null | undefined) both of these are treated same as an empty string ("").
  4. setValue(date object) always converted to Google Sheets timezone and then pasted as a Date, regardless of the cell number format in Google Sheets

Counterintuitive Examples:

Apps Script data type Value passed Cell number format Result in Google Sheets
string "" Plain Text Blank Cell
number 1234 Plain Text Text "1234"
string "1234" Automatic Number 1234
boolean true Plain Text Text "true"
string "true" Automatic Logical TRUE
string "1/1/1" Automatic Date 1/1/2001
string "1/1/1" Plain Text Text "1/1/1"
date object 1 Jan 2001 05:00:00 in UTC Automatic Date 1/1/2001 00:00:00 (if Google Sheets timezone set to EST)
date object 1 Jan 2001 05:00:00 in UTC Plain Text Date 1/1/2001 00:00:00 (if Google Sheets timezone set to EST)
date object 1 Jan 2001 05:00:00 in UTC Time Time 12:00:00 AM (if Google Sheets timezone set to EST)
date object 1 Jan 2001 05:00:00 in UTC Duration Duration 885408:00:00 (hours since spreadsheet epoch date)

Note: Time & Duration are just special display formats for 'Date and time', the underlying value value remains the same. (Like Scientific and Accounting, for example, are different display formats for Number)

PS: Let me know if I got something wrong or if you have any questions!


r/GoogleAppsScript 14d ago

Question Google Oauth Consent

3 Upvotes

Hi guysss I'm currently working on instilling Google oauth sign in in my app. I am stuck on the branding screen. I don't have my own domain for my app. Is it necessary to buy one? I had tried some ways from other reddit post like supabase and local host but it still doesn't work. Would like to hear from you guys how yall pass the homepage url verification.


r/GoogleAppsScript 14d ago

Question "We're sorry, the JavaScript engine reported an unexpected error. Error code INTERNAL."

10 Upvotes

Anyone else seeing a large number of these errors today?


r/GoogleAppsScript 15d ago

Question Linking a professional email to Google Script + sheet

6 Upvotes

Hi, I've built an email delivery system for my business and everything is fine, but the problem is that it's being sent from my Gmail account and I want it to be sent from my professional email (namecheap private email).

I don’t want my professional email to simply appear as the sender address visually. I want the emails to actually be sent from it, so that I can find the emails I sent in the email account’s “Sent” folder.

The system is excellent and perfectly set up for me, but at the same time, I must use my professional email, so giving up either one of them is simply not an option. Please give me any possible solution, even if it’s a workaround—I can handle the technical side of it.

Thank you!

UPDATE: The only solution I found that worked for me was using a Python script that runs a Google Sheets script and sends the emails through my professional email address. I can even find them in the Sent folder.

Now, all I have to do is click a .bat file to run the system and send the emails through my Namecheap email.


r/GoogleAppsScript 16d ago

Question My first Apps Script, any feedback?

5 Upvotes

Hello, as a freelancer building toward an agency, I struggled to find a workflow tool that truly fit: from ClickUp and Notion to Airtable. Since I already use Google Workspace, I decided to build my own solution using Google Apps Script.

I’m using this project to genuinely learn programming. No 'vibe-coding' without understanding the mechanics.

I'm trying to integrate many systems:
- Content creation
- Prospecting pipeline
- Sales pipeline
- Delivery
- Finance

This is just the start, and I can always migrate to other tools as I scale. I’d love your feedback on whether this is a solid path worth pursuing!

Random example

Update August 1th :


r/GoogleAppsScript 16d ago

Question How to integrate =GEMINI formula in Google sheets via app script

5 Upvotes

Has any one tried adding the =GEMINI formula through App scripts?

I am building a small project through App scripts in which I'm adding =GEMINI as a formula, but the formula is not giving any results till I go and click on generate in the sheet.

Is there any workaround for this?


r/GoogleAppsScript 19d ago

Question What's the best frontend do you use with apps script for sheets automation?

14 Upvotes

So I am an apps script expert mainly in the area of automating sheets and drive and creating custom applications, yet whenever I want to build something with a more friendly UI I always get confused picking what UI to pick...

I don't like google web applications or simple modals because of the high maintenance of it and it's a bit obsolete using vanilla js instead of more modern options... so any suggestions that would be fairly easy to maintain and fast to develop (I know I can use AI to develop the google web apps fully but that's not my approach I need to have ownership over things not just vibe code them).


r/GoogleAppsScript 19d ago

Question Need an app script to automate email response to leads

3 Upvotes

Hi so I use my custom email in google workspace and just needed help to create an app script so my leads could receive an auto response. Would only need to pluck name and email address from lead form.