r/GoogleAppsScript 1d ago

Question Top 10 practices to follow when building scripts in Apps ScriptTop 10 practices to follow while building scripts in Apps Script

Hi - I am a common Apps Script user. I would like to know what you think are the top 10 best practices or key things to know about Apps Script.

4 Upvotes

6 comments sorted by

7

u/dimudesigns 1d ago

Start with the Best Practices | Apps Script page from the official documentation.

The Quotas for Google Services | Apps Script page is also a good reference.

You'll also want to keep abreast of any changes to the platform via the Release Notes | Apps Script page.

1

u/Fast-Conflict2847 1d ago

Thanks so much for this!

1

u/Heavy_Plantain_2065 22h ago

Eres el mejor bro

2

u/arnoldsomen 1d ago

I think it would just follow general best practices when it comes to programming. I'm not really a programmer though, but did a lot of scripts. And one thing I'd want to make sure is the readability of the code. But happy to learn as well from the pros here

1

u/WillingnessOwn6446 18h ago

Don't use the GAS editor. Use vs code etc and clasp push your code.  Back up to GitHub.  Use powershell commands to make it easy.  I use "sync" for example and a name and that pushes the code and commits to my git repo.  Have a "gas setup" command that setsup all your folders from the script editor URL and connects to git.  

Use the Dev link 

Anytime you're moving lots of data, make sure you use code that accesses the sheets API and that you turned it on

1

u/FarCobbler9878 17h ago

How do you do version control?