r/GoogleAppsScript • • Jan 20 '26

Question Timeout alternatives

Hi all, hope you are doing fine.

At work we have this important process that runs periodically from AppScripts (don't judge, it is what it is). A couple of days ago, we saw a decrease in the run time limit to 6 minutes which affects A LOT this process. I saw you could ask Google for an increase in this limit...

I just wanted to ask if someone went through this process of changing the limit/quota, if there is an alternative that doesn't involve restructuring the code or changing to another language/platform, or what else could we do?

Thank you so much.

16 Upvotes

40 comments sorted by

View all comments

Show parent comment

1

u/AwayPiano Jan 20 '26

I will look into Google Cloud Run, I read in some place that some functionalities are not the same and you have to create workarounds. It isn't like a copy and paste thing, right?

2

u/TheAddonDepot Jan 20 '26 edited Jan 20 '26

No, its not copy-n-paste. The API interfaces will be different.

Google Apps Script offers Built-in services to wrap Google REST APIs for Google Sheets, Drive, Forms, Slides, and many more. These wrappers do a good job of abstracting away the complexities of interacting directly with APIs (i.e. writing explicit HTTP requests and handling HTTP responses, authentication and authorization, etc.).

If you go the Cloud Run Function route, the training wheels are off. However, you can still find libraries native to a given language runtime (Node.js, Go, PHP, Python) that act as wrappers/clients for these REST APIs, but the methods will be different.

GAS also offers Advanced services for many Google APIs that closely mirror their REST implementations, so if you are familiar with those then transitioning to the Node.js runtime should be relatively easy. Node.js and Google Apps Script are both Javascript runtimes, so while you will have to refactor the code, the process of migrating from one to the other will still be grounded in the same programming language.

2

u/TheAddonDepot Jan 21 '26 edited Jan 21 '26

Turns out there is a Node.js library currently in development by Bruce Mcpherson that developers can use with Cloud Run (Node.js runtime) to retain GAS-like mnemonics/syntax. It may allow you to leverage most or all your existing code with a few tweaks.

The following articles should provide a good jumping off point: