You are on page 1of 33

Automation of

Celebration Creatives
for the Winback
Exercise
By Sanjeet Yadav
Project Summary
● Importing Images From the Drive

● Importing Data from the Speadsheet

● Creating Automated Presentation

● Exporting Generated Presentaions on Drive

● Converting Presentations as PDFs on Drive

● Converting PDFs as Image format

● Sending out Images on Slack and Email


Project Problem Statement

For Winback Exercise many Celebration Creatives has to be sent daily. It is tedious task to create creatives
everyday and send them out. All of this can save effort and time if it is automated.
Proposed Solution

Make Google Appscript which automatically generated presentation with Celebration Creative Slide and send them
out.
My Contribution in the Project

I worked with Google Appscript to import images from the drive and importing data from the
speadsheet. Using this imported data and slide template generated required slides. Saving
generated presentation on drive.
Later I incorporated other peices of codes of other project members to complete the project.
Project overview
Explaination of project workflow

DRIVE IMAGE
FOLDER

CREATIVE SENT VIA


MAIL

DATA SPEADSHEET
GOOGLE APPSCRIPT
FOR SLIDE

TEMPLATE SLIDE

GOOGLE COLAB :PYTHON CREATIVE SENT VIA


SCRIPT SLACK
Google Appscript
Importing Images from the drive

Now all the data we need from drive is in


two arrays.

Instruction for User :

Make sure have edit access to


‘BD Photographs’ folder stored somewhere
on drive.
Google Appscript
Importing data from the Speadsheet

All the data we need from speadsheet is in


four arrays for each sheet.

Instruction for User :

Make sure have edit access to


‘Creative’ speadsheet stored somewhere on
drive. Here we are access sheet with its ID.
That is there is line 92.
Google Appscript
Using data from the Speadsheet

After user selected which entries should go


for the creative. All the selections are stored
in two arrays.

Instruction for User :

Make sure have edit access to


‘Creative’ speadsheet stored somewhere on
drive.
Google Appscript
Linking Drive and Speadsheet data together : Explaination

After user selected which


entries should go for the
creative. All the selections are
stored in one arrays.

Lets say it is for case with one


image.

Were are linking data from


drive and sheet on the basis on
name arrays of both sources.
Google Appscript
Role of Template in the Automation

Since slides are being generated from the


template itself. It is easier for user to change
layout of template and it will be reflected on
the output slides.

Instruction for User :

Make sure to have edit access to


Template and it is stored somewhere in the
drive.
Google Appscript
Role of Container Slides in the Automation

Since slides are being generated from the template itself. It is easier for user to change layout of template and it
will be reflected on the output slides.

Instruction for User :

Make sure the slides on with this Appscript in running has Same page setup dimensions as of template for the best
result.
Google Appscript
Role of Container Slides in the Automation

Now we have slide with page elements just as template. We have two variables per entry to manipulate.

Instruction for User :

Make sure the slides on with this Appscript in running has Same page setup dimensions as of template for the best
result.
Google Appscript
Role of Container Slides in the Automation

Here required image and text is being set.

Instruction for User :

Make sure the slides on with this Appscript in running has Same page setup dimensions as of template for the best
result.
Google Appscript
Other important function on the script : Initialize function

It is just to make sure all the necessary


folders are present on users drive.

Instruction for User :


It is good practice to always start with the
initialize function.
Google Appscript
Other important function on the script : Deploy Function

It first makes sure all the folders are empty


to avoid using previously generated slides
and pdfs.
Then it saves the generated slide on drive
folder and clear the current presentation for
next use. It further makes pdf format
conversion and save it on drive as well.

This function is in collaboration with


Keshav Sharma (project partner).
Google Appscript
Other important function on the script : onOpen Function

To give user friendly interface to interact with


the script
Google Appscript
Other important function on the script : onInstall Function

This function will be useful, if this script has to be published as Slides Add-on. It will call onOpen function and
entire script can be used to interface.
Google Appscript
Logic of Main( ) Function

For
End If/Else
Loop
Google Colab Python script
Done by Other Project Members (Nayan, Chandrahas)

This completes the


important step on work
flow.
Google Appscript
Done by Other Project Members (Keshav,)

Other important
function on the
script : SendMail
Function
Work Flow User Manual
Next slides will explain step by step process of automation.
Work Flow
Work Flow
Now user is good to go ahead and
create deck
Work Flow
Work Flow

Google Colab Python


Script
Work Flow

Google Colab Python


Script
Work Flow

Step 3 Step 1

Come back to slide and run Make Selection on sheet


sendmail. then Initialize and create
deck on slides

Creative
Automation Cycle

Step 2

Deploy on Sheet and Go run


exclusive python script
Robustness of Appscript
Customization scope for Advanced Users

Advance user can use script to use it for multiple


sheet by adding more functions.
Robustness of Appscript
Customization scope for Advanced Users

On line 168, user can change the ID of the Template to be used

On line 492, user can change the name of the image to be used when origianl image is missing on the
drive folder
Robustness of Appscript
Customization scope for Advanced Users

On line 66, user can change the name of the image folder to be used

On line 92, user can change the ID of the Speadsheet to be used


Other Customization Options
Customization scope for Regular Users
Since Generated slide is build on a copy
of template, therefore any changes on
template will be directly reflected on the
generated Slide.
Other Contribution on the Project
Incorporating other Project members’ work in single work flow cycle

You might also like