Class NotesMaster

  • Notes masters define default text styles and page elements for notes pages and are read-only.

  • Various methods allow retrieval of different types of page elements such as groups, images, lines, shapes, tables, videos, word arts, and charts.

  • You can get a unique ID for the notes master page or retrieve specific page elements by their ID or as placeholders.

  • Scripts using these methods generally require authorization with specific scopes related to presentations.

NotesMaster

A notes master in a presentation.

Notes masters define the default text styles and page elements for all notes pages. Notesmasters are read-only.

Methods

MethodReturn typeBrief description
getGroups()Group[]Returns the list ofGroup objects on the page.
getImages()Image[]Returns the list ofImage objects on the page.
getLines()Line[]Returns the list ofLine objects on the page.
getObjectId()StringGets the unique ID for the page.
getPageElementById(id)PageElement|nullReturns thePageElement on the page with the given ID, ornull if none exists.
getPageElements()PageElement[]Returns the list ofPageElement objects rendered on the page.
getPlaceholder(placeholderType)PageElement|nullReturns the placeholderPageElement object for a specifiedPlaceholderType ornull if a matching placeholder is not present.
getPlaceholder(placeholderType, placeholderIndex)PageElement|nullReturns the placeholderPageElement object for a specifiedPlaceholderType anda placeholder index, ornull if the placeholder is not present.
getPlaceholders()PageElement[]Returns the list of placeholderPageElement objects in the page.
getShapes()Shape[]Returns the list ofShape objects on the page.
getSheetsCharts()SheetsChart[]Returns the list ofSheetsChart objects on the page.
getTables()Table[]Returns the list ofTable objects on the page.
getVideos()Video[]Returns the list ofVideo objects on the page.
getWordArts()WordArt[]Returns the list ofWordArt objects on the page.

Detailed documentation

getGroups()

Returns the list ofGroup objects on the page.

Return

Group[]

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getImages()

Returns the list ofImage objects on the page.

Return

Image[]

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getLines()

Returns the list ofLine objects on the page.

Return

Line[]

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getObjectId()

Gets the unique ID for the page. Object IDs used by pages and page elements share the samenamespace.

Return

String

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getPageElementById(id)

Returns thePageElement on the page with the given ID, ornull if none exists.

Parameters

NameTypeDescription
idStringThe ID of the page element that is being retrieved.

Return

PageElement|null — The page element with the given ID.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getPageElements()

Returns the list ofPageElement objects rendered on the page.

Return

PageElement[]

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getPlaceholder(placeholderType)

Returns the placeholderPageElement object for a specifiedPlaceholderType ornull if a matching placeholder is not present.

If there are multiple placeholders with the same type, it returns the one with minimalplaceholder index. If there are multiple matching placeholders with the same index, it returnsthe first placeholder from the page's page elements collection.

constslide=SlidesApp.getActivePresentation().getSlides()[0];constplaceholder=slide.getPlaceholder(SlidesApp.PlaceholderType.CENTERED_TITLE,);

Parameters

NameTypeDescription
placeholderTypePlaceholderType

Return

PageElement|null

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getPlaceholder(placeholderType, placeholderIndex)

Returns the placeholderPageElement object for a specifiedPlaceholderType anda placeholder index, ornull if the placeholder is not present.

If there are multiple placeholders with the same type and index, it returns the firstplaceholder from the page's page elements collection.

constslide=SlidesApp.getActivePresentation().getSlides()[0];constplaceholder=slide.getPlaceholder(SlidesApp.PlaceholderType.CENTERED_TITLE,0,);

Parameters

NameTypeDescription
placeholderTypePlaceholderType
placeholderIndexInteger

Return

PageElement|null

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getPlaceholders()

Returns the list of placeholderPageElement objects in the page.

constmaster=SlidesApp.getActivePresentation().getMasters()[0];Logger.log(`Number of placeholders in the master:${master.getPlaceholders().length}`,);

Return

PageElement[]

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getShapes()

Returns the list ofShape objects on the page.

Return

Shape[]

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getSheetsCharts()

Returns the list ofSheetsChart objects on the page.

Return

SheetsChart[]

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getTables()

Returns the list ofTable objects on the page.

Return

Table[]

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getVideos()

Returns the list ofVideo objects on the page.

Return

Video[]

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getWordArts()

Returns the list ofWordArt objects on the page.

Return

WordArt[]

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.