Gws Slides Processor
All-in-one command covering google, slides, read, write. Includes structured workflows, validation checks, and reusable patterns for google workspace.
GWS Slides Processor
Process Google Slides presentations -- create decks, retrieve slide content, apply batch updates, and extract page-level data through the GWS CLI.
When to Use This Command
Run this command when you need to create, read, or modify Google Slides presentations programmatically.
- You need to create a new blank presentation with a specific title
- You want to retrieve the full content of an existing presentation for analysis
- You are applying batch updates to modify slide layouts, text, or images
- You need to extract content from individual pages for processing or conversion
Use it also when:
- You are building an automation pipeline that generates slide decks from data
- You need to programmatically update placeholder text or images in a template deck
Quick Start
# .claude/commands/gws-slides-processor.md name: gws-slides-processor description: Process Google Slides presentations via CLI arguments: operation: The Slides operation to execute
# Get the contents of a presentation claude gws-slides-processor "presentations get --params '{\"presentationId\": \"1abc123def456\"}'"
Expected output:
{
"presentationId": "1abc123def456",
"title": "Q1 Review",
"slides": [
{ "objectId": "p", "pageType": "SLIDE" },
{ "objectId": "p1", "pageType": "SLIDE" }
],
"pageSize": { "width": { "magnitude": 9144000 } }
}
Core Concepts
| Concept | Description |
|---|---|
| Presentation | A Google Slides document identified by its unique ID |
| Page / Slide | An individual slide within a presentation |
| Batch Update | Atomic set of changes applied to a presentation |
| Page Element | Objects on a slide: text boxes, images, shapes, tables |
| Object ID | Unique identifier for each element within a presentation |
Slides Structure:
Presentation
ā
āāā Slide 1 (objectId: "p")
ā āāā TextBox (objectId: "tb1")
ā āāā Image (objectId: "img1")
ā
āāā Slide 2 (objectId: "p1")
ā āāā Shape (objectId: "s1")
ā āāā Table (objectId: "tbl1")
ā
āāā Slide N ...
Configuration
| Parameter | Default | Description |
|---|---|---|
presentationId | required | The ID of the target presentation |
format | json | Output format: json, table, yaml, csv |
dry-run | false | Validate batch updates without applying them |
params | none | URL parameters as JSON string |
json | none | Request body for batch updates |
Best Practices
-
Use get before batchUpdate -- Always retrieve the current presentation state to understand existing object IDs and page structure before applying updates.
-
Reference objects by ID, not index -- Slides uses
objectIdfor all element references. Relying on slide order is fragile; always use the stable object identifier. -
Apply all updates in a single batchUpdate -- Each
batchUpdateis atomic. Group related changes together to ensure consistency and reduce API calls. -
Provide a presentationId when creating -- While optional, specifying a
presentationIdduring creation gives you a predictable identifier for subsequent operations. -
Use dry-run for complex batch updates -- Before applying a large batch of slide modifications, validate the request structure with
--dry-runto catch errors early.
Common Issues
-
Object ID not found in batchUpdate -- The referenced
objectIddoes not exist in the presentation. Re-fetch the presentation to get current object IDs. -
Batch update request validation errors -- Each request in the batch is validated before any are applied. A single invalid request causes the entire batch to fail. Check error details for the specific failing request.
-
Insufficient permissions for presentation -- The authenticated user needs Editor access to apply batch updates. Viewer access only allows
getoperations. Check sharing settings in the Google Slides UI or use the Drive API to verify permissions programmatically.
Working with Page Elements
When modifying slide content through batch updates, understanding the page element hierarchy is essential. Each slide contains page elements such as text boxes, images, shapes, and tables, each identified by a unique objectId. To replace placeholder text, use the replaceAllText request type which searches across all slides. To modify a specific element, use requests like updateTextStyle, updateShapeProperties, or replaceImage with the target element's objectId. Always retrieve the presentation first with presentations get to map out the current element structure before constructing your batch update payload.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Git Commit Message Generator
Generates well-structured conventional commit messages by analyzing staged changes. Follows Conventional Commits spec with scope detection.
React Component Scaffolder
Scaffolds a complete React component with TypeScript types, Tailwind styles, Storybook stories, and unit tests. Follows project conventions automatically.
CI/CD Pipeline Generator
Generates GitHub Actions workflows for CI/CD including linting, testing, building, and deploying. Detects project stack automatically.