Bringing Google Slides To Life

Embed your Deepnote notebook blocks in slides & refresh them with a single click

Lukas Frei
Deepnote
5 min readDec 23, 2021

--

Photo by Teemu Paananen on Unsplash

TL;DR

Slide decks and notebook-centric analytics workflows don’t mix well. While platforms like Medium and Notion make embedding blocks and their outputs easy, slide decks still require tedious copying and pasting of plots every time the data or code changes. So, being an avid Deepnote user yet also frequently using Google Slides for school or work, I decided to build a workaround that allows for something I would call “almost embeddings.” Feel free to install the Google Slides add-on and give it a try yourself or contribute to the project on GitHub.

Google Slides + Data Science Notebooks = 💥

While notebooks are excellent tools for data science projects, they are not (yet) the default medium for communicating insights in many schools or businesses. At the same time, products like Google Slides do not support embedding content into them such that they refresh automatically once code or data gets updated. These limitations result in a time-consuming process of constantly copying and pasting plots into slide decks from notebooks.

An add-on comes to the rescue

With Deepnote notebooks, you can embed and share blocks on Notion, Medium, and other platforms. Using this Deepnote feature, the add-on I built enables the “almost-embedding” of blocks in Google Slides.

Installing Google Workspace add-ons is really easy. First, make sure you’re logged into the correct Google account, head over to this link, and hit install. After granting the add-on the required permissions, you’ll be able to see the add-ons logo in the right-hand sidebar once you open Google Slides!

Walking through an example

Say I’m a product manager preparing periodic team updates. The structure of my slide deck is more or less the same for every meeting, but the numbers change.

To start, I will open the Deepnote notebook used by the analytics team to track user sign-ups and copy the sharing link of the block output I want to include in my slides.

Now, all that’s left to do is add the “almost-embedding” to the slide deck. You can do this by clicking the add-on’s icon in the right-hand sidebar and pasting the copied link into the text box. The add-on also gives you some other options like adjusting height and width. Note that you have to specify which slide to insert the “almost-embedding” in as the current setup stores which slides are linked to which embedding links.

Come next week, all that’s needed to update this slide (and all other slides containing “almost-embeddings”) is one click. Well, actually, it’s two clicks and one hover. Please don’t blame me; it’s the way add-ons are structured in Google Slides.

And that’s it! Note that you can resize and move “almost-embeddings” on the slide on which they were inserted. As of now, however, they cannot be moved to another slide.

How does it work?

Workflow of inserting a block output into a slide deck

The add-on circumvents Google Slides not allowing embedded content by screenshotting the content you want to share and inserting the images into your slide deck. It also uses your own Drive as its database and stores which slide decks contain which “almost-embeddings” in a JSON file. Then, whenever you hit want to refresh all block outputs, the add-on iterates over all your “almost-embeddings” and replaces them with refreshed screenshots. That way, you’ll only have to insert a plot or code snippet once and update your entire slide deck with a single click.

Contributing & limitations

The code used for the add-on is published on my GitHub account. Feel free to fork the repository and extend the add-on’s current capabilities if you’d like to contribute!

As this is hopefully only the beginning of integrating notebooks with slides, there are several things to keep in mind:

  • Issues when using multiple Google accounts. The most pressing issue right now is that Google always tries to use a user’s default Google account when using the Drive API. This means that when you’re logged into multiple Google accounts and try to run the add-on from a secondary Google account, the add-on will have issues accessing Google Drive. There’s an open issue here with more details on the problem.
  • Screenshot limitations. As the current version of the add-on relies on screenshots via a service called ScreenshotAPI, there are limits regarding the number of users the add-on can support. If you know of alternatives you would like to incorporate instead, feel free to make suggestions through GitHub.
  • Security. As always, it is essential to keep security in mind. As mentioned above, the add-on is a workaround and not production-ready by any stretch of the imagination. The URLs you enter will only be stored on the Google Drive belonging to your default (!) Google account and in ScreenshotAPI logs. If you’d like to help improve the add-on, head over to GitHub.

Summary

Slide decks and data science notebooks are not best friends yet, but, as this straightforward add-on shows, there is plenty of integration potential between the two. In particular, it would be amazing to see interactive embeddings in slide decks, adding an entirely new level of flexibility to presentations. If you would like to try out the add-on yourself, head over here to install it.

--

--