This is the gatsby-styled-blog-starter demo site. To download the code and get some instructions visit the Github repository . To be informed about updates follow @greglobinski

Insert From Drawings

Get drawings directly into your Slidedecks

November 09, 2017

During the #GoogleEI twitter chat, an idea was proposed and I couldn’t help but give it a try.

Thanks to @jentechnology for the great idea. Check her out on Twitter to see the super cool stuff she is doing with using slides to create yearbooks.

I had no idea, but you can’t actually import a drawing directly into a slide. You can only import image files. Well with, a little bit of code I fixed that.

I used the basic file-select documentation to build the file picker itself. This is pretty easy to follow along with here.

Once you have done that, a little bit of manipulation and you are golden.

function getDrawing(drawingId) {
  var image = Drive.Files.get(drawingId);

  var imageBlob = getBlob(image.exportLinks['image/jpeg']);
  var presentation = SlidesApp.getActivePresentation();
  var currentPage = presentation.getSelection().getCurrentPage();

function getBlob(url) {
  var response = UrlFetchApp.fetch(url, {
    headers: {
      'Authorization': 'Bearer ' + ScriptApp.getOAuthToken()

  return response.getBlob();

I did publish it to the add-on store, but it is unlisted. Installing add-ons is the easy way out! Look at the code, use the code, and improve the code!


jordan rhea I started as a teacher and taught myself to code with Python and JavaScript. Now I am passionate about sharing code and strategies to make teachers (and other G Suite users) as effective as possible with technology.

© jordan rhea 2018