Members-only tutorial
Watch the video and get the practice sheet with membership.
About this Tutorial
Sheet Resources
Video Transcript
<div>0:00 So this completes learn to code in Google Sheets and I wanted to finish off by giving you a few more quick concepts that expands your mind of what Google Sheets can do.<br>0:14 I have lots of videos about each of these in better sheets and I have an entire course called spreadsheet automation about all of this, sending email accessing APIs.<br>0:25 That goes a lot deeper and a lot further. But I just wanted to introduce you to these concepts in case you wanna read about it yourself and know where to go.<br>0:35 So one thing you can do in Google Sheets is record macros. Explore Coding in Google Sheets Advanced Coding in Google Sheets for Programmers Escape Spreadsheet Hell VIBE CODE GOOGLE SHEETS
If you don't know sort of how to express a sheet or a cell or a row inside of app script , this is a good way to see it.<br>0:48 So go to extensions macros, record a macro right now it's recording. You can use absolute or relative references . We're gonna select this B column.<br>0:58 We're gonna bold it and you can see this action one set formatting save. We're gonna say bold column B. How to Record Macros Getting Started Coding in Apps Script How to Assign Macros To Buttons in Google Sheets
Let's see what happens.<br>1:09 We can also go up to extensions app scripts and here you'll see that there has been created a sheet called macros.gs.<br>1:19 Go there and see via sorry, var spreadsheet , Get active spreadsheet dot get range , B2B activate spreadsheet , get active range list set font weight, so that by bolding, by creating this macro for bolding, I now know the function , the Google script function , the script function for bolding, which is set font weight, bold, pretty cool way to start to learn more code and what is possible in sheets.<br>1:52 We can also send emails via mail app. Getting Started Coding in Apps Script Advanced Coding in Google Sheets for Programmers Email When Cell Changes
So if we go back to our code here, just going to go function can call, we can call this anything we want.<br>2:02 Email some people. I'm gonna put those curly brackets there. And all we're using is this class mail app. So in Google app script developers.google.com gives you a little sample of a send email.<br>2:16 I like to actually use this part because we want to add some variables. So we go mail, app caps, dot send, email recipient, subject body.<br>2:27 That's all we need to send an email. So we do variable recipient equals andrew better sheets.co. Simply Email Yourself From a Google Sheet Automated Project Management in Google Sheets Email When Cell Changes
We can say subject equals hello there in the body.<br>2:43 We can write, this is the body of the email command s. Now I'm gonna run this from here. I'm gonna need to authorize it.<br>2:51 Of course, I'm gonna move this over a little bit, but I'm gonna change this to email. Some people click run.<br>2:58 We're gonna have to auto authorize it and you now know how to access a cell inside of a sheet from earlier videos.<br>3:07 So you can actually use these variables and send data from inside the sheet through email to someone. Simply Email Yourself From a Google Sheet Automated Project Management in Google Sheets Email When Cell Changes
So I just got this in my email and you'll see this in my inbox here.<br>3:18 Hello, there's a subject to Andrew be sheets.co. And this is the body of the email. See, it actually sends the exact email that I sent, that I wrote.<br>3:28 You can also access APIs via URL fetch app. So this is literally URL fetch app dot fetch, and you can grab a website.<br>3:38 And in this particular case, in Google App script example, they're going to google.com and they're getting the text, the html code of that Google homepage.<br>3:50 So you can go to website and grab that data . Pretty darn cool. Learn to Code in Google Sheets, For Programmers | For Advanced Google Sheet Users Access Free API's with Google Sheets Scrape Google Maps in Google Sheets
I wanted to introduce you to simple versus Installable triggers.<br>3:59 So a simple trigger is something like the function on edit that you can name here. Now, every time there's an edit inside the sheet, this script will run, can edit from the point of view of a user if you want.<br>4:13 The more interesting triggers, they're called installable. Triggers can add a trigger . What Can You Automate in Google Sheets? Every single trigger available to Google Sheet users 2 Forms 1 Sheet
And these are event sourced from spreadsheet , we have the on open.<br>4:27 So every time a spreadsheet is open, every time there's an edit or a change in the structure of the spreadsheet or a form submit , you have those four options.<br>4:35 These are installable triggers and we can write the code and then we can install those triggers to run. Pretty cool.<br>4:42 Versus here, this is what's called a simple trigger on edit. You have also function on selection change. There we go.<br>4:55 You have some, a few already in app script here we can create a new sheet inside of a spreadsheet. What Can You Automate in Google Sheets? Every single trigger available to Google Sheet users Activate A Certain Sheet When Opening a Spreadsheet 2 Forms 1 Sheet
So we can say new sheet name here, we can run this, create new sheet , run it.<br>5:11 And we can see here, actually this takes a little bit more, we gotta create it and then dot set name.<br>5:22 Sorry, what I meant was you create a new sheet in your drive. So this spreadsheet app dot create new spreadsheet name actually creates it in your drive.<br>5:30 Here's new sheet name . Create a new Spreadsheet from just a Name in a Sheet. How To Create a Stop Watch in Google Sheets Click, New Sheet
So in this video I shared with you how to record macros , where to edit those macros inside of app script At recording macros gives you a really cool insight into how a sheet functions with App Script .<br>5:46 I introduce you to the idea of mailing emailing from sheets and actually accessing all of the web through URL fetch app.<br>5:54 You can access APIs that way, and I Introduce you to the idea of simple and insolvable triggers and you can create new spreadsheets from the spreadsheet that you're in.<br>6:04 So this is all to introduce to you the idea that there is more to learn much, much more, much more to get introduced to much more, to do, much more.<br>6:17 You can automate, you can automate in so many different ways, and I'm really excited because you're on your way to coding even more.<br>6:25 Check out my my class or course or workshop called Spreadsheet Automation. Learn Google Sheets Apps Script Advanced Coding in Google Sheets for Programmers How to Assign Macros To Buttons in Google Sheets
Really excited for you to keep learning by.</div>
Courses
Why Code in Google Sheets? - Learn to Code in Google Sheets Part 1
Tips to Navigating Thousands of Lines of Code In Apps Script
How to Write a Function - Learn to Code in Google Sheets Part 2
From Sheet to Script And Back Again - Learn to Code In Google Sheets Part 3
Copy That, From One Sheet to Another - Learn to Code in Google Sheets Part 4
Now Do It Every Damn Day - Learn to Code in Google Sheets Part 5
Wrap Your Mind Around This - Learn to Code in Google Sheets Part 6
Write Your First Script
00:08:31
How to Record Macros
00:06:20
How to Edit a Macro
00:08:22
How to Trigger Macros Daily
00:06:58
Automatically Uncheck A Daily Checklist
How do I reference a different spreadsheet in Apps Script?
Topics