Batch Update

Applies one or more updates to the presentation

271 variables
28 variables

Applies one or more updates to the presentation.

Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied.

Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests.

For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies: the reply to the third request, and another empty reply, in that order.

Because other users may be editing the presentation, the presentation might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the presentation should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically

Authorization

To use this building block you will have to grant access to at least one of the following scopes:

  • See, edit, create, and delete all of your Google Drive files
  • View and manage Google Drive files and folders that you have opened or created with this app
  • See and download all your Google Drive files
  • View and manage your Google Slides presentations
  • See, edit, create, and delete your spreadsheets in Google Drive
  • View your Google Spreadsheets

Input

This building block consumes 271 input parameters

  = Parameter name
  = Format

presentationId STRING Required

The presentation to apply the updates to

requests[] OBJECT

A single kind of update to apply to a presentation

requests[].insertTableColumns OBJECT

Inserts columns into a table.

Other columns in the table will be resized to fit the new column

requests[].insertTableColumns.number INTEGER

The number of columns to be inserted. Maximum 20 per request

requests[].insertTableColumns.cellLocation OBJECT

A location of a single table cell within a table

requests[].insertTableColumns.cellLocation.rowIndex INTEGER

The 0-based row index

requests[].insertTableColumns.cellLocation.columnIndex INTEGER

The 0-based column index

requests[].insertTableColumns.insertRight BOOLEAN

Whether to insert new columns to the right of the reference cell location.

  • True: insert to the right.
  • False: insert to the left.

requests[].insertTableColumns.tableObjectId STRING

The table to insert columns into

requests[].mergeTableCells OBJECT

Merges cells in a Table

requests[].mergeTableCells.objectId STRING

The object ID of the table

requests[].mergeTableCells.tableRange OBJECT

A table range represents a reference to a subset of a table.

It's important to note that the cells specified by a table range do not necessarily form a rectangle. For example, let's say we have a 3 x 3 table where all the cells of the last row are merged together. The table looks like this:

 [             ]

A table range with location = (0, 0), row span = 3 and column span = 2 specifies the following cells:

  x     x 
 [ x    x    x ]

requests[].mergeTableCells.tableRange.rowSpan INTEGER

The row span of the table range

requests[].mergeTableCells.tableRange.columnSpan INTEGER

The column span of the table range

requests[].refreshSheetsChart OBJECT

Refreshes an embedded Google Sheets chart by replacing it with the latest version of the chart from Google Sheets.

NOTE: Refreshing charts requires at least one of the spreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes

requests[].refreshSheetsChart.objectId STRING

The object ID of the chart to refresh

requests[].createTable OBJECT

Creates a new table

requests[].createTable.rows INTEGER

Number of rows in the table

requests[].createTable.objectId STRING

A user-supplied object ID.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_]); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:]). The length of the ID must not be less than 5 or greater than 50.

If you don't specify an ID, a unique one is generated

requests[].createTable.columns INTEGER

Number of columns in the table

requests[].createTable.elementProperties OBJECT

Common properties for a page element.

Note: When you initially create a PageElement, the API may modify the values of both size and transform, but the visual size will be unchanged

requests[].createTable.elementProperties.pageObjectId STRING

The object ID of the page where the element is located

requests[].updateTableCellProperties OBJECT

Update the properties of a TableCell

requests[].updateTableCellProperties.tableCellProperties OBJECT

The properties of the TableCell

requests[].updateTableCellProperties.tableCellProperties.contentAlignment ENUMERATION

The alignment of the content in the table cell. The default alignment matches the alignment for newly created table cells in the Slides editor

requests[].updateTableCellProperties.fields ANY

The fields that should be updated.

At least one field must be specified. The root tableCellProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the table cell background solid fill color, set fields to "tableCellBackgroundFill.solidFill.color".

To reset a property to its default value, include its field name in the field mask but leave the field itself unset

requests[].updateTableCellProperties.objectId STRING

The object ID of the table

requests[].updateTableCellProperties.tableRange OBJECT

A table range represents a reference to a subset of a table.

It's important to note that the cells specified by a table range do not necessarily form a rectangle. For example, let's say we have a 3 x 3 table where all the cells of the last row are merged together. The table looks like this:

 [             ]

A table range with location = (0, 0), row span = 3 and column span = 2 specifies the following cells:

  x     x 
 [ x    x    x ]

requests[].updateTableCellProperties.tableRange.rowSpan INTEGER

The row span of the table range

requests[].updateTableCellProperties.tableRange.columnSpan INTEGER

The column span of the table range

requests[].deleteObject OBJECT

Deletes an object, either pages or page elements, from the presentation

requests[].deleteObject.objectId STRING

The object ID of the page or page element to delete.

If after a delete operation a group contains only 1 or no page elements, the group is also deleted.

If a placeholder is deleted on a layout, any empty inheriting shapes are also deleted

requests[].updateParagraphStyle OBJECT

Updates the styling for all of the paragraphs within a Shape or Table that overlap with the given text index range

requests[].updateParagraphStyle.fields ANY

The fields that should be updated.

At least one field must be specified. The root style is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example, to update the paragraph alignment, set fields to "alignment".

To reset a property to its default value, include its field name in the field mask but leave the field itself unset

requests[].updateParagraphStyle.objectId STRING

The object ID of the shape or table with the text to be styled

requests[].updateParagraphStyle.textRange OBJECT

Specifies a contiguous range of an indexed collection, such as characters in text

requests[].updateParagraphStyle.textRange.type ENUMERATION

The type of range

requests[].updateParagraphStyle.textRange.startIndex INTEGER

The optional zero-based index of the beginning of the collection. Required for FIXED_RANGE and FROM_START_INDEX ranges

requests[].updateParagraphStyle.textRange.endIndex INTEGER

The optional zero-based index of the end of the collection. Required for FIXED_RANGE ranges

requests[].updateParagraphStyle.cellLocation OBJECT

A location of a single table cell within a table

requests[].updateParagraphStyle.cellLocation.rowIndex INTEGER

The 0-based row index

requests[].updateParagraphStyle.cellLocation.columnIndex INTEGER

The 0-based column index

requests[].updateParagraphStyle.style OBJECT

Styles that apply to a whole paragraph.

If this text is contained in a shape with a parent placeholder, then these paragraph styles may be inherited from the parent. Which paragraph styles are inherited depend on the nesting level of lists:

  • A paragraph not in a list will inherit its paragraph style from the paragraph at the 0 nesting level of the list inside the parent placeholder.
  • A paragraph in a list will inherit its paragraph style from the paragraph at its corresponding nesting level of the list inside the parent placeholder.

Inherited paragraph styles are represented as unset fields in this message

requests[].updateParagraphStyle.style.alignment ENUMERATION

The text alignment for this paragraph

requests[].updateParagraphStyle.style.lineSpacing FLOAT

The amount of space between lines, as a percentage of normal, where normal is represented as 100.0. If unset, the value is inherited from the parent

requests[].updateParagraphStyle.style.direction ENUMERATION

The text direction of this paragraph. If unset, the value defaults to LEFT_TO_RIGHT since text direction is not inherited

requests[].updateParagraphStyle.style.spacingMode ENUMERATION

The spacing mode for the paragraph

requests[].duplicateObject OBJECT

Duplicates a slide or page element.

When duplicating a slide, the duplicate slide will be created immediately following the specified slide. When duplicating a page element, the duplicate will be placed on the same page at the same position as the original

requests[].duplicateObject.objectIds OBJECT

The object being duplicated may contain other objects, for example when duplicating a slide or a group page element. This map defines how the IDs of duplicated objects are generated: the keys are the IDs of the original objects and its values are the IDs that will be assigned to the corresponding duplicate object. The ID of the source object's duplicate may be specified in this map as well, using the same value of the object_id field as a key and the newly desired ID as the value.

All keys must correspond to existing IDs in the presentation. All values must be unique in the presentation and must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_]); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:]). The length of the new ID must not be less than 5 or greater than 50.

If any IDs of source objects are omitted from the map, a new random ID will be assigned. If the map is empty or unset, all duplicate objects will receive a new random ID

requests[].duplicateObject.objectIds.customKey.value STRING Required

The object being duplicated may contain other objects, for example when duplicating a slide or a group page element. This map defines how the IDs of duplicated objects are generated: the keys are the IDs of the original objects and its values are the IDs that will be assigned to the corresponding duplicate object. The ID of the source object's duplicate may be specified in this map as well, using the same value of the object_id field as a key and the newly desired ID as the value.

All keys must correspond to existing IDs in the presentation. All values must be unique in the presentation and must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_]); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:]). The length of the new ID must not be less than 5 or greater than 50.

If any IDs of source objects are omitted from the map, a new random ID will be assigned. If the map is empty or unset, all duplicate objects will receive a new random ID

requests[].duplicateObject.objectId STRING

The ID of the object to duplicate

requests[].deleteTableColumn OBJECT

Deletes a column from a table

requests[].deleteTableColumn.cellLocation OBJECT

A location of a single table cell within a table

requests[].deleteTableColumn.cellLocation.rowIndex INTEGER

The 0-based row index

requests[].deleteTableColumn.cellLocation.columnIndex INTEGER

The 0-based column index

requests[].deleteTableColumn.tableObjectId STRING

The table to delete columns from

requests[].createLine OBJECT

Creates a line

requests[].createLine.objectId STRING

A user-supplied object ID.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_]); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:]). The length of the ID must not be less than 5 or greater than 50.

If you don't specify an ID, a unique one is generated

requests[].createLine.elementProperties OBJECT

Common properties for a page element.

Note: When you initially create a PageElement, the API may modify the values of both size and transform, but the visual size will be unchanged

requests[].createLine.elementProperties.pageObjectId STRING

The object ID of the page where the element is located

requests[].createLine.lineCategory ENUMERATION

The category of the line to be created.

Deprecated: use category instead.

The exact line type created is determined based on the category and how it's routed to connect to other page elements.

If you specify both a category and a line_category, the category takes precedence

requests[].createLine.category ENUMERATION

The category of the line to be created.

The exact line type created is determined based on the category and how it's routed to connect to other page elements.

If you specify both a category and a line_category, the category takes precedence.

If you do not specify a value for category, but specify a value for line_category, then the specified line_category value is used.

If you do not specify either, then STRAIGHT is used

requests[].updateVideoProperties OBJECT

Update the properties of a Video

requests[].updateVideoProperties.fields ANY

The fields that should be updated.

At least one field must be specified. The root videoProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the video outline color, set fields to "outline.outlineFill.solidFill.color".

To reset a property to its default value, include its field name in the field mask but leave the field itself unset

requests[].updateVideoProperties.objectId STRING

The object ID of the video the updates are applied to

requests[].updateVideoProperties.videoProperties OBJECT

The properties of the Video

requests[].updateVideoProperties.videoProperties.autoPlay BOOLEAN

Whether to enable video autoplay when the page is displayed in present mode. Defaults to false

requests[].updateVideoProperties.videoProperties.end INTEGER

The time at which to end playback, measured in seconds from the beginning of the video. If set, the end time should be after the start time. If not set or if you set this to a value that exceeds the video's length, the video will be played until its end

requests[].updateVideoProperties.videoProperties.mute BOOLEAN

Whether to mute the audio during video playback. Defaults to false

requests[].updateVideoProperties.videoProperties.start INTEGER

The time at which to start playback, measured in seconds from the beginning of the video. If set, the start time should be before the end time. If you set this to a value that exceeds the video's length in seconds, the video will be played from the last second. If not set, the video will be played from the beginning

requests[].createImage OBJECT

Creates an image

requests[].createImage.elementProperties OBJECT

Common properties for a page element.

Note: When you initially create a PageElement, the API may modify the values of both size and transform, but the visual size will be unchanged

requests[].createImage.elementProperties.pageObjectId STRING

The object ID of the page where the element is located

requests[].createImage.url STRING

The image URL.

The image is fetched once at insertion time and a copy is stored for display inside the presentation. Images must be less than 50MB in size, cannot exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF format.

The provided URL can be at most 2 kB in length. The URL itself is saved with the image, and exposed via the Image.source_url field

requests[].createImage.objectId STRING

A user-supplied object ID.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_]); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:]). The length of the ID must not be less than 5 or greater than 50.

If you don't specify an ID, a unique one is generated

requests[].createParagraphBullets OBJECT

Creates bullets for all of the paragraphs that overlap with the given text index range.

The nesting level of each paragraph will be determined by counting leading tabs in front of each paragraph. To avoid excess space between the bullet and the corresponding paragraph, these leading tabs are removed by this request. This may change the indices of parts of the text.

If the paragraph immediately before paragraphs being updated is in a list with a matching preset, the paragraphs being updated are added to that preceding list

requests[].createParagraphBullets.objectId STRING

The object ID of the shape or table containing the text to add bullets to

requests[].createParagraphBullets.textRange OBJECT

Specifies a contiguous range of an indexed collection, such as characters in text

requests[].createParagraphBullets.textRange.type ENUMERATION

The type of range

requests[].createParagraphBullets.textRange.startIndex INTEGER

The optional zero-based index of the beginning of the collection. Required for FIXED_RANGE and FROM_START_INDEX ranges

requests[].createParagraphBullets.textRange.endIndex INTEGER

The optional zero-based index of the end of the collection. Required for FIXED_RANGE ranges

requests[].createParagraphBullets.bulletPreset ENUMERATION

The kinds of bullet glyphs to be used. Defaults to the BULLET_DISC_CIRCLE_SQUARE preset

requests[].createParagraphBullets.cellLocation OBJECT

A location of a single table cell within a table

requests[].createParagraphBullets.cellLocation.rowIndex INTEGER

The 0-based row index

requests[].createParagraphBullets.cellLocation.columnIndex INTEGER

The 0-based column index

requests[].createVideo OBJECT

Creates a video.

NOTE: Creating a video from Google Drive requires that the requesting app have at least one of the drive, drive.readonly, or drive.file OAuth scopes

requests[].createVideo.id STRING

The video source's unique identifier for this video.

e.g. For YouTube video https://www.youtube.com/watch?v=7U3axjORYZ0, the ID is 7U3axjORYZ0. For a Google Drive video https://drive.google.com/file/d/1xCgQLFTJi5_Xl8DgW_lcUYq5e-q6Hi5Q the ID is 1xCgQLFTJi5_Xl8DgW_lcUYq5e-q6Hi5Q

requests[].createVideo.objectId STRING

A user-supplied object ID.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_]); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:]). The length of the ID must not be less than 5 or greater than 50.

If you don't specify an ID, a unique one is generated

requests[].createVideo.source ENUMERATION

The video source

requests[].createVideo.elementProperties OBJECT

Common properties for a page element.

Note: When you initially create a PageElement, the API may modify the values of both size and transform, but the visual size will be unchanged

requests[].createVideo.elementProperties.pageObjectId STRING

The object ID of the page where the element is located

requests[].createSheetsChart OBJECT

Creates an embedded Google Sheets chart.

NOTE: Chart creation requires at least one of the spreadsheets.readonly, spreadsheets, drive.readonly, drive.file, or drive OAuth scopes

requests[].createSheetsChart.objectId STRING

A user-supplied object ID.

If specified, the ID must be unique among all pages and page elements in the presentation. The ID should start with a word character [a-zA-Z0-9_] and then followed by any number of the following characters [a-zA-Z0-9_-:]. The length of the ID should not be less than 5 or greater than 50. If empty, a unique identifier will be generated

requests[].createSheetsChart.elementProperties OBJECT

Common properties for a page element.

Note: When you initially create a PageElement, the API may modify the values of both size and transform, but the visual size will be unchanged

requests[].createSheetsChart.elementProperties.pageObjectId STRING

The object ID of the page where the element is located

requests[].createSheetsChart.spreadsheetId STRING

The ID of the Google Sheets spreadsheet that contains the chart

requests[].createSheetsChart.linkingMode ENUMERATION

The mode with which the chart is linked to the source spreadsheet. When not specified, the chart will be an image that is not linked

requests[].createSheetsChart.chartId INTEGER

The ID of the specific chart in the Google Sheets spreadsheet

requests[].replaceAllShapesWithSheetsChart OBJECT

Replaces all shapes that match the given criteria with the provided Google Sheets chart. The chart will be scaled and centered to fit within the bounds of the original shape.

NOTE: Replacing shapes with a chart requires at least one of the spreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes

requests[].replaceAllShapesWithSheetsChart.spreadsheetId STRING

The ID of the Google Sheets spreadsheet that contains the chart

requests[].replaceAllShapesWithSheetsChart.linkingMode ENUMERATION

The mode with which the chart is linked to the source spreadsheet. When not specified, the chart will be an image that is not linked

requests[].replaceAllShapesWithSheetsChart.containsText OBJECT

A criteria that matches a specific string of text in a shape or table

requests[].replaceAllShapesWithSheetsChart.containsText.text STRING

The text to search for in the shape or table

requests[].replaceAllShapesWithSheetsChart.containsText.matchCase BOOLEAN

Indicates whether the search should respect case:

  • True: the search is case sensitive.
  • False: the search is case insensitive.

requests[].replaceAllShapesWithSheetsChart.chartId INTEGER

The ID of the specific chart in the Google Sheets spreadsheet

requests[].replaceAllShapesWithSheetsChart.pageObjectIds[] STRING

requests[].unmergeTableCells OBJECT

Unmerges cells in a Table

requests[].unmergeTableCells.objectId STRING

The object ID of the table

requests[].unmergeTableCells.tableRange OBJECT

A table range represents a reference to a subset of a table.

It's important to note that the cells specified by a table range do not necessarily form a rectangle. For example, let's say we have a 3 x 3 table where all the cells of the last row are merged together. The table looks like this:

 [             ]

A table range with location = (0, 0), row span = 3 and column span = 2 specifies the following cells:

  x     x 
 [ x    x    x ]

requests[].unmergeTableCells.tableRange.rowSpan INTEGER

The row span of the table range

requests[].unmergeTableCells.tableRange.columnSpan INTEGER

The column span of the table range

requests[].updatePageElementTransform OBJECT

Updates the transform of a page element.

Updating the transform of a group will change the absolute transform of the page elements in that group, which can change their visual appearance. See the documentation for PageElement.transform for more details

requests[].updatePageElementTransform.objectId STRING

The object ID of the page element to update

requests[].updatePageElementTransform.transform OBJECT

AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] to transform source coordinates (x,y) into destination coordinates (x', y') according to:

  x'  x  =   shear_y  scale_y  translate_y  
  1  [ 1 ]

After transformation,

 x' = scale_x * x + shear_x * y + translate_x;
 y' = scale_y * y + shear_y * x + translate_y;

This message is therefore composed of these six matrix elements

requests[].updatePageElementTransform.transform.shearX NUMBER

The X coordinate shearing element

requests[].updatePageElementTransform.transform.scaleY NUMBER

The Y coordinate scaling element

requests[].updatePageElementTransform.transform.translateY NUMBER

The Y coordinate translation element

requests[].updatePageElementTransform.transform.translateX NUMBER

The X coordinate translation element

requests[].updatePageElementTransform.transform.shearY NUMBER

The Y coordinate shearing element

requests[].updatePageElementTransform.transform.unit ENUMERATION

The units for translate elements

requests[].updatePageElementTransform.transform.scaleX NUMBER

The X coordinate scaling element

requests[].updatePageElementTransform.applyMode ENUMERATION

The apply mode of the transform update

requests[].updateTextStyle OBJECT

Update the styling of text in a Shape or Table

requests[].updateTextStyle.cellLocation OBJECT

A location of a single table cell within a table

requests[].updateTextStyle.cellLocation.rowIndex INTEGER

The 0-based row index

requests[].updateTextStyle.cellLocation.columnIndex INTEGER

The 0-based column index

requests[].updateTextStyle.style OBJECT

Represents the styling that can be applied to a TextRun.

If this text is contained in a shape with a parent placeholder, then these text styles may be inherited from the parent. Which text styles are inherited depend on the nesting level of lists:

  • A text run in a paragraph that is not in a list will inherit its text style from the the newline character in the paragraph at the 0 nesting level of the list inside the parent placeholder.
  • A text run in a paragraph that is in a list will inherit its text style from the newline character in the paragraph at its corresponding nesting level of the list inside the parent placeholder.

Inherited text styles are represented as unset fields in this message. If text is contained in a shape without a parent placeholder, unsetting these fields will revert the style to a value matching the defaults in the Slides editor

requests[].updateTextStyle.style.fontFamily STRING

The font family of the text.

The font family can be any font from the Font menu in Slides or from [Google Fonts] (https://fonts.google.com/). If the font name is unrecognized, the text is rendered in Arial.

Some fonts can affect the weight of the text. If an update request specifies values for both font_family and bold, the explicitly-set bold value is used

requests[].updateTextStyle.style.italic BOOLEAN

Whether or not the text is italicized

requests[].updateTextStyle.style.strikethrough BOOLEAN

Whether or not the text is struck through

requests[].updateTextStyle.style.baselineOffset ENUMERATION

The text's vertical offset from its normal position.

Text with SUPERSCRIPT or SUBSCRIPT baseline offsets is automatically rendered in a smaller font size, computed based on the font_size field. The font_size itself is not affected by changes in this field

requests[].updateTextStyle.style.smallCaps BOOLEAN

Whether or not the text is in small capital letters

requests[].updateTextStyle.style.underline BOOLEAN

Whether or not the text is underlined

requests[].updateTextStyle.style.bold BOOLEAN

Whether or not the text is rendered as bold

requests[].updateTextStyle.fields ANY

The fields that should be updated.

At least one field must be specified. The root style is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example, to update the text style to bold, set fields to "bold".

To reset a property to its default value, include its field name in the field mask but leave the field itself unset

requests[].updateTextStyle.objectId STRING

The object ID of the shape or table with the text to be styled

requests[].updateTextStyle.textRange OBJECT

Specifies a contiguous range of an indexed collection, such as characters in text

requests[].updateTextStyle.textRange.type ENUMERATION

The type of range

requests[].updateTextStyle.textRange.startIndex INTEGER

The optional zero-based index of the beginning of the collection. Required for FIXED_RANGE and FROM_START_INDEX ranges

requests[].updateTextStyle.textRange.endIndex INTEGER

The optional zero-based index of the end of the collection. Required for FIXED_RANGE ranges

requests[].updateTableRowProperties OBJECT

Updates the properties of a Table row

requests[].updateTableRowProperties.rowIndices[] INTEGER

requests[].updateTableRowProperties.fields ANY

The fields that should be updated.

At least one field must be specified. The root tableRowProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the minimum row height, set fields to "min_row_height".

If '"min_row_height"' is included in the field mask but the property is left unset, the minimum row height will default to 0

requests[].updateTableRowProperties.tableRowProperties OBJECT

Properties of each row in a table

requests[].updateTableRowProperties.objectId STRING

The object ID of the table

requests[].replaceAllShapesWithImage OBJECT

Replaces all shapes that match the given criteria with the provided image.

The images replacing the shapes are rectangular after being inserted into the presentation and do not take on the forms of the shapes

requests[].replaceAllShapesWithImage.imageUrl STRING

The image URL.

The image is fetched once at insertion time and a copy is stored for display inside the presentation. Images must be less than 50MB in size, cannot exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF format.

The provided URL can be at most 2 kB in length. The URL itself is saved with the image, and exposed via the Image.source_url field

requests[].replaceAllShapesWithImage.replaceMethod ENUMERATION

The replace method.

Deprecated: use image_replace_method instead.

If you specify both a replace_method and an image_replace_method, the image_replace_method takes precedence

requests[].replaceAllShapesWithImage.containsText OBJECT

A criteria that matches a specific string of text in a shape or table

requests[].replaceAllShapesWithImage.containsText.text STRING

The text to search for in the shape or table

requests[].replaceAllShapesWithImage.containsText.matchCase BOOLEAN

Indicates whether the search should respect case:

  • True: the search is case sensitive.
  • False: the search is case insensitive.

requests[].replaceAllShapesWithImage.pageObjectIds[] STRING

requests[].replaceAllShapesWithImage.imageReplaceMethod ENUMERATION

The image replace method.

If you specify both a replace_method and an image_replace_method, the image_replace_method takes precedence.

If you do not specify a value for image_replace_method, but specify a value for replace_method, then the specified replace_method value is used.

If you do not specify either, then CENTER_INSIDE is used

requests[].replaceAllText OBJECT

Replaces all instances of text matching a criteria with replace text

requests[].replaceAllText.replaceText STRING

The text that will replace the matched text

requests[].replaceAllText.pageObjectIds[] STRING

requests[].replaceAllText.containsText OBJECT

A criteria that matches a specific string of text in a shape or table

requests[].replaceAllText.containsText.text STRING

The text to search for in the shape or table

requests[].replaceAllText.containsText.matchCase BOOLEAN

Indicates whether the search should respect case:

  • True: the search is case sensitive.
  • False: the search is case insensitive.

requests[].updateImageProperties OBJECT

Update the properties of an Image

requests[].updateImageProperties.imageProperties OBJECT

The properties of the Image

requests[].updateImageProperties.imageProperties.brightness FLOAT

The brightness effect of the image. The value should be in the interval [-1.0, 1.0], where 0 means no effect. This property is read-only

requests[].updateImageProperties.imageProperties.transparency FLOAT

The transparency effect of the image. The value should be in the interval [0.0, 1.0], where 0 means no effect and 1 means completely transparent. This property is read-only

requests[].updateImageProperties.imageProperties.contrast FLOAT

The contrast effect of the image. The value should be in the interval [-1.0, 1.0], where 0 means no effect. This property is read-only

requests[].updateImageProperties.objectId STRING

The object ID of the image the updates are applied to

requests[].updateImageProperties.fields ANY

The fields that should be updated.

At least one field must be specified. The root imageProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the image outline color, set fields to "outline.outlineFill.solidFill.color".

To reset a property to its default value, include its field name in the field mask but leave the field itself unset

requests[].insertTableRows OBJECT

Inserts rows into a table

requests[].insertTableRows.number INTEGER

The number of rows to be inserted. Maximum 20 per request

requests[].insertTableRows.cellLocation OBJECT

A location of a single table cell within a table

requests[].insertTableRows.cellLocation.rowIndex INTEGER

The 0-based row index

requests[].insertTableRows.cellLocation.columnIndex INTEGER

The 0-based column index

requests[].insertTableRows.tableObjectId STRING

The table to insert rows into

requests[].insertTableRows.insertBelow BOOLEAN

Whether to insert new rows below the reference cell location.

  • True: insert below the cell.
  • False: insert above the cell.

requests[].createSlide OBJECT

Creates a new slide

requests[].createSlide.objectId STRING

A user-supplied object ID.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_]); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:]). The length of the ID must not be less than 5 or greater than 50.

If you don't specify an ID, a unique one is generated

requests[].createSlide.insertionIndex INTEGER

The optional zero-based index indicating where to insert the slides.

If you don't specify an index, the new slide is created at the end

requests[].createSlide.placeholderIdMappings[] OBJECT

The user-specified ID mapping for a placeholder that will be created on a slide from a specified layout

requests[].createSlide.slideLayoutReference OBJECT

Slide layout reference. This may reference either:

  • A predefined layout
  • One of the layouts in the presentation.

requests[].createSlide.slideLayoutReference.predefinedLayout ENUMERATION

Predefined layout

requests[].createSlide.slideLayoutReference.layoutId STRING

Layout ID: the object ID of one of the layouts in the presentation

requests[].updateLineProperties OBJECT

Updates the properties of a Line

requests[].updateLineProperties.objectId STRING

The object ID of the line the update is applied to

requests[].updateLineProperties.lineProperties OBJECT

The properties of the Line.

When unset, these fields default to values that match the appearance of new lines created in the Slides editor

requests[].updateLineProperties.lineProperties.dashStyle ENUMERATION

The dash style of the line

requests[].updateLineProperties.lineProperties.startArrow ENUMERATION

The style of the arrow at the beginning of the line

requests[].updateLineProperties.lineProperties.endArrow ENUMERATION

The style of the arrow at the end of the line

requests[].updateLineProperties.fields ANY

The fields that should be updated.

At least one field must be specified. The root lineProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the line solid fill color, set fields to "lineFill.solidFill.color".

To reset a property to its default value, include its field name in the field mask but leave the field itself unset

requests[].replaceImage OBJECT

Replaces an existing image with a new image.

Replacing an image removes some image effects from the existing image

requests[].replaceImage.imageReplaceMethod ENUMERATION

The replacement method

requests[].replaceImage.imageObjectId STRING

The ID of the existing image that will be replaced

requests[].replaceImage.url STRING

The URL of the new image.

The image is fetched once at insertion time and a copy is stored for display inside the presentation. Images must be less than 50MB in size, cannot exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF format.

The provided URL can be at most 2 kB in length. The URL itself is saved with the image, and exposed via the Image.source_url field

requests[].updateSlidesPosition OBJECT

Updates the position of slides in the presentation

requests[].updateSlidesPosition.slideObjectIds[] STRING

requests[].updateSlidesPosition.insertionIndex INTEGER

The index where the slides should be inserted, based on the slide arrangement before the move takes place. Must be between zero and the number of slides in the presentation, inclusive

requests[].deleteTableRow OBJECT

Deletes a row from a table

requests[].deleteTableRow.tableObjectId STRING

The table to delete rows from

requests[].deleteTableRow.cellLocation OBJECT

A location of a single table cell within a table

requests[].deleteTableRow.cellLocation.rowIndex INTEGER

The 0-based row index

requests[].deleteTableRow.cellLocation.columnIndex INTEGER

The 0-based column index

requests[].updatePageElementsZOrder OBJECT

Updates the Z-order of page elements. Z-order is an ordering of the elements on the page from back to front. The page element in the front may cover the elements that are behind it

requests[].updatePageElementsZOrder.operation ENUMERATION

The Z-order operation to apply on the page elements.

When applying the operation on multiple page elements, the relative Z-orders within these page elements before the operation is maintained

requests[].updatePageElementsZOrder.pageElementObjectIds[] STRING

requests[].rerouteLine OBJECT

Reroutes a line such that it's connected at the two closest connection sites on the connected page elements

requests[].rerouteLine.objectId STRING

The object ID of the line to reroute.

Only a line with a category indicating it is a "connector" can be rerouted. The start and end connections of the line must be on different page elements

requests[].updateShapeProperties OBJECT

Update the properties of a Shape

requests[].updateShapeProperties.fields ANY

The fields that should be updated.

At least one field must be specified. The root shapeProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the shape background solid fill color, set fields to "shapeBackgroundFill.solidFill.color".

To reset a property to its default value, include its field name in the field mask but leave the field itself unset

requests[].updateShapeProperties.objectId STRING

The object ID of the shape the updates are applied to

requests[].updateShapeProperties.shapeProperties OBJECT

The properties of a Shape.

If the shape is a placeholder shape as determined by the placeholder field, then these properties may be inherited from a parent placeholder shape. Determining the rendered value of the property depends on the corresponding property_state field value

requests[].updateShapeProperties.shapeProperties.contentAlignment ENUMERATION

The alignment of the content in the shape. If unspecified, the alignment is inherited from a parent placeholder if it exists. If the shape has no parent, the default alignment matches the alignment for new shapes created in the Slides editor

requests[].updateLineCategory OBJECT

Updates the category of a line

requests[].updateLineCategory.lineCategory ENUMERATION

The line category to update to.

The exact line type is determined based on the category to update to and how it's routed to connect to other page elements

requests[].updateLineCategory.objectId STRING

The object ID of the line the update is applied to.

Only a line with a category indicating it is a "connector" can be updated.

The line may be rerouted after updating its category

requests[].ungroupObjects OBJECT

Ungroups objects, such as groups

requests[].ungroupObjects.objectIds[] STRING

requests[].groupObjects OBJECT

Groups objects to create an object group. For example, groups PageElements to create a Group on the same page as all the children

requests[].groupObjects.groupObjectId STRING

A user-supplied object ID for the group to be created.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_]); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:]). The length of the ID must not be less than 5 or greater than 50.

If you don't specify an ID, a unique one is generated

requests[].groupObjects.childrenObjectIds[] STRING

requests[].insertText OBJECT

Inserts text into a shape or a table cell

requests[].insertText.objectId STRING

The object ID of the shape or table where the text will be inserted

requests[].insertText.text STRING

The text to be inserted.

Inserting a newline character will implicitly create a new ParagraphMarker at that index. The paragraph style of the new paragraph will be copied from the paragraph at the current insertion index, including lists and bullets.

Text styles for inserted text will be determined automatically, generally preserving the styling of neighboring text. In most cases, the text will be added to the TextRun that exists at the insertion index.

Some control characters (U+0000-U+0008, U+000C-U+001F) and characters from the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF) will be stripped out of the inserted text

requests[].insertText.insertionIndex INTEGER

The index where the text will be inserted, in Unicode code units, based on TextElement indexes.

The index is zero-based and is computed from the start of the string. The index may be adjusted to prevent insertions inside Unicode grapheme clusters. In these cases, the text will be inserted immediately after the grapheme cluster

requests[].insertText.cellLocation OBJECT

A location of a single table cell within a table

requests[].insertText.cellLocation.rowIndex INTEGER

The 0-based row index

requests[].insertText.cellLocation.columnIndex INTEGER

The 0-based column index

requests[].updateTableColumnProperties OBJECT

Updates the properties of a Table column

requests[].updateTableColumnProperties.objectId STRING

The object ID of the table

requests[].updateTableColumnProperties.columnIndices[] INTEGER

requests[].updateTableColumnProperties.tableColumnProperties OBJECT

Properties of each column in a table

requests[].updateTableColumnProperties.fields ANY

The fields that should be updated.

At least one field must be specified. The root tableColumnProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the column width, set fields to "column_width".

If '"column_width"' is included in the field mask but the property is left unset, the column width will default to 406,400 EMU (32 points)

requests[].deleteText OBJECT

Deletes text from a shape or a table cell

requests[].deleteText.cellLocation OBJECT

A location of a single table cell within a table

requests[].deleteText.cellLocation.rowIndex INTEGER

The 0-based row index

requests[].deleteText.cellLocation.columnIndex INTEGER

The 0-based column index

requests[].deleteText.objectId STRING

The object ID of the shape or table from which the text will be deleted

requests[].deleteText.textRange OBJECT

Specifies a contiguous range of an indexed collection, such as characters in text

requests[].deleteText.textRange.type ENUMERATION

The type of range

requests[].deleteText.textRange.startIndex INTEGER

The optional zero-based index of the beginning of the collection. Required for FIXED_RANGE and FROM_START_INDEX ranges

requests[].deleteText.textRange.endIndex INTEGER

The optional zero-based index of the end of the collection. Required for FIXED_RANGE ranges

requests[].updatePageProperties OBJECT

Updates the properties of a Page

requests[].updatePageProperties.objectId STRING

The object ID of the page the update is applied to

requests[].updatePageProperties.pageProperties OBJECT

The properties of the Page.

The page will inherit properties from the parent page. Depending on the page type the hierarchy is defined in either SlideProperties or LayoutProperties

requests[].updatePageProperties.fields ANY

The fields that should be updated.

At least one field must be specified. The root pageProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the page background solid fill color, set fields to "pageBackgroundFill.solidFill.color".

To reset a property to its default value, include its field name in the field mask but leave the field itself unset

requests[].createShape OBJECT

Creates a new shape

requests[].createShape.objectId STRING

A user-supplied object ID.

If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_]); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:]). The length of the ID must not be less than 5 or greater than 50. If empty, a unique identifier will be generated

requests[].createShape.shapeType ENUMERATION

The shape type

requests[].createShape.elementProperties OBJECT

Common properties for a page element.

Note: When you initially create a PageElement, the API may modify the values of both size and transform, but the visual size will be unchanged

requests[].createShape.elementProperties.pageObjectId STRING

The object ID of the page where the element is located

requests[].deleteParagraphBullets OBJECT

Deletes bullets from all of the paragraphs that overlap with the given text index range.

The nesting level of each paragraph will be visually preserved by adding indent to the start of the corresponding paragraph

requests[].deleteParagraphBullets.objectId STRING

The object ID of the shape or table containing the text to delete bullets from

requests[].deleteParagraphBullets.textRange OBJECT

Specifies a contiguous range of an indexed collection, such as characters in text

requests[].deleteParagraphBullets.textRange.type ENUMERATION

The type of range

requests[].deleteParagraphBullets.textRange.startIndex INTEGER

The optional zero-based index of the beginning of the collection. Required for FIXED_RANGE and FROM_START_INDEX ranges

requests[].deleteParagraphBullets.textRange.endIndex INTEGER

The optional zero-based index of the end of the collection. Required for FIXED_RANGE ranges

requests[].deleteParagraphBullets.cellLocation OBJECT

A location of a single table cell within a table

requests[].deleteParagraphBullets.cellLocation.rowIndex INTEGER

The 0-based row index

requests[].deleteParagraphBullets.cellLocation.columnIndex INTEGER

The 0-based column index

requests[].updateTableBorderProperties OBJECT

Updates the properties of the table borders in a Table

requests[].updateTableBorderProperties.borderPosition ENUMERATION

The border position in the table range the updates should apply to. If a border position is not specified, the updates will apply to all borders in the table range

requests[].updateTableBorderProperties.fields ANY

The fields that should be updated.

At least one field must be specified. The root tableBorderProperties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

For example to update the table border solid fill color, set fields to "tableBorderFill.solidFill.color".

To reset a property to its default value, include its field name in the field mask but leave the field itself unset

requests[].updateTableBorderProperties.objectId STRING

The object ID of the table

requests[].updateTableBorderProperties.tableRange OBJECT

A table range represents a reference to a subset of a table.

It's important to note that the cells specified by a table range do not necessarily form a rectangle. For example, let's say we have a 3 x 3 table where all the cells of the last row are merged together. The table looks like this:

 [             ]

A table range with location = (0, 0), row span = 3 and column span = 2 specifies the following cells:

  x     x 
 [ x    x    x ]

requests[].updateTableBorderProperties.tableRange.rowSpan INTEGER

The row span of the table range

requests[].updateTableBorderProperties.tableRange.columnSpan INTEGER

The column span of the table range

requests[].updateTableBorderProperties.tableBorderProperties OBJECT

The border styling properties of the TableBorderCell

requests[].updateTableBorderProperties.tableBorderProperties.dashStyle ENUMERATION

The dash style of the border

requests[].updatePageElementAltText OBJECT

Updates the alt text title and/or description of a page element

requests[].updatePageElementAltText.title STRING

The updated alt text title of the page element. If unset the existing value will be maintained. The title is exposed to screen readers and other accessibility interfaces. Only use human readable values related to the content of the page element

requests[].updatePageElementAltText.description STRING

The updated alt text description of the page element. If unset the existing value will be maintained. The description is exposed to screen readers and other accessibility interfaces. Only use human readable values related to the content of the page element

requests[].updatePageElementAltText.objectId STRING

The object ID of the page element the updates are applied to

writeControl OBJECT

Provides control over how write requests are executed

writeControl.requiredRevisionId STRING

The revision ID of the presentation required for the write request. If specified and the required_revision_id doesn't exactly match the presentation's current revision_id, the request will not be processed and will return a 400 bad request error

Output

This building block provides 28 output parameters

  = Parameter name
  = Format

writeControl OBJECT

Provides control over how write requests are executed

writeControl.requiredRevisionId STRING

The revision ID of the presentation required for the write request. If specified and the required_revision_id doesn't exactly match the presentation's current revision_id, the request will not be processed and will return a 400 bad request error

presentationId STRING

The presentation the updates were applied to

replies[] OBJECT

A single response from an update

replies[].replaceAllShapesWithImage OBJECT

The result of replacing shapes with an image

replies[].replaceAllShapesWithImage.occurrencesChanged INTEGER

The number of shapes replaced with images

replies[].createTable OBJECT

The result of creating a table

replies[].createTable.objectId STRING

The object ID of the created table

replies[].replaceAllText OBJECT

The result of replacing text

replies[].replaceAllText.occurrencesChanged INTEGER

The number of occurrences changed by replacing all text

replies[].createSlide OBJECT

The result of creating a slide

replies[].createSlide.objectId STRING

The object ID of the created slide

replies[].duplicateObject OBJECT

The response of duplicating an object

replies[].duplicateObject.objectId STRING

The ID of the new duplicate object

replies[].createLine OBJECT

The result of creating a line

replies[].createLine.objectId STRING

The object ID of the created line

replies[].createImage OBJECT

The result of creating an image

replies[].createImage.objectId STRING

The object ID of the created image

replies[].createVideo OBJECT

The result of creating a video

replies[].createVideo.objectId STRING

The object ID of the created video

replies[].replaceAllShapesWithSheetsChart OBJECT

The result of replacing shapes with a Google Sheets chart

replies[].replaceAllShapesWithSheetsChart.occurrencesChanged INTEGER

The number of shapes replaced with charts

replies[].createSheetsChart OBJECT

The result of creating an embedded Google Sheets chart

replies[].createSheetsChart.objectId STRING

The object ID of the created chart

replies[].groupObjects OBJECT

The result of grouping objects

replies[].groupObjects.objectId STRING

The object ID of the created group

replies[].createShape OBJECT

The result of creating a shape

replies[].createShape.objectId STRING

The object ID of the created shape