Actions40
- Create Bullets Request Actions
- Create Document Request Actions
- Create Headers & Footers Request Actions
- Create Images Request Actions
- Create Named Ranges Request Actions
- Create Tables Request Actions
- Create Tabs Request Actions
- Create Text Request Actions
- Send Request Actions
Create Document Request → Insert Page Break
AI-generatedSummary
Inserts a page break at a specified location within a Google Docs document
Inputs
- insertionLocation — Location Type ("Location" or "End of Segment Location")
- segmentId — The ID of the header, footer or footnote the location is in; empty for the document body
- tabId — The tab ID where the insertion should occur; omitted to use the first tab
- index (required) — Zero‑based UTF‑16 index relative to the start of the segment specified by segmentId
Output shape
object representing the API response from the Insert Page Break request
Typically includes the updated document ID and status; on error the response may contain an error object
Examples
Example 1: Add a page break after the cursor in the body of the first tab
insertionLocation=location&index=0&segmentId=&tabId=
Example 2: Insert a page break at the end of a footer in tab 2
insertionLocation=endOfSegmentLocation&segmentId=footer1&tabId=2&index=0