Automatic PDF Attachment in Email from Google Sheet

Learn how to automatically send a monthly report from Google Sheets as a PDF attachment via email using Google Apps Script. This tutorial covers the entire process, from creating the PDF to setting up triggers for automation.

we are creating a monthly report and we want to send this report by email but as a PDF attached to that email I'm going to show you how in this video make sure we have only one tab this is a very simple implementation of this there are more complicated ones if you're doing like invoicing we can create multiple PDFs save them in Google Drive and then email that as an attachment as well but in this video we're just going to Simply email this page to well ourselves or the owner of the spreadsheet so go up to extensions appscript that'll open this we're going to create a function called send email PDF report we're going to essentially do two things we're going to create a PDF and then we're going to Send Better Email When Google Form Filled Out Simply Email Yourself From a Google Sheet Spreadsheet Automation for Beginners Automatic Email Report from Google Sheets

send that PDF as an attachment so let's create the PDF first we're going to go variable PDF equals spreadsheet app.get active spreadsheet get as and here's the important part mime type. pdf all caps set name we're going to call it monthly report very general okay when that happens we're going to get a PDF out of that but we need to send it as an email this is sort of a little bit complicated but follow along at the end of this we'll go mail app. send email email but we need to create sort of all of the information in the email we'll do that here variable email equals and in curly brackets we're going Spreadsheet Automation 101 Lesson 3: MailApp Simply Email Yourself From a Google Sheet Spreadsheet Automation for Beginners How To Send Emails as PDF to Kindle, Automatically

to do a comma separated list we're going to send it to someone which is we'll just do the owner of the sheet spreadsheet app. get active spreadsheet get owner do get email we'll need a comma after that too and subject monthly report attached comma body of the email C attached report another comma and now the final magic attachments colon and in square brackets put this variable PDF that we put up here so again we're creating this PDF we're creating this email who it's to the subject the body the attachments and Weekly Email Sheet as Lead Magnet Simply Email Yourself From a Google Sheet Spreadsheet Automation for Beginners Automatic Email Report from Google Sheets

then we're sending it so let's save this command s and right now we could send this we can click run and it's going to ask us to authorize and it's sent here we see what what it's sent C attached report here's the subject and here's an attachment with a PDF that looks very much like our spreadsheet very awesome let's automate this let's make sure that this gets sent every month at the end of the month but how do we do this automatically over on the left side click Triggers on the bottom right click add trigger we're going to choose which function to run if you have multiple functions you'll have to choose it here if you only have this one function it will be here already send email PDF report from EV vent Source Time driven I'm going to need to change this to Spreadsheet Automation for Beginners Email Yourself a Cell from a Google Sheet, Every Day Spreadsheet Automation for Beginners Automatic Email Report from Google Sheets

month timer and now we get to select the day of the month now I'm going to select the 31st here and at the end of the month we can say 10 to 11:00 p.m. right we could also consider sending this on the first of the month to make sure that we've put in last month's data so let's do that in the morning 6:00 to 7: a.m. on the 1st another option here is because this is automatic and maybe we've been doing this manually and it's not necessarily done literally on the first we may want to choose a second third fourth fifth to give it a few days in case you want to make sure that all the data is in there and correct maybe so you can choose when to send it here click save it may ask you to authorize Different Kinds of Automation Email When Over 10 Days Since Last Update

again or for the first time if you haven't yet once the trigger is created it will now send every month if you want to edit it come back to app script triggers and then click on the pencil icon to edit it but also if you want to delete it these three dots here can be found delete trigger we can always delete the trigger anytime we want and add it again just a few simple clicks hopefully this was helpful to you to send a Google sheet as a PDF attachment automatically if you're looking to get more out of your Google Sheets cool things you probably never knew you could do subscribe here to better sheets on YouTube Uncheck Every Checkbox in Google Sheets What Can You Automate in Google Sheets? Every single trigger available to Google Sheet users Automatic Email Report from Google Sheets

Big Year 2027 calendar: the whole year on one Google Sheet

Free 2027 calendar.

Copy it to your Google Drive.

Free. No password, no card. The sheet link shows up right here.