In This article, we see how to send Google Docs as an email attachment


  1. Add a new Spreadsheet
  2. Click on The tool menu icon 
  3. then click on script editor
google Script menu

These are some basic steps to send google docs in email

  1. Add a new function
function sendEmailToClient() { }


function sendEmailToClient() 
var result = SpreadsheetApp.getUi().alert("Are you sure, you want to send email?", SpreadsheetApp.getUi().ButtonSet.OK_CANCEL);
 if(result === SpreadsheetApp.getUi().Button.OK) {
  var message = {
    to:'[email protected]',
    subject: "Payment Details Summary",
    body: "Hi team,\n\nPease refer the attached PDF's and please take a initiate to settle down the pending payments if any thing is pending..\n\nThank you,\n Shiv Kumar",
    name: "Shiv Kumar",
    attachments: [SpreadsheetApp.getActiveSpreadsheet().getAs(MimeType.PDF).setName("Summary Report")]



google sheet Button
Assign script to a button