Slides

Inserting Generated Text to Google Documents, Google Spreadsheets, and Google Slides using Gemini Pro API with Google Apps Script

Gists Description When the generated text can be automatically inserted into the cursor position of Google Document, Google Spreadsheet, and Google Slide, it will be useful for users. This report introduces sample scripts for achieving this. Sample scripts Here, I would like to introduce 3 sample scripts for a Google Document, a Google Spreadsheet, and a Google Slide. Create an API key These sample scripts request Gemini Pro API using an API key.

Retrieve Comments with Emoji Reactions from Google Documents, Google Slides, and Google Spreadsheets using Google Apps Script

Gists Abstract This report introduces the method for retrieving the Emoji reactions from the comments in Google Docs files (Google Documents, Google Slides, and Google Spreadsheets) using Google Apps Script. Introduction Recently, the Emoji reactions have been implemented in the comments on Google Docs files (Google Documents, Google Slides, and Google Spreadsheets). Ref With this implementation, the collaborative work has been higher. Here, it is considered that when the Emoji reactions can be retrieved from the Google Docs files, the statistics of the reactions will be also more useful for increasing collaboration.

Managing Row Height and Column Width of Table on Google Slides using Google Apps Script

Gists This is a sample script for managing the row height and the column width of a table on Google Slides using Google Apps Script. In the current stage, Google Slides service (SlidesApp) cannot manage the row height and the column width of the table on Google Slides, while the table width and height can be managed. But, fortunately, when Google Slides API is used, this can be achieved. In this post, I would like to introduce a sample script for managing the row height and the column width of a table on Google Slides using Google Apps Script.

Workaround: Starting Animation GIF on Google Slide by Clicking

Gists Introduction This is a simple workaround for starting an animation GIF on Google Slide by clicking. When an animation GIF is inserted into a slide of Google Slides, the animation is automatically started. By this, the timing for starting cannot be controlled by the user side. In this post, I would like to introduce a workaround for resolving this issue. Preparation The sample flow is as follows. Prepare a sample animation GIF.

Updated: GAS Library - DocsServiceApp

Overview This is a Google Apps Script library for supporting Document service, Docs API, Spreadsheet service, Sheets API, Slides service and Slides API. The aim of this library is to compensate the processes that they services cannot achieve. DocsServiceApp was updated to v1.2.0 v1.2.0 (September 29, 2022) Added a new method of getNamedFunctions(). This method can retrieve the named functions from Google Spreadsheet. You can see the detail information here https://github.

Updated: GAS Library - DocsServiceApp

Overview This is a Google Apps Script library for supporting Document service, Docs API, Spreadsheet service, Sheets API, Slides service and Slides API. The aim of this library is to compensate the processes that they services cannot achieve. DocsServiceApp was updated to v1.1.0 v1.1.0 (September 28, 2022) Added a new method of getQuotePrefixCells(). This method can detect the cells with the quote prefix cells. You can see the detail information here https://github.

Inverting Selected Objects on Google Slides using Google Apps Script

Gists This is a sample script for inverting the selected objects on Google Slides using Google Apps Script. I have the case that I want to invert the selected objects on Google Slides. This sample script can be achieved this goal using Google Apps Script. Sample script Please copy and paste the following script to the script editor of Google Slides, and save the script. And, please select the objects on the Slide and run the function main().

Exporting All Thumbnail Images Retrieved from Google Slides as Zip File using Google Apps Script

Gists This is a sample script for exporting all thumbnail images retrieved from Google Slides as a zip file using Google Apps Script. Sample script Before you use this script, please enable Slides API at Advanced Google services. Ref function myFunction() { const presentationId = "###"; // Please set Google Slides ID. const folderId = "###"; // Please set the folder ID. const outputFilename = "###"; // Please set the output filename.

Reducing Table Height of Table Inserted from Google Spreadsheet to Google Slides using Google Apps Script

Gists This is a sample script for reducing the table height of the table inserted from Google Spreadsheet to Google Slides using Google Apps Script. Sample script Please copy and paste the following script to the script editor of Google Slides. This sample script uses Slides API. So, please enable Slides API at Advanced Google services. Ref As the sample situation, this script supposes that a table is manually copied from Google Spreadsheet to the 1st slide of Google Slides.

Simply Editing Texts of Texts Boxes on Google Slides using Google Apps Script

Gists This is a sample script for simply editing the texts of texts boxes on Google Slides using Google Apps Script. The supposed situation is as follows. Google Slides has several text boxes of the same size and the same position. You want to retrieve the list of texts from the text boxes and want to change the texts using a simpler method. In this case, I thought that when the sidebar created by Google Apps Script is used for changing the texts, your goal might be able to be simply achieved.

Simple Photo Gallery Created by Google Slides and Web Apps using Google Apps Script

Overview This is a sample script for achieving a simple photo gallery created by Google Slides and Web Apps using Google Apps Script. Description At Google, there is a great Google Photos. Ref Recently, I was required to have a simple photo gallery. At that time, I thought that when an independence photo gallery instead of Google Photos can be used, it will be useful. Also, this might be useful for other users.

Creating Custom Grid View of Google Slides as Image and Spreadsheet using Google Apps Script

Gists This is a sample script for creating the custom grid view of Google Slides as an image using Google Apps Script. Demo Usage In order to use this script, please do the following flow. 1. Install GAS library This sample script uses a library of DocsServiceApp. So please install DocsServiceApp. You can see the method for installing it at here. 2. Enable APIs This sample script uses 2 APIs of Drive API and Slides API.

GAS Library - DocsServiceApp

Overview This is a Google Apps Script library for supporting Document service, Docs API, Spreadsheet service, Sheets API, Slides service and Slides API. The aim of this library is to compensate the processes that they services cannot achieve. Description The Google services, which are Document service, Docs API, Spreadsheet service, Sheets API, Slides service and Slides API, are growing now. But, unfortunately, there are still the processes that they cannot done.

Decoding QR code on Google Slides using Google Apps Script

Gists This is a sample script for decoding a QR code put in Google Slides using Google Apps Script. In this case, Javascript is used at the opened dialog. And Canvas API and jsQR are used. So unfortunately, this method cannot be used with the time-driven trigger and the Google Apps Script project of the standalone type. Of course, this method can be also used for Google Document and Google Spreadsheet.

Cropping Images in Google Slides using Google Apps Script

Gists This is a sample script for cropping images in the Google Slides using Google Apps Script. In the current stage, in order to crop the images in Google Slides, it is required to use replace(blobSource, crop) Because, although there is the “cropProperties” of “UpdateImagePropertiesRequest” in Slides API, unfortunately, in the current stage, this cannot be still used. This has already been reported. Ref About cropping using replace(blobSource, crop), I thought that how to use might be a bit difficult.

Managing Texts on Google Slides using Google Apps Script

Gists This is a sample script for managing the texts on Google Slides using Google Apps Script. Recently, I got the request like this. I published this here, because I thought that this might be also useful for other users. Demo In this demonstration, the text of {{baz}} on Google Slides are searched and replaced to other text, and also, the text style is changed. Sample situation In this case, it supposes that there are 3 types of shapes in the slide.

Figma to Google Slides using Google Apps Script

Gists In this sample script, all pages in the Figma file are retrieved and the retrieved pages are put to new Google Slides as the image. Usage 1. Retrieve access token You can see the method for retrieving the access token at here. Although there is also OAuth2 for retrieving the access token, in your situation, I thought that the method for directly generating the access token on the site might be suitable.

Limitations for Inserting Images to Google Docs

Gists When an image is inserted to Google Docs (Spreadsheet, Document and Slides) using the method of insertImage using Google Apps Script, there is the case that the error occurs. The error messages are “server error” and “invalid image data”. Here, I would like to introduce the limitations for inserting images to Google Docs. As the result, it was found that the limitation is due to both the mimeTypes and the area of image rather than the file size.

Summarizing Slides as Thumbnails

Gists This is a sample script for summarizing Slides as thumbnails. For example, it supposes a Slides including 15 pages. When this script is run, it summarizes 6 pages to one page as images. I created this because there are no methods for directly achieving this. This is useful for myself. If this is also useful for you, I’m glad. The flow of this workaround is as follows. Flow: Copy the original Slides file as a temporary file.

GAS Library - ArrangeStackingOrder

Overview ArrangeStackingOrder is a GAS library for arranging the stacking order of page elements on Google Slides using Google Apps Script (GAS). Demo This is a demonstration of this library when this is used as a Google Slides Addon. Description Do you have situations that you want to arrange the stacking order of page elements on Google Slides using GAS? I had it before. At that time, I could achieve it by creating a simple script.

Add-on - ShapeApp

ShapeApp for Google Slides was published as an add-on application When you use Google Slides, have you ever thought about creating and updating shapes on Slides by inputting parameters, and arranging selected shapes? I have thought about them. Recently, since Class SlidesApp was added to GAS, it came to be able to easily to create various applications for Slides. So I created this. This application is add-on application which was made of GAS.

Difference Between Given Values and Retrieved Values for Shapes on Google Slides

Gists This is a document for explaining the difference between given values and retrieved values for shapes on Google Slides. When a shape is created to a slide using Slides API, most users give the size of height and width as pt. When the size is retrieved from the created shape as pt, the size is often difference from the given size. For example, when a square shape is created by giving the height and width of 100 pt, the size which is retrieved from the created square becomes 99.

Retrieving Size of Tables in Google Slides using Google Apps Script

Gists This sample script is for retrieving the size (width and height) of a table in Google Slides using Google Apps Script. There are no methods for directly retrieving the table size using SlidesApp yet. So I thought of a workaround using Slides API. When the slide information is retrieved using Slides.Presentations.Pages.get() of Slides API, the information of tables is also included. In the information, the height and width of table are also included.

SlideApp for Google Slides

Gists By recent Google updated, Class SlideApp is added to Google Slides. SlideApp will be bring a lot of applications. Here, I would like to introduce 2 samples. 1. Sidebar function showSidebar() { var html = HtmlService .createHtmlOutput('Hello, world! <input type="button" value="Close" onclick="google.script.host.close()" />') .setTitle('My custom sidebar') .setWidth(300); SlidesApp.getUi().showSidebar(html); } 2. Copy slides in existing Slide to a new Slide This sample script create a new Slide with slides you want to copy.