title: How to add an existing chart in sheets while sending an email
body: <p>I want a Line chart from my spreadsheet to appear in the email.</p>
  
  <pre><code>function sendEmails() { 
      var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Agent Report - Monthly") 
      var startRow = 3; // First row of data to process since there is a header row 
      var emailRange = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Agent Report - Monthly").getRange("D3");
      var emailAddress = emailRange.getValues();
  
      var chartImg = Charts.newLineChart.setRange(12, 8) //This Throws an error
      var subject = "Agent Report - Monthly"; // This is the subject of the email  
      var greeting_text = 'Hey Please find the below Report '+'&lt;/b&gt;&lt;br&gt;&lt;br&gt;';
      var text = greeting_text;
      text+=SheetConverter.convertRange2html(sheet.getRange(startRow, 3 ,10,8));
      text+='&lt;br&gt;';
      var options = {
          htmlBody: text,
          noReply:true
      };
      MailApp.sendEmail({
          to: "xxx@der.com",
          subject: subject,
          htmlBody: options,
          inlineImages: {
              chartImg: chartImage,
          }
      });
  }
  </code></pre>
  
  <p>When I try to add the chart to the variable <code>ChartImg</code> in line 7, it throws an exception.</p>