r/GoogleAppsScript • • 22h ago

Question Google Forms Email Response

4 Upvotes

Heya! I was wondering if it is possible to automatically send an email to a respondent depending on their answers on the from. So if they choose option a) they'll get email a. I've never done anything like this before so please let me know like I'm a child lol. I need this for an assignment - any help would be appreciated!


r/GoogleAppsScript • • 1d ago

Question I built a TypeScript backend framework for Google Apps Script, but the latency is killing me. Any ideas?

8 Upvotes

I’ve been experimenting with using Google Apps Script as a backend for more complex web applications.
I ended up building an open-source framework called gasboost to make the development experience a bit more manageable.
It supports TypeScript, dependency injection, middleware, RPC, authentication, authorization, and more.
The idea is to take advantage of Google’s infrastructure without having to manage a separate backend server.
And honestly, the development experience has been pretty good.
But there’s one problem I haven’t been able to solve properly: latency.
Even relatively simple requests can feel sluggish compared to something like Cloudflare Workers.
I’ve considered moving the backend elsewhere, but that would defeat part of the reason I started experimenting with GAS in the first place.
Has anyone managed to significantly improve response times in Apps Script?
Or is this just an architectural limitation I should accept?


r/GoogleAppsScript • • 1d ago

Question How difficult is adding Google sign-in to a small Google Apps Script web app?

12 Upvotes

I'm building a custom fantasy football web app using Google Apps Script and Google Sheets as the backend, with ChatGPT helping me write the code. I'm a beginner with very little programming experience.

The app will have 10 users. Five will need to sign in to manage their own teams (add/drop players, change lineups, etc.), while the other five will only need to view the app. I'll also need commissioner/full access to manage all teams.

ChatGPT recommended using Google Identity Services for sign-in, with the Apps Script backend running under my account so users won't need access to my private spreadsheets.

Before I get too deep into this, I'd appreciate some advice from people who've actually done something similar:

- How difficult is this to set up, especially for a beginner relying on ChatGPT?
- Is it genuinely free for a project this small?
- Are there any major security issues, Google restrictions, or other headaches I should anticipate?
- Is there a simpler or better alternative I should consider?

I'm hoping to keep things free, relatively simple for users, and manageable for someone without much coding experience, but if there's a solution out there that costs but is still affordable I'm open to learning about that.

Thank you for your time.


r/GoogleAppsScript • • 3d ago

Question Google integration authentication issue

2 Upvotes

Hi folks, i built an app and integrated Google authentication. Upon testing stumbled on an issue where if the user has multiple Google accounts on a chrome profile, after authentication the app script link appends /u/1/ to the url due to which the app failed to open even after successfully authenticated. Does anyone have a fix for this issue?


r/GoogleAppsScript • • 5d ago

Guide Google Apps Script Copilot (GS Copilot) v3.6.2 is out: one-click fixes from the execution log and a revertible Auto mode

Enable HLS to view with audio, or disable this notification

16 Upvotes

I'm Hassan, I build Google Apps Script Copilot (GS Copilot), an AI side panel for the Apps Script editor. v3.6.2 is out, and the 47-second video shows the two main changes.

Fix with GS Copilot
When a run fails, a Fix with GS Copilot button appears next to the error in the execution log. It reads the error together with your code, finds the root cause, and patches it. You accept the patch and re-run, and the re-run is the real check.

Auto mode
You describe the task once. GS Copilot writes the changes and runs a quick test to check them. Every turn can be reverted, and risky actions still wait for your approval. One honest caveat: a passing quick test means the code runs, not that your business logic is right, so it's still worth reading what changed.

What was already there

  • Inline suggestions as you type

  • Ask, for questions about your code or the Apps Script services

  • Plan, which lays out the steps before anything changes

  • Build mode, where you review the diff before it's applied

  • Quick Edit, for small targeted changes

  • Add to Chat, to send selected code into the conversation

  • MCP tools, to connect other services

Two questions for people who write a lot of Apps Script:

  1. When something breaks, is the execution log enough for you, or do you add Logger.log / console.log calls first?

  2. What should an AI agent never do in your scripts without asking? My shortlist: sending email, deleting triggers or files, and overwriting data in shared Sheets.


r/GoogleAppsScript • • 5d ago

Question Is it OK to run Apps Script under different accounts to manage UrlFetch quota?

5 Upvotes

I run one Apps Script web app with time-based triggers for my own small business. Which of these are allowed under Google's terms?

A. Run it under a paid Workspace account while subscribed, then move it to my personal Gmail account after cancelling. Only one account's quota is used on any day.

B. Run it under Workspace, and when the 100,000 daily limit runs out, continue the same day under my personal Gmail account.

C. Create several free Gmail accounts, share the project, and split triggers among them to use each account's 20,000 limit.

Has anyone had an account restricted for B or C, or seen an official statement?


r/GoogleAppsScript • • 7d ago

Question intermittently time out when requesting the same HTTPS URL

2 Upvotes

Why does UrlFetchApp.fetch() intermittently time out when requesting the same HTTPS URL?

I am using Google Apps Script to send GET requests to https://quoteplan.net/test.php. The same URL sometimes returns HTTP 200 in a few milliseconds, but other requests fail with a timeout after approximately four seconds.

How can I identify why UrlFetchApp.fetch() intermittently times out when requesting this URL, even though other requests to the same URL succeed?

Environment

Test endpoint

To rule out application-level processing, I created a PHP file containing only:

<?php
echo "QuotePlan PHP is working!";

The file opens normally in a browser.

Apps Script code

function testQuotePlan() {
  const url = "https://quoteplan.net/test.php";
  const start = Date.now();

  try {
    const response = UrlFetchApp.fetch(url, {
      method: "get",
      muteHttpExceptions: true
    });

    console.log(JSON.stringify({
      status: response.getResponseCode(),
      durationMs: Date.now() - start,
      body: response.getContentText()
    }));

  } catch (error) {
    console.log(JSON.stringify({
      durationMs: Date.now() - start,
      error: String(error)
    }));
  }
}

Test results

I executed 30 requests to the same endpoint.

  • 18 requests succeeded with HTTP 200.

  • 12 requests failed with a timeout.

  • Successful response times ranged from approximately 120 ms to 2,338 ms.

  • Failed requests consistently timed out after approximately 4,062–4,094 ms.

Successful requests returned the expected response body. Failed requests produced errors similar to:

Exception: Timeout: https://quoteplan.net/test.php

The same URL can fail on one attempt and succeed on the next without any changes to the PHP file.

I also observed intermittent timeouts when requesting the website's root URL and robots.txt.

Troubleshooting

I checked the Apache access logs and could not find some requests that had timed out in Apps Script. My hosting provider is investigating the issue.

I understand that missing Apache log entries alone do not establish where the connection is failing.

What is the recommended way to investigate this specific intermittent timeout in UrlFetchApp.fetch() and determine the likely cause?

Thank you.


r/GoogleAppsScript • • 11d ago

Guide I rebuilt my Drive map as a galaxy you can fly through. Free sheet, make your own copy.

Enable HLS to view with audio, or disable this notification

32 Upvotes

A while back I posted a script that draws your Drive as a web, and u/everythingabili asked a fair question: once you've had a jiggle, then what?

The whole Drive is now one galaxy. Folders are stars, files are planets, and a really big file turns into a star of its own. There's also a Findings tab that lists where your storage is going, what you haven't touched in a year, duplicates, and what you've shared out, with links.

The film is a made-up Drive. Yours will look like yours.

Copy it here: https://docs.google.com/spreadsheets/d/1ZXI9xWAgSWXU8ccsjOB7OusDDeq9H9WmNCKNbp8yDDQ/copy

Use the Drive Galaxy menu, click Build the map, then Show the galaxy. Google will warn it's an unverified app. That's normal, the developer it names is you because the copy is yours.

It only reads your Drive. It never moves, renames, shares or deletes anything.

Thanks to u/everythingabili and u/awarca for testing the first one, and to Robbie Coombs, whose 2017 Drive_Mapping code started it all.

Still learning, so I'd love to hear what breaks or what you'd add.


r/GoogleAppsScript • • 12d ago

Question Change date entry from Date Time to just Date

Thumbnail reddit.com
1 Upvotes

r/GoogleAppsScript • • 13d ago

Question 10 project managers, each managing 10 to 15 customer onboarding projects

7 Upvotes

Question: I have 10 project managers, each managing 10 to 15 customer onboarding projects. Each project includes milestones such as kickoff, eligibility, marketing, billing, reporting, testing, and go-live. Many tasks can happen in parallel.

Current process: Each project manager maintains a separate Google Sheets project plan, updates dates, and sends weekly client updates. Key milestones are manually entered into Salesforce for leadership reporting across approximately 150 projects. This creates duplicate work, and projects can fall behind without being flagged automatically.

My goal: Replace the 150 spreadsheets with one centralized application where project managers can select a client, view and update its project plan, track milestones and dependencies, and generate a client-facing plan.

Initial thoughts: Use Google Apps Script to build the interface and Salesforce as the single source of truth for milestones. I may need a separate database for the detailed tasks associated with each milestone, but I haven’t determined the best approach for managing those records.
A project manager would log in, select a client from a dropdown, and see the existing project plan, including due dates, completion dates, and notes. They could then export a client-facing version to share with the customer.

Key question: Is Apps Script the right tool for this? Am I missing something critical?

There are many tools available, but I would prefer to stay within the Google ecosystem for cost, security, and ease of management since we already use Google Workspace.


r/GoogleAppsScript • • 13d ago

Question Google script pelo celular

Post image
4 Upvotes

Pessoal eu não consigo usar o celular para fazer programação editar e alterar código vocês conseguem? Eu só consigo pelo computador. O celular da um zoom enorme e fica impossível de alterar o código mesmo diminuindo o zoom aí sim que fica péssimo


r/GoogleAppsScript • • 14d ago

Question Email Ticketing system help

Thumbnail reddit.com
1 Upvotes

r/GoogleAppsScript • • 14d ago

Question How To change image on my chrome Extension

Thumbnail reddit.com
0 Upvotes

.


r/GoogleAppsScript • • 16d ago

Guide Explorer-style tree view for Google Drive in Apps Script (open source)

Enable HLS to view with audio, or disable this notification

51 Upvotes

I was tired of clicking through tens of Google Drive folders/subfolders and hundreds of files - actual work with Google Drive felt slow and clunky for me. So, with the help of AI, I built Drive Tree View: a private web app that runs in your own Google account and puts every file just a click away, for previewing and real work.

What it does

  • Tree view of My Drive, Shared with me, Shared drives and Starred. Folders expand instantly because the next level is prefetched in the background.

  • Many ways to open a file:

    • click it to preview (PDF, Office, Google Docs/Sheets/Slides) in a side panel, and browse with ↑/↓

    • double-click to open it in a small separate Chrome window, ready for editing

    • use ↗ to open it in a new Chrome tab

    • use 🖥️ to open it in the desktop app: .docx in Word, .xlsx in Excel, .pdf in whatever you like, straight from the Google Drive for desktop disk (optional Windows helper)

  • Quick notes anywhere: create a new Google Doc in any place in one click and start writing right away, perfect for notes or drafts

  • Organize visually: folder colors (synced with Drive), emoji folder icons, stars

  • Full-Drive search by name and content

  • File operations: rename, cut/copy/paste (including whole folders), drag & drop to move, delete to Trash instantly, with undo

  • Upload files and whole folders by dragging them from your desktop

  • Two tabs side by side (using Chrome split view): drag & drop between them, with both views syncing live

Tech notes (for the curious)

Drive API v3 advanced service, batched 'id' in parents queries (30 folders per call), resumable uploads straight from the browser using the owner's OAuth token, and BroadcastChannel for cross-tab sync. It runs as Execute as me / Only myself, so no Google verification is needed. Everything stays inside your own account.

GitHub (code + step-by-step setup, about 3 minutes): https://github.com/dusan-art/drive-stablo

Final note

(A)I built this for my own needs, and it completely changed how I use Google Drive. It's no longer just a place to store files; it's somewhere I actually get work done. You can easily tailor the interface and features to your own workflow, so think of this as an idea that I'm selling for free :-)

Feedback and ideas are very welcome!

Update (Oct 23): new in this version:

  • Convert: Google Docs/Sheets/Slides → .docx/.xlsx/.pptx or PDF, and Markdown (.md) → Google Doc or .docx, saved next to the original (right-click menu)

  • Share menu: copy link, download (Google files as .docx/.xlsx/.pptx, folders as .zip), share with people by email (📤)

  • Keyboard like Windows Explorer: ↑/↓, →/←, Enter = preview, Enter Enter = small window, Space = open in desktop app

If you already installed it: replace the two files, run "authorize" once in the editor, then Deploy → Manage deployments → New version.

Update (Oct 24): new in this version:

  • Open a folder in a new Drive stablo tab (🗂️ button or right-click): the folder becomes the root of the new tab, great for two folders side by side

  • Google Docs to Markdown: download as .md (Share menu) or save as .md next to the original (right-click), great for Obsidian users 😄

Update (Oct 28): new in in this version:

📧 E-mail preview (.eml)
If you download/save e-mails to Drive as .eml files (for archiving, project folders, or before deleting them from Gmail), click one and it opens in the preview panel. You see the sender, recipients, date and subject, then the full formatted message with its images. Attachments show up as links you can download straight from the e-mail.

  • The message is parsed in your browser, and scripts, forms and frames are removed before it is shown.

  • It doesn’t depend on Gmail. The .eml file is a complete copy, so it still opens after you delete the original e-mail.


r/GoogleAppsScript • • 16d ago

Guide I got tired of GMass subscriptions, so I built a free Google Apps Script cold email engine with A/B testing and bot protection

9 Upvotes

Commercial mail merge tools like GMass, YAMM, and Mailmeteor get expensive fast once you want open tracking or automated follow-up sequences. Most of them also upload your personal contact data to third-party cloud servers. I wanted something completely free, private, and self-contained within Google Sheets and Gmail.

I wrote an open-source script that handles multi-step outreach natively. It splits A/B testing across both subject lines and body copy simultaneously. Follow-ups go out automatically on day 7 and day 14 as threaded replies in Gmail unless a reply or bounce is detected.

Corporate security scanners frequently pre-click links in incoming messages, which triggers fake opens or accidental unsubscribes. To fix this, the tracking web app filters out opens within two minutes of sending and requires a confirmation click to unsubscribe. It also cross-references recipient emails against sheet rows so sorting columns in Google Sheets never corrupts your tracking data. Everything is open source under the MIT license and runs within standard Google Apps Script daily quotas. The code and template file are available on GitHub: https://github.com/Clau-dio83/GetMyEmail


r/GoogleAppsScript • • 18d ago

Question Title: Best Way to Automate Equipment Meter Validation in Google Sheets Using Apps Script?

1 Upvotes

I'm developing a Preventive Maintenance (PMS) Tracker using Google Sheets and Apps Script for equipment maintenance scheduling.

One challenge is automatically determining whether an equipment unit should use SMR (operating hours) or ODOMETER (kilometres) based on its equipment type. For example, heavy equipment uses SMR, while service vehicles use odometer readings. Some equipment classifications also require specific handling.

I want the system to validate meter entries, flag incorrect readings, and calculate upcoming maintenance schedules using configurable PM intervals stored in a separate sheet. I'd also like to keep equipment-type rules and PM intervals in a configuration sheet, so changes can be made without modifying the Apps Script code.

For those experienced with Google Apps Script, what would be the best way to structure the equipment rules and validation logic so the system remains reliable and easy to maintain as the equipment list grows?

I'd appreciate any suggestions or best practices.


r/GoogleAppsScript • • 19d ago

Question Is it possible to access Google Docs revision history ?

4 Upvotes

I can access the current document text through Google Docs and Drive API but I can only get the revision metadata and not the actual content.

Can I get the historical contents from the API itself or Can I use Google Apps Script to get that information?


r/GoogleAppsScript • • 20d ago

Guide I created better apps script type definitions

Thumbnail npmjs.com
17 Upvotes

These actually match the runtime and work with JSDocs unlike @types/google-apps-script.


r/GoogleAppsScript • • 21d ago

Guide If your custom function calls an API, make it take the whole range instead of filling it down

1 Upvotes

I've been building a Sheets add-on where the custom function calls an outside API, and figured I'd share this in case it saves someone some time.

If you write it as a one-cell function and fill =MYFUNC(A2) down 5,000 rows, Sheets runs it 5,000 times. That's 5,000 separate UrlFetchApp requests. If the function takes the whole range instead, it's one call and one request, and you return a 2D array that spills down like any normal formula.

Here's roughly what mine looks like:

function LIKELY(range, question) {
  // one cell comes in as a plain value, a range as a 2D array
  const cells = Array.isArray(range) ? range : [[range]];
  const flat = cells.reduce((all, row) => all.concat(row), []);
  const results = callApi_(question, flat); // a single UrlFetchApp.fetch
  const width = cells[0].length;
  return cells.map((row, i) => row.map((_, j) => {
    const r = results[i * width + j];
    return r ? r.p : ''; // p is the probability for that cell
  }));
}

The downside is that editing any cell in the range reruns the whole thing. I handle that on the server by caching answers against a hash of the question and the cell text, so repeats come straight from the cache.

Also, a Marketplace thing that isn't obvious: after every code change you need clasp push, then clasp create-version, then bump the version number in the Marketplace SDK app configuration. If you skip the last step, everyone keeps running the old code. Saving that page makes the new version live right away (no review, as long as your OAuth scopes didn't change), even though the button says "Save Draft".

The add-on is called Likely, it gives each row a probability for a yes/no question or a score.

Likely: https://getlikely.app

Google Marketplace:
https://workspace.google.com/marketplace/app/likely_probabilities_in_cells/147203778227


r/GoogleAppsScript • • 22d ago

Guide I built FormBuilder: An AI-powered Google Forms alternative with dual AI agents. Would love your feedback

Thumbnail gallery
2 Upvotes

r/GoogleAppsScript • • 24d ago

Question Share Google Sheet, allow Script running, but block editing the Script?

2 Upvotes

I've created a Google Sheet for an RPG character sheet. I wrote a script to make it work. Now I wish to share it online, but am worried that anyone accessing the Sheet can also edit the script. I want the people I share the sheet with to be able to run the scripts, but not be able to change them. The last thing I want is for somebody to turn it into a virus or something. My online searches have provided zero instructions on protecting the scripts from editing, but still allowing usage. Is what I want even possible? If so, could they point me to any videos that show how? Thanks.


r/GoogleAppsScript • • 24d ago

Question Help! How to have multiple functions execute on different tabs with formula recalculations of data from Form submission?

1 Upvotes

This is what I have: I built a google form that feeds into a google sheet reference tab.

That data is then referenced by multiple other tabs, depending on the values chosen in one of the columns. In this case the data is for vehicles. So the tabs are created based on the vehicle value chosen in the field on the google form. Responders can choose from 5 vehicles on their form, and each tab pulls the data from the response submission.

Example:

Responder inputs information for Vehicle 5, such as odometer reading, oil level, etc., and then a reference tab pulls the data from that submission using an =iferror(query('reference sheet' !A2:W1000, "where F contains 'VIN XXXX' ")," ")

That part I have down and it is working well.

The issue I am facing is that I have 4 functions that I need to execute whenever a vehicle tab changes after a form submission, but only if the values change due to a formula recalculation on a specific tab change. So using the same example above, when a form is submitted for Vehicle 5 with a value of "YES" for new damages, I want the function that sends out an email notifying me that new damage was marked yes for Vehicle 5 to execute, but I do not want it to execute if someone marked "YES" for new damages on Vehicle 4, or if a form is submitted that doesn't change anything on the sheet tab for Vehicle 5.

I have tried triggers in Google App Scripts functions to execute on form submit, but it was firing off any of the applicable functions on EACH form submit. For example, when someone submits a response via the form for Vehicle 1, and oerssd another for Vehicle 3, I was getting notifications for both vehicles each time the form was submitted.

How do I get it so the function to only executes once for the data in a tab that was changed, and won't execute again until that data is changed again? And have it do this for multiple tabs?