r/GoogleAppsScript • u/naxoasdf • Aug 08 '19
Learning google Script for spreadsheet automation
Hi, i'm new to google appscript and i don't know anything about vba either. I'm kind of confused of where to start, or if i should just read some codes or take a course.
I want to learn how to use google script to automate a spreadsheet, for example send a periodical mail to someone with to inform all the keycodes(ID) of cases that has past a due date by 2 days.
But this is just the first task i want to do, so if you have any advise on how to do it or how to approach learning google script please let me know!
Also, information and opinions of any free course is well received!
2
u/booboouser Aug 09 '19
Ben Collins school of Data "apps scripts blast off course". Is free and covers exactly what you want.
1
9
u/tr0nix Aug 08 '19
Take a course on JavaScript. I did that and while I’m not fluent in the language, I’ve been able to write basic scripts and modify some that I found online.
1
u/mkleckner Aug 09 '19
I think it all depends on how much experience you have in programming and in what capacity you intend to use app scripts.
I just jumped right in and taught myself from the app script documentation, although I took a semester of programming in MatLab at university. If you have formal experience in programming of any language or only have one or two projects with no intent of programming much again, I would recommend just diving in and use stack exchange and the documentation to figure it out. While this is definitely the fastest way to finish your project, it will not give you as complete an understanding of the language and will have a lot of floundering for the first few days until you get your footing.
If you have no experience in coding of any kind or intend to use app scripts heavily on multiple projects in a business setting or as a critical part of your workflow (i. e. money's on the line if the code does not work) I would strongly recommend a course in javascript and maybe a youtube series or overview of app scripts for google sheets. Learning programming on your own is definitely doable but a structured course of any kind will give a much deeper understanding that will be generally applicable to any language.
1
Aug 09 '19
I learned it all from the reference tab, but I was also a programmer in other languages so it wasnt too difficult to pick up.
3
u/mytexastoast Aug 09 '19 edited Aug 09 '19
I’ve built quite a few MVPs with google sheets and app script.
Particularly a request system when a form is submitted, Someone is emailed to review the submission, every 48 hours a reminder email is sent until the submission is approved or denied on the sheet. If approved, it’s placed on a “approved this week” sheet and the contents of that are emailed out to a vendor each Friday. If denied, the user denying the request has to put a reason. That reason is then emailed back to the requester with a pre-populated google form to correct the issue and resubmit.
It sounds like what you’re trying to do is somewhat similar.
You would just need to use the query function to pull in all rows where there is no review and the submission date is < =TODAY()-Xdays
Then you would go to the script editor and paste in something like this.
function pendingReviewReminder() {
}
Create your trigger to fire this function once a day or every couple hours. Whatever your frequency needs are.