NotesMaster

A notes master in a presentation.

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

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/slides/notes-master#getGroups()` | `https://developers.google.com/apps-script/reference/slides/group` | Returns the list of `https://developers.google.com/apps-script/reference/slides/group` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-master#getImages()` | `https://developers.google.com/apps-script/reference/slides/image` | Returns the list of `https://developers.google.com/apps-script/reference/slides/image` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-master#getLines()` | `https://developers.google.com/apps-script/reference/slides/line` | Returns the list of `https://developers.google.com/apps-script/reference/slides/line` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-master#getObjectId()` | `String` | Gets the unique ID for the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-master#getPageElementById(String)` | `https://developers.google.com/apps-script/reference/slides/page-element|null` | Returns the `https://developers.google.com/apps-script/reference/slides/page-element` on the page with the given ID, or `null` if none exists. |
| `https://developers.google.com/apps-script/reference/slides/notes-master#getPageElements()` | `https://developers.google.com/apps-script/reference/slides/page-element` | Returns the list of `https://developers.google.com/apps-script/reference/slides/page-element` objects rendered on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-master#getPlaceholder(PlaceholderType)` | `https://developers.google.com/apps-script/reference/slides/page-element|null` | Returns the placeholder `https://developers.google.com/apps-script/reference/slides/page-element` object for a specified `https://developers.google.com/apps-script/reference/slides/placeholder-type` or `null` if a matching placeholder is not present. |
| `https://developers.google.com/apps-script/reference/slides/notes-master#getPlaceholder(PlaceholderType,Integer)` | `https://developers.google.com/apps-script/reference/slides/page-element|null` | Returns the placeholder `https://developers.google.com/apps-script/reference/slides/page-element` object for a specified `https://developers.google.com/apps-script/reference/slides/placeholder-type` and a placeholder index, or `null` if the placeholder is not present. |
| `https://developers.google.com/apps-script/reference/slides/notes-master#getPlaceholders()` | `https://developers.google.com/apps-script/reference/slides/page-element` | Returns the list of placeholder `https://developers.google.com/apps-script/reference/slides/page-element` objects in the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-master#getShapes()` | `https://developers.google.com/apps-script/reference/slides/shape` | Returns the list of `https://developers.google.com/apps-script/reference/slides/shape` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-master#getSheetsCharts()` | `https://developers.google.com/apps-script/reference/slides/sheets-chart` | Returns the list of `https://developers.google.com/apps-script/reference/slides/sheets-chart` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-master#getTables()` | `https://developers.google.com/apps-script/reference/slides/table` | Returns the list of `https://developers.google.com/apps-script/reference/slides/table` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-master#getVideos()` | `https://developers.google.com/apps-script/reference/slides/video` | Returns the list of `https://developers.google.com/apps-script/reference/slides/video` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-master#getWordArts()` | `https://developers.google.com/apps-script/reference/slides/word-art` | Returns the list of `https://developers.google.com/apps-script/reference/slides/word-art` objects on the page. |

## Detailed documentation

### `getGroups()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/group` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/group`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getImages()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/image` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/image`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getLines()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/line` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/line`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `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 same
namespace.

#### Return


`String`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getPageElementById(id)`

Returns the `https://developers.google.com/apps-script/reference/slides/page-element` on the page with the given ID, or `null` if none exists.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `id` | `String` | The ID of the page element that is being retrieved. |

#### Return


`https://developers.google.com/apps-script/reference/slides/page-element|null` --- The page element with the given ID.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getPageElements()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/page-element` objects rendered on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/page-element`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getPlaceholder(placeholderType)`

Returns the placeholder `https://developers.google.com/apps-script/reference/slides/page-element` object for a specified `https://developers.google.com/apps-script/reference/slides/placeholder-type` or
`null` if a matching placeholder is not present.

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

```javascript
const slide = SlidesApp.getActivePresentation().getSlides()[0];
const placeholder = slide.getPlaceholder(
    SlidesApp.PlaceholderType.CENTERED_TITLE,
);
```

#### Parameters

| Name | Type | Description |
|---|---|---|
| `placeholderType` | `https://developers.google.com/apps-script/reference/slides/placeholder-type` | The placeholder type to match. |

#### Return


`https://developers.google.com/apps-script/reference/slides/page-element|null` --- The placeholder page element, or `null` if none is found.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getPlaceholder(placeholderType, placeholderIndex)`

Returns the placeholder `https://developers.google.com/apps-script/reference/slides/page-element` object for a specified `https://developers.google.com/apps-script/reference/slides/placeholder-type` and
a placeholder index, or `null` if the placeholder is not present.

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

```javascript
const slide = SlidesApp.getActivePresentation().getSlides()[0];
const placeholder = slide.getPlaceholder(
    SlidesApp.PlaceholderType.CENTERED_TITLE,
    0,
);
```

#### Parameters

| Name | Type | Description |
|---|---|---|
| `placeholderType` | `https://developers.google.com/apps-script/reference/slides/placeholder-type` | The placeholder type to match. |
| `placeholderIndex` | `Integer` | The placeholder index to match. |

#### Return


`https://developers.google.com/apps-script/reference/slides/page-element|null` --- The placeholder page element, or `null` if none is found.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getPlaceholders()`

Returns the list of placeholder `https://developers.google.com/apps-script/reference/slides/page-element` objects in the page.

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

#### Return


`https://developers.google.com/apps-script/reference/slides/page-element`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getShapes()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/shape` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/shape`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getSheetsCharts()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/sheets-chart` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/sheets-chart`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getTables()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/table` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/table`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getVideos()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/video` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/video`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getWordArts()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/word-art` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/word-art`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`