Automating Google Slides production

andrewm4894 picture andrewm4894 · Apr 4, 2015 · Viewed 8.6k times · Source

I'm wondering if there may be a way to programmatically create presentations in Google Slides. So for example if underlying data changes I can just refresh the deck without lots of copy paste for all the charts etc.

Something similar to using like markdown and R slidify to produce data driven PDF presentations. My end product needs to be a nice pretty Google Slides presentation.

Is this the sort of thing I could use the Google Drive API for? I'm not sure if App Script can be used for Slides like you can for Sheets.

Am hoping it's a common enough problem that a solution exists.

One option is to just automatically produce a PDF and then manually import into Google Slides. Problem is that this approach is a bit limited due to errors on conversion and lack of other Slides functionality.

Any input much appreciated.

Answer

wescpy picture wescpy · Apr 18, 2018

It's 2018, and great news (and answers!) to this older question:

  • The Google Slides REST API launched in Nov 2016... here is its launch post and 1st developer video I made to get you started. A shorter code sample than the video's is the Quickstart in the docs (available in a variety of languages). If you're new to Google APIs, I recommend you watch this video, then this one, and finally this one first to get an idea of how to use them. The code samples are in Python, but if you're not a Python developer, just pretend it's pseudocode because many languages are supported by Google APIs Client Libraries. :-)
  • If you code in JS and want to have Google host+run your app, the Slides service in Google Apps Script launched in Sep 2017... here is its launch post and 1st developer video I made to get you started. This is also the same technology behind Slides Add-ons. If you're new to Apps Script, I recommend you watch this video to get an idea of what it is and how to use it. Then check out its video library for more examples of using Apps Script.
  • Additional videos on programmatically accessing Google Slides can be found via its developer video library. Videos on this and other G Suite developer technologies can be found in the G Suite Dev Show series which I produce.
  • There's no video for this, but there's an open source Markdown-to-Google Slides generator (written in Node.js) my colleague created that you may be interested in, representing one of the "reference apps" using the Slides API. You can find more about this app as well as others on the Samples page of the documentation.
  • No video for this either, but Node.js developers who want to get up-to-speed quickly learning how to use this API should try the Slides API codelab where you build an app that uses Google BigQuery to analyze open source licenses and generate a report presentation... letting you learn TWO Google Cloud technologies with one tutorial! :-)