Google Docs - Automatically Replace All Old Logos on Current Documents with a New Logo
What this scenario does: Retrieves Google docs from a folder and updates the logo.
Level Of Difficulty: Intermediate
Implementation Time: Approximately 20 mins
Assumptions: You have a Google account with the connection added and a folder created in Google Drive with Google docs. You are familiar with the functions of the Iterator and Array Aggregator.
So you’re rebranding your company and upgrading that drab looking logo to something more eye-catching but here's the problem, you have numerous Google docs that need to be manually updated with the new logo. Talk about time-consuming! Instead, let us show you how to automatically update the logo on your Google docs. Ready? Let’s go.
Configuring the scenario
The scenario consists of the following modules:
Google Docs > List documents
Google Docs > Get content of a document
Google Docs > Replace an image with a new image
Here’s the scenario:
Let’s click on the trigger module which is the Google Docs > List documents module that retrieves a list of documents from the selected folder.
In the Folder ID field, simply select the folder that contains the documents. By default, the maximum number of results is set to 10:
Next is the Google Docs > Get content of a document module which retrieves a specific document.
You can choose a file or toggle the map switch and map the Document ID element outputted by the preceding module to the Document ID field:
The Iterator which converts an array of items into a separate bundle, resulting in multiple bundles of data, follows the Google Docs > Get content of a document module.
You can click on Add item or toggle the map switch and map the Inline Objects Array element outputted by Google Docs > Get content of a document module to the Array field:
Let’s move on to the Array Aggregator which aggregates multiple bundles of data into a single array containing collections of specified items (opposite of the Iterator__).
Select the Iterator as the Source module. Under Target structure type, select Images Replacement and map the Object ID element outputted by the Iterator to the Image Object ID field.
Lastly, enter the Image URL in the field below:
The final module in the scenario is the Google Docs > Replace an image with a new image module.
Under Replace an Image, select the By Mapping option and map the Document ID element outputted by the Google Docs > Get content of a document module to the Document ID field.
Next, toggle the map switch for the Images Replacement field and map the Array element outputted by the Array Aggregator:
You are all set! Let's take a look at the scenario execution.
Here you can see that the bundle passes through from the trigger module to the subsequent modules and results in the update of the logo:
This is the Google doc with the original logo:
Here is the document with the new logo:
Boom! Now you can change your logos on all your Google Docs automatically!