The Google slides API(currently in version 1) is very interesting in a sense that it provides most of the features for creating presentations. Things like setting transparency of images, creating shapes, text boxes, stretching pictures to fit the template, choosing layouts, text formatting, replacing text throughout the presentation, duplicating slide and a lot more.
Now this is not a how to article and just a regular blog, I am not going to go into details on using the APIs and explaining the codes. Comment below and let know if you’d be interested for a video tutorial on this very idea. If we have many interested for the video tutorial, I will cover the entire codewalk along with how to on enabling APIs.
In this blog, I will talk about one of the smaller projects I took on at fiverr. If you are a regular reader, you might have noticed that I had been away for quite a long time from writing blogs. In the meantime, I started selling services on fiverr.
GOOGLE APIs and Automation
Google APIs are always interesting and allows developers with it’s superior APIs to build products and services around it. Even better when you integrate multiple APIs into a single product/service. I had used Google sheets API and drive API in the past. While slides API is essentially a subset of drive API, I hadn’t yet used it. Since presentations actually reside in the drive itself, I like to call slides as being a subset of drive.
The task was to read a specific spreadsheet populated with contents and later take these data to add into slides using a template stored in the drive itself. Each of the rows in the spreadsheet corresponded to a specific entertainment keyword with columns defining statistics such as mobile impressions, video impressions, audience type, overall impressions, an image file name, etc.
The images, again were hosted in the drive and were to be used as background image for the slide corresponding to the row in the spreadsheet.
I made use of a library : python client for google apis to complete the task. Installation is as such
pip install --upgrade google-api-python-client
In order to make use of google apis, it is required to create a project on google console and activate the APIs required(in our case, Drive API, Sheets API, Slides API). Once the project is created, you can download the oauth2.0 credentials as a JSON file and take it from there.
I am going wrap up this blog here. If you are interested for a video tutorial comment down below. Thanks for reading. I appreciate your time. Follow me on github. If you are looking for automation scripts, you can message me at fiverr.