r/GoogleAppsScript • • May 08 '25

Guide Use Grok 3 API in Google Sheets

8 Upvotes

I got a comment/request to integrate Grok 3 into Google Sheets via Apps Script and figured this sub might find this interesting and hopefully helpful: https://youtu.be/AM4zxGtWEGg

I'm taking requests for future GAS videos


r/GoogleAppsScript • • Feb 13 '25

Question Freelancer Needed - Pokémon Cataloging Project

8 Upvotes

I'm looking to hire a freelancer to help build an automated system for cataloging and tracking the value of my Pokémon card collection. The goal is to have a user-friendly database (Excel or Google Sheets) that can:

✅ Store detailed card information (set, condition, quantity, etc.) ✅ Pull live market prices from TCGPlayer automatically ✅ Provide a simple way to update, filter, and sort my collection ✅ Track sold or traded cards and historical pricing data

Please see my attached document that has detailed instructions on what I am looking for - 3 pages. - Link

If this is a project you are interested in and can do, please provide me with an estimate.

Note: I do not have a hard deadline for this project. It would be nice to have it in a month or two though.

Have a good day!


r/GoogleAppsScript • • Feb 07 '25

Guide How to Share a Library (Without Exposing Code)

8 Upvotes

This question was posted earlier - I suggested a theoretical workaround since it can't be done from a single script. After successfully testing it out, I went back to add to the post and found it had been deleted by the author. So, here's an example solution:

Project 1: Protecting Proprietary Code

-The value(s) returned from your code will need to be wrapped in a doGet() or doPost() function, and properly returned. Be sure to run a script in the editor first in case scopes need authorization. Here's a simple sample (and more complex needs could output JSON instead):

function doGet() {
  const output = ContentService.createTextOutput("Hello, World!");
  output.setMimeType(ContentService.MimeType.TEXT);
  return output;
}

-Deploy Project 1 as a Web App or API executable. There are some differences in how accessible one is versus the other, but both types will allow your Library project to access the code. In testing, I used Web App, executed as me, and accessible by anyone. You will also be prompted to link to a Google Cloud project (which you can do from the script settings) and setup 0Auth consent (which is done in the Google Cloud console).

***Note: Depending on your needs/usage, the step above may require additional verification by Google.***

Project 2: Accessing Proprietary Code

-Use the URL from your deployed Web App/API endpoint with URLFetchApp to return the values from your proprietary code for further use within the Library you are sharing with others:

function myFunction() {
  const value = UrlFetchApp.fetch("https://script.google.com/macros/s/${deploymentId}/exec");
  Logger.log(value);
}

-Deploy Project 2 as a Library for sharing with others. Any users who use the Library will need at least view-only access, but they will only be able to see the code in Project 2.

Projects 3+: Library Invocation

-Add the Library by script ID to a new project, ensuring that the user has at least read-only access. I suspect "available to anyone with the link" would work too, but didn't test. Invoke a function from the Library in the following manner:

function test() {
  project2.myFunction();
}

The execution log from Projects 3+ will print "Hello, World!" when test() is run. However, the anyone using your Library will never be able to see the code that generated the "Hello, World!" value.

Cheers! 🍻


r/GoogleAppsScript • • Oct 14 '24

Guide Dark Mode GAS Extension - Black Apps Script

8 Upvotes

I've been working in GAS for the better part of 10 years now, and have always relied on my own little set of Tampermonkey scripts to get the IDE to behave and not to burn my eyes out. Over the past 2 weeks I reached a point of deep frustration and started searching to see if there wasn't someone who had done a better job at it - turns out there is a brilliant dark mode extension now and it is packed with other incredible quality of life features! Black Apps Script

PS - I am in no way affiliated


r/GoogleAppsScript • • Aug 12 '24

Question Script to scrape email and send data to certain columns in Gsheets

8 Upvotes

Hey everyone, I’m wondering if is it possible to write a script that scrapes emails that come in every few hours and send certain data to Gsheets into specific columns?


r/GoogleAppsScript • • Feb 10 '24

Guide 🎊 Freecodecamp has published my new blog post 😁

8 Upvotes

It's about creating a search form in Google Sheets. It's worth checking out if you're interested in this topic!
https://www.freecodecamp.org/news/create-search-form-in-google-sheets/


r/GoogleAppsScript • • Nov 29 '23

Question Is it even possible to download any YouTube video transcript via the API?

8 Upvotes

I am using the captions "download" call on the API, and despite giving myself sufficient permissions and scope, any attempt to download the captions for a video results in the following error:

<HttpError 403 when requesting https://youtube.googleapis.com/youtube/v3/captions/AUieDaayVwpFHwKLciI9Ayn4Ephm6YsWu4wuOFlfzdFDJIw-? returned "The permissions associated with the request are not sufficient to download the caption track. The request might not be properly authorized, or the video order might not have enabled third-party contributions for this caption.">

I tested this out with a video of my own channel, which is authorized to test on this project, and the captions were downloaded as desired. So my question is, is there ANY method to download these captions via the API? This seems like an absolutely strange and absurd decision by YouTube. The transcripts / auto-captions of videos are in no way private, you can go to the bottom of the video and grab them right off. So why not make them accessible in the API? And if not, would anyone know of any other automated alternative?


r/GoogleAppsScript • • Apr 24 '23

Guide Apps Script Secrets Manager

8 Upvotes

Hi folks,

I've been working with Apps Script for a while now and saving API tokens in Apps Script has always felt not great or more clunky than I would like. I created this Apps Script library to solve this problem and utilize GCP Secret Manager https://github.com/graphicnapkin/ASM. I would get thoughts / feedback / pull requests for anyone who is so inclined!


r/GoogleAppsScript • • Jul 28 '22

Question What should I title myself when adding GAS dev to my resume?

8 Upvotes

I started learning Google Apps Script in March and have spent months doing free dev for a nonprofit, as a student project, building a system to automate their workflows, emails and reporting processes.

They love what I've built and want to pay me to maintain and keeping adding functionality to it. Since this will officially be contract work now, I'm going to move this from the education/projects section of my resume to work experience.

But what is this kind of work even called? Can I call myself an "independent software developer"? Keep it specific to GAS?

I was browsing upwork last night to see what people call themselves and some of yall get wild with it. "Automation Architect," "Specialist," "Technician"... Can I just make up whatever?


r/GoogleAppsScript • • Jul 15 '22

Question Looking for part-time app script dev to create scripts for my commercial pool business.

8 Upvotes

Hey guys! Not sure if this is allowed but if it isn’t please let me know or just delete.

I have a few different management processes that I’m looking to have developed into app scripts to make things easier for my team to manage.

Pay is negotiable and will be based on an agreed price for each project. Scripts may need to be updated occasionally as well to account for corrections on the operations level as well as ensuring it’s still up to date with googles updates.

I have already coded some of my own and have a few things automated with app script so I am aware of what is and isn’t possible to some extent. I’m super easy to work with and laid back, just need someone who can do what they say they can and help me come up with more efficient operations.

Cheers :)


r/GoogleAppsScript • • Jul 14 '22

Question Save images from google sheets list of urls to google drive folder

Thumbnail self.googlesheets
8 Upvotes

r/GoogleAppsScript • • Apr 18 '22

Question Freelancing

8 Upvotes

Does anyone do work with GAS as a freelancer? Was wondering if it's worth pursuing

I mostly work with Excel/VBA, SQL and JS now

Edit: typo for JS


r/GoogleAppsScript • • Apr 16 '22

Question What is the best way to learn Google app script? Thank you for any help!

8 Upvotes

r/GoogleAppsScript • • Apr 04 '22

Resolved Pre-Authorize script to Google Workspace Domain

8 Upvotes

Hi everyone,

I have a small script on a Google Docs Template that prints the current date on the footer of the opened document via the onOpen() function.

Whenever a user generates a document via the template, it should print the current date on the footer.

The main problem is, the onOpen() triggers only to authorized scripts on Docs.

What I'm trying to achieve is, since I'm also an administrator of the Workspace, to pre-authorize the script to whoever opens the document.

Is this even doable? If not, do you know a workaround for this? I really need minimum user interaction.

Thanks in advance!


r/GoogleAppsScript • • Jan 26 '22

Question Noob looking for guidance

8 Upvotes

Hi all,

I am a beginner in Appscript and I'm trying to build a Google Sheet -> Data Studio dashboard using data from external APIs. Can someone link me some informative YouTube videos on how to make the initial connection between Appscript and 3rd party API? Specifically all the oAuth stuff & where to exchange keys on both sides. Would be super helpful and I would appreciate it greatly!

Thank you!!


r/GoogleAppsScript • • Jan 14 '22

Question Mark successfully sent emails as sent in new column on Google spreadsheet

8 Upvotes

I have the following script, which works just fine to send emails. However, I am limited to 100 emails per day, so I would like to add a function to mark sent emails as 'Sent' in a new column on my spreadsheet, and leave unsent emails blank in that column. If blank, the script runs, and if successful, that row shows 'Sent.' I don't want duplicate emails sent and I need to be able to see which emails have been sent. Here is what I have:

function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
var startRow = 3;  // First row of data to process
var numRows = 1000;   // Number of rows to process
var dataRange = sheet.getRange(startRow, 1, numRows, 1000)
var data = dataRange.getValues();
for (i in data) {
var row = data[i];
var emailAddress = row[4];
var message = ["Hello... omitted message"];
var subject = "New Message";
GmailApp.sendEmail(emailAddress, subject, message);
  }
}

The spreadsheet columns are as follows, and the email data begins on row 3

TimestampRecipient nameMessageSenderEmail addressEmail sent

Thanks in advance for your help!


r/GoogleAppsScript • • Dec 14 '21

Unresolved Anyone have a script to auto allow links in importrange function for sheets

8 Upvotes

Ok,

So I want to have a list that I am constantly adding links. My dashboard pulls data from those links with the importrange function.

Anyone have made a script to auto allow those. The first time the link pulls info it has me allow access but I have the main links in a hidden sheet.


r/GoogleAppsScript • • Nov 11 '21

Question I need help exporting all my directory contacts from Google Contacts

8 Upvotes

I am only able to export my contacts list. However, I want to export the whole directory to csv. It says I cannot export multiple contacts from directory. I feel like I am missing something simple. Is there are script for this export? Or any tool I could use?

I have searched around the internet and found something that may be close. This was the script, but I could not get it to work, it was giving me some 'await' error. I don't know any Javascript so I cannot fix it. I was hoping someone might be able to assist me to get this working. Here is what I had found

https://webapps.stackexchange.com/questions/85768/how-to-download-all-directory-contacts


r/GoogleAppsScript • • Jan 14 '21

Resolved First time user: Apps Script won't let me save anything, even default/blank function

8 Upvotes

Hi all, please forgive my lack of knowledge as I'm sure I'm just making a stupid mistake. I'm trying to write an onEdit function for a spreadsheet, but when I try to save I keep getting the error,

Syntax error: SyntaxError: Invalid or unexpected token line: 1 file: Code.gs

I have no clue what I am doing wrong. My code looks exactly like every example/video/etc. I can find... Here's the function:

​function onEdit(evt) {

 ​ var ss = SpreadsheetApp.getActiveSheet();
​  var r = evt.range;
​  if (r.getColumn() > 2 && ss.getName()=='Sheet1') {
 ​   var datecelladdress = 'A'+ r.getRowIndex();
 ​   var timecelladdress = 'B'+ r.getRowIndex();
 ​   ss.getRange(datecelladdress).setValue(new Date()).setNumberFormat("MM/dd/yyyy");
  ​  ss.getRange(timecelladdress).setValue(new Date()).setNumberFormat("hh:mm");
​  }
​}

Even if I create a new blank script, with nothing except "function myFunction() {}", it gives me the same syntax error.


r/GoogleAppsScript • • Nov 29 '20

Question JSON API / DeepL API In Google Scripts

8 Upvotes

Hi Guys,

I am not a coder, just someone who tries to learn Google Scripts for personal purposes. Apologies, if this is a very stupid question! I access the DeepL API in Google Scripts, which works just fine.

var url consists of my DeepL API code and the text it shall translate (e.g. "Hi, I am Fabian").

var response = UrlFetchApp.fetch(url); var json = response.getContentText(); var data = JSON.parse(json); Logger.log(data);

This returns the following:

{translations=[{detected_source_language=EN, text=Hallo, Ich bin Fabian.}]}

I want the output to be just the translated text ("Hallo, Ich bin Fabian."). I tried to get there by changing Logger.log(data) to Logger.log(data.translations.text), which then unfortunately returns "null". What am I doing wrong?


r/GoogleAppsScript • • Nov 02 '20

Guide Get your Yahoo Fantasy Football Data into Google Spreadsheet

8 Upvotes

In my latest installment of "Who says you can't use a Google Sheet as a database???".

Yahoo! Fantasy Football Data to GAS

I have been wanting to get data from our fantasy football league. The scripts connect into the Yahoo! Fantasty Sports API (which really sucks). The script uses the OAuth2 (to authenticate to Yahoo!) and Better Log libraries (only OAuth2 is required).

You can view a working copy at https://docs.google.com/spreadsheets/d/11pMlfiHCAtTR1qGK6recZliVYyybCQwX462l3681L5Q/edit?usp=sharing


r/GoogleAppsScript • • Aug 21 '20

Question What are you automating with GAS?

8 Upvotes

I'm curious... what are your favorite things to automate... And why?

I'm currently automating as much financial tracking as I possibly can... Partly because I enjoy it, and partly because I hate the repetitive task of updating my budget. Also child support tracking.

How about you?


r/GoogleAppsScript • • Jun 17 '20

Question How to refresh IMPORTRANGE values without manually accessing the Sheet itself?

8 Upvotes

I have an email script that sends an email every morning based on values in a table on the Sheet. Thing is, those values are linked to the Sheet from a data dump sheet elsewhere, and brought in using various =IMPORTRANGE() formulae. What I am noticing is that since no one accesses the Sheet that the script is built in, the email is sending the previous day's values instead of the recently updated values. I suspect this is because the actual cell values in the IMPORTRANGE isn't refreshing to reflect the latest data available, presumably bc Google didnt expect a need for data to refresh if no one is looking physically at the Sheet.

Is there a way to force the refresh of a Sheet via Apps Script or other Sheet settings?


r/GoogleAppsScript • • Jun 10 '20

Question Where does one find GScript experts for hire?

8 Upvotes

I have tracked a few down on Fiverr but they were either flaky or not competent. Besides major job platforms like UpWork et al, where are these people hiding?

Here's a quick run-down of what I hope to accomplish:

Directors enter ideas into spreadsheet
They run a script that sends out email with links to submit thumbnails
Illustrators click link that prefills the form, leaving them to upload thumbnail and hit submit
Results get stored in same spreadsheet, image gets saved to GDrive folder

Tester inputs YouTube URL to be use
A script updates that video's thumbnail using the image asset

Script creates new Ad in Ad Group with episode name
GAds Script pauses at 5,000 impressions or $5
Script emails results when ad gets paused

My thanks in advance!