Google Slides
The robomotion googleslides CLI connects to Google Slides API for presentation management. It creates presentations, adds and duplicates slides, replaces text and images for template-based generation, and exports to PDF.
When to use
- Create new presentations or work from templates
- Add, duplicate, or delete slides
- Replace text and images in slide templates for automated generation
- Export presentations to PDF
Prerequisites
robomotionCLI installed- Package installed:
robomotion install googleslides - Google Slides OAuth2 or Service Account credentials configured via Robomotion vault
IMPORTANT: Session Mode Required for Multi-Step Operations
Each CLI command runs as a separate process — connection IDs from connect do NOT persist across calls.
You MUST use --session on connect and pass --session-id to all subsequent commands.
Workflow
- Install (once):
robomotion install googleslides - Connect with session:
robomotion googleslides google_slides_connect --session --output json # → {"outClientId":"<client-id>","session_id":"<session-id>"} - Use the returned
client-idandsession-idin all subsequent commands:robomotion googleslides google_slides_create --client-id "<client-id>" --title <title> --session-id "<session-id>" --output json - Disconnect when done:
robomotion googleslides google_slides_disconnect --client-id "<client-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion googleslides create_presentation --title [--sharewith] --output jsonCreates a new Google Slides presentation with optional sharingrobomotion googleslides open_presentation --url --output jsonOpens an existing Google Slides presentation by URLrobomotion googleslides get_presentation --presentation-id [--page-object-id] --output jsonRetrieves presentation metadata or page element IDsrobomotion googleslides copy_presentation --presentation-id --title [--sharewith] --output jsonCreates a copy of an existing Google Slides presentationrobomotion googleslides replace_text --presentation-id --text-to-replace --replacement [--page-object-ids] --output jsonFinds and replaces text across all slides or specific pagesrobomotion googleslides replace_image_by_id --presentation-id --image-object-id --replacement-image-url [--image-replace-method] --output jsonReplaces an existing image in a presentation by its object IDrobomotion googleslides replace_shapes_with_image --presentation-id --text-to-replace --replacement-image-url [--image-replace-method] [--page-object-ids] --output jsonReplaces shapes containing specific text with an imagerobomotion googleslides add_image --presentation-id --image-object-id --image-url --0 [--0-0] [--0-0] [--0-0] [--0-0] [--1-0] [--1-0] --output jsonAdds an image to a slide at a specified position and sizerobomotion googleslides pdf_export --presentation-id --file-path --output jsonExports a Google Slides presentation to PDF format
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)