Google Slides is organized around a single central resource: the presentation. A presentation contains an ordered list of pages (slides), and each page contains page elements (shapes, text boxes, images, tables, etc.). Most work flows revolve around obtaining a presentationId, inspecting its pages to get pageObjectId and page-element IDs, and then applying mutations through a single mutation entry point that accepts an ordered list of requests.
Domain model and IDs you need to know
- Presentation: identified by
presentationId. Almost every operation that reads or writes content requires this ID. - Page (slide): each slide is a page with an
objectId(calledpageObjectIdin page-scoped operations). Use the page object ID to retrieve a single slide (pages.get) or get its thumbnail (pages.getThumbnail). - Page elements: shapes, text boxes, images, and tables within a page each have an
objectIdinside thepagerepresentation returned bypresentations.get.
Where to find IDs: call presentations.get to fetch the whole presentation; its slides array lists each page and the nested pageElements list each element with their object IDs. Use those IDs when targeting specific slides or elements in subsequent calls.
Entry points — what to call first
- Create a new presentation: call
presentations.createwith an optional request body (for example, atitle). The response contains the newly created presentation and itspresentationId. - Inspect an existing presentation: call
presentations.getwithpresentationId. This returns the presentation structure includingslides(pages) and theirpageElementsand object IDs. Use this as the starting point for anything that needs page or element IDs. - Read a single page: use
presentations.pages.getwithpresentationIdandpageObjectIdwhen you only need one slide's content. - Get a slide thumbnail: use
presentations.pages.getThumbnailwithpresentationIdandpageObjectId. Thumbnail options (mime type and size) are provided via thethumbnailProperties.*query fields. - Mutate a presentation: use
presentations.batchUpdatewithpresentationIdand arequestsarray describing the changes. All non-trivial edits go through this operation.
How to accomplish common user requests
These are the practical sequences that appear most often.
Create a new presentation and add content
- Call
presentations.create(includetitleif you want). Record thepresentationIdfrom the response. - Call
presentations.batchUpdateagainst thatpresentationIdwith arequestsarray to add slides and content (for example: create a slide, create a shape or text box, and insert text). The batch accepts many request types; read the request-type definitions for the exact fields each request requires. - Inspect the
BatchUpdatePresentationResponsereplies to obtain any created object IDs returned for requests that create objects. If you need to use created objects inside the same batch, assign explicit object IDs in the creation requests (see gotchas below).
Add or change text on an existing slide
- If you do not already have the
pageObjectId, callpresentations.getto find the slide'sobjectIdand any target element'sobjectId. - Use
presentations.batchUpdatewith requests such asInsertTextorReplaceAllText(depending on whether you append or replace). Target the specific page element byobjectId.
Insert an image into a slide
- Ensure you have
presentationIdand thepageObjectIdfor the slide where the image should go. - Use
presentations.batchUpdatewith the image-creation request (the request accepts image source information and placement). The response replies include the created imageobjectId.
Duplicate or reorder slides
- Use
presentations.batchUpdaterequests that duplicate a page or change object order. After the batch completes, the response contains replies indicating created object IDs and final structure; callpresentations.getif you need the authoritative, updated presentation structure.
Retrieve a slide thumbnail for display
- Call
presentations.pages.getThumbnailwithpresentationIdandpageObjectId. The thumbnail request acceptsthumbnailProperties.mimeType(default PNG) andthumbnailProperties.thumbnailSize(defaults to server choice if omitted).
Extract text or element lists from a slide
- Use
presentations.pages.getfor a single slide orpresentations.getfor the whole presentation. Inspect thepageElementsarray to find text runs, images, and theirobjectIds for subsequent edits.
BatchUpdate patterns and important gotchas
-
Single mutation entry point: almost all mutations use
presentations.batchUpdate. Build arequestsarray where each entry is one mutation. The array is applied in order. -
Atomic and ordered execution: the
requestsare executed in order as a single operation. If any request fails, the whole batch is rejected and no changes are applied. Plan multi-step edits accordingly. -
Replies and created IDs:
BatchUpdatePresentationResponsecontains arepliesarray with results for requests that return data (for example, IDs of created objects). Those replies are available only after the batch completes. -
Referencing objects inside the same batch: if a later request in the same
requestsarray must target an object created earlier in that same batch, assign a stableobjectIdexplicitly in the creation request. You cannot rely on using an ID returned inrepliesfrom earlier requests within the same batch because replies are only available after the entire batch finishes. -
When to fetch the presentation vs. read replies: for many flows the
repliesfrombatchUpdateprovide enough information (created IDs, etc.). If you need the full, canonical presentation state (reordered slides, layout changes, computed fields), callpresentations.getafter the batch completes to retrieve the authoritative structure.
Thumbnail and media notes
- Default thumbnail behavior: if you do not set
thumbnailProperties.mimeType, the server returns PNG. If you omitthumbnailProperties.thumbnailSize, the server selects a default size. - Query parameter naming: thumbnail options are passed as
thumbnailProperties.mimeTypeandthumbnailProperties.thumbnailSizein the request query. - Binary vs. metadata responses: the operation supports different response formats; if you expect image content, check the operation's response format options (the API surface exposes
alt/media behaviors via query parameters).
Practical checklist for reliability
- Always obtain
presentationIdfirst (create orpresentations.get) before attempting page-level operations. - Use
presentations.getto discoverpageObjectIdand page-elementobjectIds before targeting them in mutations. - Compose mutations as an ordered
requestsarray inpresentations.batchUpdate. Read request-type definitions to supply the correct fields for each request you intend to use. - If subsequent requests in the same batch must target newly created objects, supply explicit
objectIdvalues when creating them. - After a
batchUpdate, inspectrepliesfor IDs that the API returns; callpresentations.getwhen you need the complete updated presentation structure.
When to prefer pages.get over presentations.get
- Use
presentations.pages.getwhen you only need a single slide's content. It targets one page and avoids returning the entire presentation structure. Usepresentations.getwhen you need the full list of slides, layouts, or to discover many object IDs in one call.
Summary
Treat presentationId as the anchor for all operations. Read slide and element IDs from presentations.get (or pages.get), perform mutations through presentations.batchUpdate (ordered and atomic), and remember to assign explicit object IDs if you must reference newly created objects within the same batch. Use pages.getThumbnail for slide images and tune the thumbnailProperties.* query fields when needed.