Spreadsheet Automation 101 - How to Automate Google Sheets · Lesson 24 of 40

Spreadsheet Automation 101 Lesson 3: MailApp

Members-only tutorial

Watch the video and get the practice sheet with membership.

Unlock tutorials
Learn about the needed variables for the Mail App to work. In this lesson, I’ll walk you through how you can email yourself or other people the items in a to-do list that hasn’t been done yet.
17 formulas linked inline Click any highlighted terms to learn more.

<div>0:00 All right, in this video I'm gonna introduce you to Mail app, because that's the function inside of Google Sheets and App Script that allows us to email either other people or ourselves.<br>0:12 And it's gonna be in the next video. The key part and it's fairly simple, so I really wanted to get through this to you very quickly in one little module, so function , we're gonna write this function email.<br>0:27 Actually the point of what, what we're doing is we're gonna email anything that's not done. Simply Email Yourself From a Google Sheet Automated Project Management in Google Sheets How to Send an Email With a Click in Google Sheets

So let's see, email let's just call it not done, &lt;laugh&gt;.<br>0:35 And we want to use some brackets here. Now, what do we want to email? It doesn't really matter right now as I introduce Mail app.<br>0:43 So all this is gonna do is gonna do mail app with a capital m, capital a dot. And we only have two options here.<br>0:50 So we're gonna use select send email. Now within Insent email, we have a lot of different options, but I'm not gonna go too far into that.<br>0:59 We could go to mail app Google App script here. Let me show you this a little bit. Simply Email Yourself From a Google Sheet Send Email to Kindle via Google Sheets Email When Cell Changes

And in this an email, we have four options here.<br>1:11 We're just gonna use the second one because it is the simplest one. We, we need just a recipient, a subject, and a body.<br>1:18 We can go deeper into the other ones, but this one is simple and I use it all the time. So what do we need?<br>1:24 We need a recipient, comma, a subject, and a body. What are these things? These things are variables. Now what we could do is write just string variables right here to start off with, to make sure this works.<br>1:36 So we need a variable called recipient or rec. Email Yourself a Cell from a Google Sheet, Every Day Email When Cell Changes

And we're gonna do [email protected], right? That's my own email address. You can use your own email address if you're following along with this video.<br>1:48 We need a subject we're gonna do equals hello with one Oh. We need a body variable. Body equals hi. Well, we can do Hello world, right?<br>2:04 So we save this. Now we're gonna run it. Once we run, we choose this the correct Email. Email not done.<br>2:10 Run it. We're gonna need some authorization . We do this authorization because we are using mail app right now. Simply Email Yourself From a Google Sheet Email When Cell Changes

When you look at all these authorizations, you'll see this send email as you, that's the mail app of this.<br>2:23 So we need to allow this we'll look at our email in a sec. And here we go. We got an email from ourselves.<br>2:33 So what this is, it is sending from, it is sending from the email that is the user of that Google sheet, and then it's sending to whoever I want.<br>2:43 So I'm actually sending from myself on a different Google account to someone to here on a different Google account. Email Yourself a Cell from a Google Sheet, Every Day Send Email to Kindle via Google Sheets Automatic Email Report from Google Sheets

So you can send externally to other people, or you can send directly to yourself.<br>2:54 It'll just be an email from yourself to yourself. And that's mail app. Mail app Is, is fairly straightforward. You use M A i l with capital M, capital A for app dot send email with capital E, remember, and we have three variables.<br>3:09 The recipient, the subject, and the body. We delin the limit them, the limit them by the comma, and we can run any kind of variable here.<br>3:21 Instead of maybe subject or body, we can reference a cell, right? We've already done that. Simply Email Yourself From a Google Sheet Email When Cell Changes

In this course you can reference a cell using spreadsheet app to get the subject, to get the body, and even to get the recipients, which we'll do in the next one.<br>3:35 What we want to do is we want to go all of these tasks and actually loop through them in that body, right?<br>3:41 So we'll do that with a four loop next.</div> Email Yourself a Cell from a Google Sheet, Every Day Quick Follow Up Email

Spreadsheet Automation 101: Introduction to Pre-course Videos Think Like a Programmer: Develop The Mindset of an Apps Script Coder How To Change Date Format Automatically Tips to Navigating Thousands of Lines of Code In Apps Script Spreadsheet Automation 101: Functions Spreadsheet Automation 101: Variables Spreadsheet Automation 101: Dot Notation Spreadsheet Automation 101: Camel Case Spreadsheet Automation 101: Parentheses Spreadsheet Automation 101 Lesson 1: GetValue - Introduction to SpreadsheetApp Spreadsheet Automation 101 Lesson 1: Spreadsheet Taxonomy Spreadsheet Automation 101 Lesson 1: A1 Notation vs Row,Column Syntax Spreadsheet Automation 101 Lesson 1: getActiveSpreadsheet() vs getActiveSheet() Spreadsheet Automation 101 Lesson 1: onOpen() Trigger - Custom Menu This Seems Like Automation Spreadsheet Automation 101 Lesson 2: Get Values - Introduction Spreadsheet Automation 101 Lesson 2: Arrays Spreadsheet Automation 101 Lesson 2: For Loop Spreadsheet Automation 101 Lesson 2: Bracket Notation Spreadsheet Automation 101 Lesson 2: Logger.log() Spreadsheet Automation 101 Lesson 2: If ( ){ } and Checkboxes Spreadsheet Automation 101 Lesson 2: onEdit() Trigger Introduction to Spreadsheet Automation 101 Lesson 3 Spreadsheet Automation 101 Lesson 3: MailApp Spreadsheet Automation 101 Lesson 3: Email Yourself For Loop Spreadsheet Automation 101 Lesson 3: Send Email Every Week Trigger Spreadsheet Automation 101 Lesson 3: Email Other People For Loop Spreadsheet Automation 101 Lesson 4: Access APIs Introduction Spreadsheet Automation 101 Lesson 4: UrlFetchApp Spreadsheet Automation 101 Lesson 4: OmdbAPI get ApiKey, get Data in URL Spreadsheet Automation 101 Lesson 4: OmdbAPI get data in Apps Script Spreadsheet Automation 101 Lesson 4: JSON (beautifier) and OmdbAPI parameters Spreadsheet Automation 101 Lesson 4: OmdbAPI Parameter Picker Automatically Clear Content | Refresh Reuse Recycle Templates Automate Google Sheets With Zero Experience Automatically Uncheck A Daily Checklist Activate A Certain Sheet When Opening a Spreadsheet Scoping Functions in Apps Script Breaking Through Errors In Apps Script VAR vs CONST vs CONSTANT in Apps Script