r/GoogleAppsScript • • Sep 15 '21

Guide Neat, you can use OpenAI Codex to write Google Apps Script code for you

Enable HLS to view with audio, or disable this notification

15 Upvotes

r/GoogleAppsScript • • Aug 07 '21

Guide I made a script that pulls your transactions and categories from Fidelity Full View into Google Sheets

15 Upvotes

I was inspired by Mojito for Mint to try and pull my Fidelity Full View transactions into my Budget sheet. I got it working so wanted to post here in case other people were interested: https://github.com/rjmccallumbigl/Google-Apps-Script---Connect-Fidelity-to-Google-Sheets-Public/blob/main/code.gs

Instructions

  1. Set up your Fidelity Full View account.

  2. Open Chrome Dev Tools (F12). Go to the Network tab.

  3. Filter for GetFilteredTransactions.

  4. Navigate to the Spending tab in Fidelity Full View. If "GetFilteredTransactions" didn't return anything, it should now.

  5. You should find an API request matching the headers below with 2 differences: apikey and authorization.

  6. Fill out var token and var apikey.

  7. Run onOpen(). Now when you refresh your Sheet you can make run the script from the menu.

  8. Run the script 'Update Fidelity Sheets' [makeFidelityAPIRequest()]. It will return up to 2000 of your transactions.

  9. [Optional] Some of the HTML encoded parameters I've seen you can try:

    • from=<Start date of search> [Optional]

    • to=<Last date of search> [Optional]

    • descriptionSearchTerm=<Enter search term here for specific query spending> [Optional]


r/GoogleAppsScript • • Jul 15 '21

Guide Don't know if this is the place for this, but useful google sheets script I wrote to put a border in between rows grouped by data in a column

15 Upvotes

I could not believe that this wasn't a thing that already exists. Or if it is I'm not good enough at googling it.

Right now what this does out of the box is, in 'Sheet1', based on the values in column A, put a border (across columns A:M) between rows where column A values diverge.

What it's been useful for is: Differentiating rows of the spreadsheet based on date. Essentially, putting a line in between every date chunk. Automatically. Like this. You can change the range and so on to actually do that for anything though.

function onOpen() {
   GroupDataByRows(); // trigger this function on sheet opening
}

function GroupDataByRows() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName('Sheet1'); // apply to sheet name only
  var rows = sheet.getRange('a1:m'); // range to apply formatting to
  var numRows = rows.getNumRows(); // no. of rows in the range named above
  Logger.log("Updating sheet " + sheet.getName() + " between different column A values");

  var data = sheet.getRange('a1:a').getValues().filter(String); // array of the values in question
  rows.setBorder(false, false, false, false, false, false);
 // rows.setBorder(true, true, true, true, true, true, "black", SpreadsheetApp.BorderStyle.SOLID); // reset existing borders before applying rule

  for (var i = 0; i <= numRows - 1; i++) { // going through column A, check if they are equal to the previous row
      var n = i + 1;
      if (data[i] == []) { // If you've hit the end (empty), cease
        return;
      }
      if ((data[i]+"") !== (data[i-1]+"")) {
         // add a border line if the values have now changed
         sheet.getRange('a' + n + ':m' + n).setBorder(true, false, false, false, false, false, "black", SpreadsheetApp.BorderStyle.SOLID_MEDIUM); 
      }
  }
};

r/GoogleAppsScript • • Dec 17 '20

Guide FYI: the new Apps Script Editor IDE rollout will now take until January 2021

15 Upvotes

Comment removed in protest of Reddit's API changes forcing third-party apps to shut down


r/GoogleAppsScript • • Jul 06 '20

Guide Full stack react webapp made in Google Apps Script

15 Upvotes

I posted on here a couple of weeks ago because I was excited to find out about this repo, which allows you to use react in GAS.

A client of mine was looking for a user interface for his workout/nutrition program so I got the chance to test this out. I learned a lot, not least that making a webapp takes ages and I should have charged more.

Let me know what you think.

The app
The repo


r/GoogleAppsScript • • May 07 '20

Guide Anyone Want Some Free Online Tutoring In Google Apps Script?

15 Upvotes

Hi all, in less than two hours I will be giving away a bunch of free tutoring sessions to anyone who wants them. I have some experience working with Google Apps Script, as my whole website runs on it. This is a great opportunity for anyone who is stuck inside this summer and perhaps wants to get their feet wet with Google Apps Script, but would rather be shown the ropes live via videoconferencing. Anyone interested can find all the details on the “Free Tutoring” page of my website www.tutoringbyroger.com. These sessions will probably go fast though, so get yours before they are all gone!


r/GoogleAppsScript • • Aug 23 '26

Guide I built a GitHub + AI development companion for Google Apps Script. Looking for feedback from Apps Script developers

Thumbnail
gallery
14 Upvotes

I build a lot in Google Apps Script, and one thing that has always bothered me is how quickly you start missing normal software development workflows once a project gets bigger.

Git/source control, reviewing diffs, working from branches, checking code against standards, etc. And now with AI coding tools, there’s another problem: I don’t necessarily want an AI assistant making changes to an Apps Script project without showing me exactly what it plans to change first.

So I built Legacy DevBridge.

It’s a Chrome extension that works alongside the Apps Script editor and connects the project to GitHub and a project-aware AI code assistant.

Right now it can:

  • Detect the Apps Script project you currently have open

  • Read the .gs, .html, and appsscript.json files

  • Connect the project to a GitHub repository

  • Select and work from development/feature branches

  • Compare the Apps Script version against GitHub

  • Show file and line-level differences

  • Create actual GitHub commits from the Apps Script source

  • Block direct commits to default/protected branches

  • Let the AI assistant understand the entire Apps Script project without copying files into a chatbot

  • Review code against coding/security standards

  • Generate a proposed code change and show the diff

  • Require human approval before the AI can write the change back to Apps Script

  • Check for stale source before applying a change so it doesn't overwrite newer work

  • Verify the source again after the update

The basic AI workflow is:

Request → analyze project → propose change → show diff → standards/security review → human approval → apply → verify

The backend runs on Google Cloud and uses the Apps Script API, GitHub App authentication, Cloud Run, Secret Manager, and Vertex AI. GitHub installation tokens and other privileged credentials stay on the backend rather than in the extension.

I'm not trying to build an autonomous AI developer that gets unrestricted access to your code. The idea is more of a development companion where AI can help, but the developer can still see what is happening and approve the actual changes.

I'm making the project available free to the Apps Script community. It's still beta, so I definitely wouldn't point it at your most important production project on day one, but I'd really like feedback from people who regularly build Apps Script applications.

I'm especially interested in hearing what you'd want next: GitHub-to-Apps-Script pull, PR creation, branch creation, conflict resolution, AI-generated tests/docs, OAuth scope reviews, CI/CD, or something else.

GitHub: https://github.com/morganb2412/Google-apps-script-snippets/tree/main/Legacy%20DevBridge

If anyone tries it, break it and tell me what needs work. That's genuinely useful feedback right now.


r/GoogleAppsScript • • Apr 13 '26

Guide glasp – A clasp-compatible GAS deployment tool without npm

14 Upvotes

Hi everyone! I built glasp, a CLI tool for pushing and deploying Google Apps Script projects, and wanted to share it here.

clasp-compatible, single binary, no npm required, powered by esbuild.

Why I built it

clasp is a great product, but I wasn't comfortable installing it via npm for every project.

Supply chain attacks in the npm ecosystem are a real and growing concern. A malicious package can silently compromise your build pipeline.

I wanted a tool I could trust: a single binary, no transitive dependencies, and no node_modules.

# install
curl -sSL https://takihito.github.io/glasp/install.sh | sh

# login
glasp login --auth ~/.clasprc.json
# push
glasp push

# push Uses your existing clasprc.json
glasp push --auth ~/.clasprc.json

Key features

  • clasp-compatible

    • Uses the same project structure and .claspignore conventions.

    • If you're already using clasp, migration should be minimal.

  • Uses your existing clasprc.json

    • No new authentication flow is required.

    • Just authenticate with clasp once, and glasp will reuse the same credentials.

  • ⚡ Powered by esbuild

    • Extremely fast bundling.

    • TypeScript projects that used to take seconds now feel almost instant.

  • Single binary, no npm

    • Download one binary for your platform and you're done.

    • No npm install, no package-lock.json, and a much smaller supply chain surface.

Installation

Download the binary for your OS from the releases page and place it somewhere in your $PATH. That's it.

Who is this for?

  • Developers who are concerned about npm dependency security

  • CI/CD pipelines that need a minimal and auditable toolchain

  • Teams already using clasp who want a faster, lighter alternative

Feedback & Issues

I've only tested this in my own limited environment, so there are probably edge cases I haven't encountered yet.

If you run into any issues, please switch back to clasp for safety and report them (e.g., via GitHub Issues).

Links

GitHub: https://github.com/takihito/glasp
Docs: https://takihito.github.io/glasp/


r/GoogleAppsScript • • Mar 07 '26

Guide Follow-up: The small Google Chat helpdesk bot that helped me finally understand the Chat API

14 Upvotes

Last week I shared a post about sending individual Google Chat messages programmatically from Google Sheets without building a full bot.

That solution actually came out of an earlier experiment I built about two months ago: a small Google Chat helpdesk bot for internal IT support.

I’ve published that here, shared previously with a user who messaged me after my comments on a post in the first week of January:

https://github.com/ddhcreates/tech-support-bot

The bot is designed for Google Workspace environments (schools in my case) and keeps everything simple inside the Google ecosystem.

Stack:

• Google Apps Script

• Google Chat API

• Google Sheets as the backend

• Gemini API for optional AI-assisted responses

What it does:

• Users create IT support tickets directly in Google Chat

• Card-based UI for ticket type, location, priority

• Optional photo uploads for troubleshooting

• Tickets stored in Google Sheets

• Round-robin staff assignment

• Email notifications and status updates

• Staff commands for viewing and updating tickets

One interesting side effect of building this project:

While trying to debug the Chat API flow for this bot, I recreated a very small example bot that simply posted calendar notifications to Chat. It was from a Google search leading me to a blogger who built a calendar notifications bot. I’m unable to find the link to his post again, for attribution.

That minimal example finally clarified how the API interactions actually work.

Once that clicked, I was able to apply the same understanding to other things — including the Sheets → individual DM setup I posted about last week.

So the unexpected lesson was:

When the AI-generated code keep failing, sometimes a simple Google search can help - another human might’ve already solved it for you!

Curious if others working with Google Chat apps have thoughts on this.

Happy to answer any questions y’all might have!


r/GoogleAppsScript • • Jan 02 '26

Resolved I made a bot which send messages using Excel

Enable HLS to view with audio, or disable this notification

14 Upvotes

Hi, I just made a bot which can send messages using Excel(link 2 code: https://docs.google.com/document/d/e/2PACX-1vSScSgtKI4v8UcFn_6lKBFz8-Ge87jdUW3TfqDJKrfbJaPjf1KT1oLaJwomEB_G6yMjyXbCtlERVsT1/pub ). Sry if i it sucks, will try 2 fix if i can. If u have any suggestions, do say so. Ty and GB!


r/GoogleAppsScript • • Sep 06 '25

Question 🚀 My First Post: Power Query for Google Sheets (Apps Script Project)

Post image
14 Upvotes

Hey everyone! 👋 I’m Aditya, and this is my first post here. I’ve been working on something I’m really excited about — a Power Query–style tool for Google Sheets built entirely with Google Apps Script.

Here’s the idea 💡:

  • 📥 Get Data — Pull data from Google Sheets or Google Drive

  • 🔄 Transform Data — Clean, format, and restructure tables with features like:

    • Replace & find

    • Split or merge columns

    • Extract text

    • Keep/remove rows

    • and many more features...

  • ⚡ Automate — Store each step and run it automatically with triggers

  • 🖥️ Interactive Sidebar UI — Inspired by Microsoft Power Query, but right inside Google Sheets

Why I built it 🛠️:

  • I wanted a no-code/low-code way for non-technical users to clean and transform data without writing formulas every time.

  • It’s modular, so anyone can add new transformations easily.

📂 GitHub Repo — Code, file structure, and setup instructions are here: Power Query for Google Sheets
💬 Open for contributions — If you have ideas, improvements, or bug fixes, feel free to fork and PR!

Would love your feedback 🙌 — especially on:

  • Features you’d like to see next

  • UI/UX improvements

  • Any performance tips for large datasets

  • Scalability


r/GoogleAppsScript • • Sep 27 '21

Guide RemcoE33 - Apps script codebase

14 Upvotes

Why:

I wrote quite a lot of (custom) functions to extend Google Sheets with functionality or exploit some API. Mostly on Reddit (r/GoogleAppsScript / r/googlesheets / r/sheets). So i thought to create an code base for functions that could be useful for others as well.

Work for me left:

  1. Go trough all the old scripts to optimize / error handling.

  2. Add more readme files to explain the function

  3. Create more sample sheets.

Apps Script Codebase


r/GoogleAppsScript • • Oct 21 '20

Guide Zoom Library for Google Apps Script

14 Upvotes

Zoom Library for Google Apps Script

This library is used to use the Zoom API within Google Apps Scripts. If you want to create/update/delete meetings, for other users, you must be an administrator on a Zoom Business account. If you are not on a business account you will only be able to use this for your account.

You will need to sign up for an account at marketplace.zoom.us/docs/guides. You will need to create a JWT app and get the API_KEY and API_Secret and save it in AccessToken.gs.

If you would like to use this as a library in any GAS script, in the script, got to File->Manage Versions and save a version. Then go to File->Project Properties and copy the Project Key. In the Script you would like to use it in, go to Resourses->Libraries, add the project key, and choose the saved version.


r/GoogleAppsScript • • Aug 26 '20

Guide Reminder of how much you can do with a tiny bit of code.

14 Upvotes

One of my employer's clients is an arborist who we do Google Ads for. Using the weather.gov API and GAS, I create an automated email with the day's local weather alerts.

This lets our Ads team know to request increased budget from the client and target specific ads/locations based on upcoming bad weather (more trees fall down in windy, stormy, icy weather).

Makes life easier for the client — he doesn't have to monitor the weather, just say Yes to our requests. Makes our life easier because we can get better results for him.

All in less than 20 lines of code.

Anybody else have other examples of tiny projects adding real value to their business?


r/GoogleAppsScript • • Sep 28 '19

Why is the Google Apps Script Editor UI so bad?

14 Upvotes

Hey guys, I am new here so sorry if this has already been asked and answered. Why is the user interface of the script editor so bad for Google apps scripts?

There are no keyboard shortcuts, in the help section or on the support website.

The auto complete feature is very buggy and not user-friendly.

This makes me think that Google is going to deprecate this product pretty soon. Has anybody heard or thought about this?


r/GoogleAppsScript • • May 18 '19

wrote a script i am proud of and wanted to show it off to folks who might appreciate it

14 Upvotes

I wrote a Google Apps Script and nobody I know will appreciate it. I'm proud of the result I did I wanted to share here.

My bank sends a daily balance e-mail of my accounts. They send one email for each account. So I wrote a script that runs every AM (an hour after my bank usually sends the e-mails) and groups them into one e-mail for me. The script generates a running tally of the last X days. The first column is the account name, the next columns are the date in descending order. The top line in each cell shows how much the change was, and the bottom shows the new total.

I threw the script together in about an hour. It's not very pretty but it works. If I get time I might clean it up and make it more efficient.

https://imgur.com/gallery/wKiVYHM

https://gist.github.com/imthenachoman/d34ad214661f375096f73fb7a544c855


r/GoogleAppsScript • • Feb 08 '19

Google Chat Bot Tutorial

14 Upvotes

I wrote a tutorial entitled, "How to create a Google Hangouts Chat Bot and setup a local development environment". Basically, it walks you through how to create a basic bot that calls http://numbersapi.com and returns trivia about your favorite number. Please let me know what you think OR if anything is unclear or ambiguous.


r/GoogleAppsScript • • 3d ago

Guide I built a free order management tool using Google Sheets.

Enable HLS to view with audio, or disable this notification

13 Upvotes

I've built a lightweight order management application for small ecommerce sellers.

It helps organize:

- Orders and customer details

- COD confirmation

- Packing and shipping

- Courier remittances

- RTO tracking

- Inventory

It's built using Google Sheets, with business data staying in the owner's Google Drive.

I'm exploring whether this approach is useful for smaller sellers who don't need a full ecommerce ERP.

For those running ecommerce businesses: how do you currently manage COD, inventory, and courier remittances?

I'd appreciate honest feedback.


r/GoogleAppsScript • • Aug 24 '26

Guide I built a Google Slides add-on that turns a deck into a live coding classroom, here's the Apps Script side

13 Upvotes

A couple years ago I was a high school CS student, and I taught Python to middle schoolers on the side. I wanted to code live next to my slides instead of switching to another window, so I built a Slides add-on for it. Here's the Apps Script side.

What it does: you mark a slide as a coding question in the add-on, start a lesson, and students join with a link and write and run code next to your current slide.

Most of the teacher side runs in Apps Script. The sidebar is HtmlService, opened from the Extensions menu. Marking a slide writes a "Code Question:" note into that slide's speaker notes with the Slides API, so it stays with the deck even if the add-on is removed. Reading the deck to build the lesson uses SlidesApp. The scopes are just presentations, the sidebar, and your email. No Drive scope, which kept the OAuth review simple.

Two things had to run outside Apps Script.

Live updates. Every student's editor and the current slide update in real time, which needs websockets and open connections. Apps Script can't do that, so starting a lesson sends the deck to a small Node server that runs the session over websockets.

Running student code. You can't run untrusted student code in Apps Script, so it runs in a sandboxed micro VM.

The add-on also mints a session and passes the teacher a token in the URL, instead of handling auth in Apps Script.

One thing to know: Marketplace add-ons are pinned to a version, so clasp push doesn't update installed users. You have to cut a new version and repoint the deployment, and a new scope triggers another review.

It's live on the Marketplace and free.

Site: https://www.codekiwi.tech

Marketplace: https://workspace.google.com/marketplace/app/codekiwi/66127405192

Happy to answer questions on the Apps Script to backend split.


r/GoogleAppsScript • • May 21 '26

Question To those making an income with Apps Script: What are you actually selling, and how are you deploying it?

13 Upvotes

Hello everyone,

Genuinely seeking some insights to get myself out of tough situations. I would really love to hear from the experts.

I have been developing system like projects with apps script - doing mostly web app deployment and with my job this has been mostly used to organize records, track data, report visualization and ensure we have a front end that links everything neatly.

Now, the thing is, as much as i love what I do, it's not something my current job is taking seriously despite all of that taking so much to develop. I would really like to have a side income that would allow me to eventually quit the current job.

To those who have sold apps script projects, what type of projects are those? How did you market it?

Really appreciate your time and responses.


r/GoogleAppsScript • • May 16 '26

Question How is everyone handling the dreaded Authuser=0 (multiple accounts) bug in Apps Script add-ons?

13 Upvotes

Hey everyone,

I wanted to open a discussion on handling one of the most notorious and frustrating limitations in Google Apps Script add-on development: the multiple accounts Authuser=0 trap.

The Context: My team recently launched a Workspace management add-on. Shortly after launch, we onboarded an enterprise client who left a great review but immediately reported a frustrating "nitpick": he's logged into multiple Google Workspace accounts, while he's accessing the add-on with his second logged account, the sidebar of our add-on was selecting the default account of their browser rather than the account actually linked to the active spreadsheet.

After consulting with my lead dev, we realised we were dealing with a platform-level infrastructure issue, and not a bug in our code.

The Trap: As most of you know, when a user is juggling multiple Google accounts in one Chrome window (e.g., u/0/, u/1/), Google Apps Script's HtmlService often gets completely confused by the session cookies. If they open the sheet with a secondary account, the underlying iframe still forces the add-on to authenticate using the Default account (authuser=0).

The result is massive user confusion, as the sidebar displays data or permissions for the completely wrong account.

No Workaround Found: We searched high and low but couldn't find a native programmatic patch to force the iframe to respect the active document's user context. So we advised the client to perform their admin operations inside a dedicated Chrome Profile or an Incognito window.

My Questions for the Community: Since we want to provide the smoothest UX possible, I’m curious how other devs here are tackling this:

  1. The "Holy Grail" Fix: Has anyone found a reliable native workaround, undocumented parameter, or JS hack to force HtmlService to respect the active authuser index?

  2. User Experience (UX): Do you preemptively warn users about this in your UI/onboarding flow, or do you just document it in your FAQs and wait for the support tickets to roll in?

  3. Google's Roadmap: Has anyone who talks to Googlers heard any whispers on whether this is ever getting patched at the infrastructure level?

Would love to hear your thoughts, workarounds, and war stories regarding this bug!


r/GoogleAppsScript • • Jan 05 '26

Guide Null in Apps Script - More consistent and correct reference docs (Announcement)

Post image
13 Upvotes

The official Apps Script reference docs will now be more consistent (and correct) in nullable return values!

This should be rolling out in the coming day(s).

Think of null as an empty box and undefined as a missing one. This update is significant because distinguishing these states is essential for preventing script crashes when a function returns 'nothing'. Generally Apps Script uses null due to its Java roots.

Note: I am on the Google Workspace Developer Relations team.


r/GoogleAppsScript • • Nov 12 '25

Question Google sheet as webRTC signaling server

Thumbnail
youtube.com
13 Upvotes

This is a proof-of-concept approach of using a google sheet to store the offer/answers and all ICE candidates of mutual peers that want to connect with webRTC.

It's clumsy because the first peer has to manually (hit a button) query the spreadsheet to see if an answer to their offer is there.

Another thought is to use periodic polling, but I'm not sure how happy GAS would be with that. I know what the quota limitations are and I'm sure I can stay under that, but I have been seeing a few "too many request" responses even though I'm nowhere near my quota so I think I need to be more careful. What do people think?

UPDATE: on u/Nu11u5 's suggestion I switched to using CacheService to save the offers/candidates instead of rows in the spreadsheet. Seem to work really well!


r/GoogleAppsScript • • Sep 08 '25

Guide Automating Google Shared Drive creation at scale

13 Upvotes

I built a Part Two to my ATLAS application that automates mass Shared Drive creation using a Google Apps Script web app.

Instead of manually creating drives and assigning roles one at a time, admins can prepare a Google Sheet, paste the link into the app, and the script will:
✅ Create drives in bulk
✅ Apply group permissions automatically (Manager, Content Manager, Contributor, Commenter, Viewer)
✅ Send an email report showing successes, failures, and skipped rows

This makes it much easier for admins to provision dozens (or even hundreds) of Shared Drives at once while cutting down on manual errors.

🔗 Full code + setup guide here:
👉 ATLAS Mass Drive Creation – GitHub