0

I am trying to send some google slides from the drive as attachment to Gmailapp sendemail function. It always seem to send pdf, and if I use blob it sends a corrupt file which doesnt open on windows.

Here is what I am doing:

function testemail() {
  var email = "name@domain.com";
  var subject = "hello world";
  var body = "testing";
  var flyerFile = DriveApp.getFileById("1fiopyqtue");
  var flyerBlob = flyerFile.getBlob();
  GmailApp.sendEmail(email,subject ,body, {attachments:[flyerFile.getAs(MimeType.GOOGLE_SLIDES)]});
  GmailApp.sendEmail(email,subject ,body, {attachments:[flyerBlob]});
}

This one is very simple but I cant seem to get it working. Cant find any answer too. Thanks for helping out.

TheMaster
  • 45,448
  • 6
  • 62
  • 85
WiData
  • 193
  • 4
  • 13
  • 1
    Possible duplicate of [Downloading a Google Slides presentation as PowerPoint doc using Google Apps Script?](https://stackoverflow.com/questions/52536507/downloading-a-google-slides-presentation-as-powerpoint-doc-using-google-apps-scr) – TheMaster Oct 25 '18 at 22:38
  • Thanks will take a look, @i-i – WiData Oct 25 '18 at 22:57

0 Answers0