Loading...
Loading...
Manage Google Slides presentations. Create presentations, add/delete slides, insert text, shapes, and images. Use when working with Google Slides presentation management.
npx skill4agent add odyssey4me/agent-skills google-slidespip install --user google-auth google-auth-oauthlib google-api-python-client keyring pyyamlpython scripts/google-slides.py check~/.config/agent-skills/google.yamloauth_client:
client_id: your-client-id.apps.googleusercontent.com
client_secret: your-client-secretpython scripts/google-slides.py check| Scope | Permission | Used For |
|---|---|---|
| Read presentations | Reading presentation metadata and content |
| Full access | Creating and modifying presentations |
| Read Drive files | Exporting presentations as PDF |
keyring del agent-skills google-slides-token-jsonpython scripts/google-slides.py checkpython scripts/google-slides.py checkpython scripts/google-slides.py auth setup \
--client-id YOUR_CLIENT_ID \
--client-secret YOUR_CLIENT_SECRET~/.config/agent-skills/google-slides.yaml--client-id--client-secretpython scripts/google-slides.py presentations create --title "My Presentation"--title--jsonpython scripts/google-slides.py presentations create --title "Q4 Review"
# Output:
# ✓ Presentation created successfully
# Title: Q4 Review
# Presentation ID: 1abc...xyz
# Slides: 1
# URL: https://docs.google.com/presentation/d/1abc...xyz/editpython scripts/google-slides.py presentations get PRESENTATION_IDpresentation_id--jsonpython scripts/google-slides.py presentations get 1abc...xyz
# Output:
# Title: Q4 Review
# Presentation ID: 1abc...xyz
# Slides: 5
# URL: https://docs.google.com/presentation/d/1abc...xyz/edit
#
# Slides:
# Slide 1:
# ID: slide_id_1
# Layout: TITLE
# Elements: 2 (2 text, 0 shapes, 0 images, 0 other)
# Slide 2:
# ID: slide_id_2
# Layout: TITLE_AND_BODY
# Elements: 3 (2 text, 1 shapes, 0 images, 0 other)python scripts/google-slides.py presentations read PRESENTATION_IDpresentation_id--formattextpdf--output-o--json# Read as text (default)
python scripts/google-slides.py presentations read 1abc...xyz
# Export as PDF
python scripts/google-slides.py presentations read 1abc...xyz --format pdf --output presentation.pdf
# Output (text format):
# --- Slide 1 ---
# Welcome to Our Product
# An introduction to key features
#
# --- Slide 2 ---
# Key Metrics
# Revenue: $1.2M
# Users: 50,000
#
# --- Slide 3 ---
# | Quarter | Revenue | Growth |
# | --- | --- | --- |
# | Q1 | $250K | 10% |
# | Q2 | $300K | 20% |drive.readonlypython scripts/google-slides.py slides create PRESENTATION_ID --layout BLANKpresentation_id--layoutBLANKTITLETITLE_AND_BODYTITLE_ONLYSECTION_HEADERSECTION_TITLE_AND_DESCRIPTIONONE_COLUMN_TEXTMAIN_POINTBIG_NUMBER--index--json# Add blank slide at the end
python scripts/google-slides.py slides create 1abc...xyz --layout BLANK
# Add title slide at position 0
python scripts/google-slides.py slides create 1abc...xyz --layout TITLE --index 0
# Output:
# ✓ Slide created successfully
# Slide ID: slide_abc123
# Layout: TITLEpython scripts/google-slides.py slides delete PRESENTATION_ID --slide-id SLIDE_IDpresentation_id--slide-id--json# Get slide IDs first
python scripts/google-slides.py presentations get 1abc...xyz --json | jq '.slides[].objectId'
# Delete a slide
python scripts/google-slides.py slides delete 1abc...xyz --slide-id slide_abc123
# Output:
# ✓ Slide deleted successfullypython scripts/google-slides.py text insert PRESENTATION_ID \
--slide-id SLIDE_ID \
--text "Hello World"presentation_id--slide-id--text--x--y--width--height--json# Insert text at default position
python scripts/google-slides.py text insert 1abc...xyz \
--slide-id slide_abc123 \
--text "Hello World"
# Insert text at custom position
python scripts/google-slides.py text insert 1abc...xyz \
--slide-id slide_abc123 \
--text "Q4 Results" \
--x 50 --y 50 --width 500 --height 80
# Output:
# ✓ Text inserted successfully
# Text: Q4 Results
# Position: (50.0, 50.0) points
# Size: 500.0 x 80.0 pointspython scripts/google-slides.py shapes create PRESENTATION_ID \
--slide-id SLIDE_ID \
--shape-type RECTANGLEpresentation_id--slide-id--shape-typeRECTANGLEELLIPSETRIANGLEPENTAGONHEXAGONSTAR_5STAR_8STAR_24STAR_32CLOUDHEARTLIGHTNING_BOLTMOONSUNARROW_NORTHARROW_EASTARROW_SOUTHARROW_WEST--x--y--width--height--json# Create rectangle
python scripts/google-slides.py shapes create 1abc...xyz \
--slide-id slide_abc123 \
--shape-type RECTANGLE
# Create star with custom size
python scripts/google-slides.py shapes create 1abc...xyz \
--slide-id slide_abc123 \
--shape-type STAR_5 \
--x 300 --y 200 --width 150 --height 150
# Output:
# ✓ Shape created successfully
# Type: STAR_5
# Position: (300.0, 200.0) points
# Size: 150.0 x 150.0 pointspython scripts/google-slides.py images create PRESENTATION_ID \
--slide-id SLIDE_ID \
--image-url "https://example.com/image.png"presentation_id--slide-id--image-url--x--y--width--height--jsonpython scripts/google-slides.py images create 1abc...xyz \
--slide-id slide_abc123 \
--image-url "https://example.com/chart.png" \
--x 50 --y 150 --width 400 --height 300
# Output:
# ✓ Image created successfully
# URL: https://example.com/chart.png
# Position: (50.0, 150.0) points
# Size: 400.0 x 300.0 points# Create presentation
PRES_ID=$(python scripts/google-slides.py presentations create \
--title "Team Update" --json | jq -r '.presentationId')
# Get the default slide ID
SLIDE_ID=$(python scripts/google-slides.py presentations get $PRES_ID --json | \
jq -r '.slides[0].objectId')
# Add title text
python scripts/google-slides.py text insert $PRES_ID \
--slide-id $SLIDE_ID \
--text "Q4 Team Update" \
--x 50 --y 50 --width 600 --height 100
# Add subtitle
python scripts/google-slides.py text insert $PRES_ID \
--slide-id $SLIDE_ID \
--text "December 2024" \
--x 50 --y 180 --width 600 --height 50#!/bin/bash
PRES_ID="your-presentation-id"
# Add content slide
SLIDE_ID=$(python scripts/google-slides.py slides create $PRES_ID \
--layout TITLE_AND_BODY --json | jq -r '.replies[0].createSlide.objectId')
# Add title
python scripts/google-slides.py text insert $PRES_ID \
--slide-id $SLIDE_ID \
--text "Key Metrics" \
--x 50 --y 30 --width 600 --height 60
# Add chart image
python scripts/google-slides.py images create $PRES_ID \
--slide-id $SLIDE_ID \
--image-url "https://example.com/metrics.png" \
--x 100 --y 120 --width 500 --height 350
# Add another slide with shapes
SLIDE2_ID=$(python scripts/google-slides.py slides create $PRES_ID \
--layout BLANK --json | jq -r '.replies[0].createSlide.objectId')
# Add decorative shape
python scripts/google-slides.py shapes create $PRES_ID \
--slide-id $SLIDE2_ID \
--shape-type STAR_5 \
--x 550 --y 30 --width 80 --height 80#!/bin/bash
# Create presentation
PRES_ID=$(python scripts/google-slides.py presentations create \
--title "Sales Report" --json | jq -r '.presentationId')
# Add slide for each region
for region in "North" "South" "East" "West"; do
SLIDE_ID=$(python scripts/google-slides.py slides create $PRES_ID \
--layout TITLE_AND_BODY --json | jq -r '.replies[0].createSlide.objectId')
python scripts/google-slides.py text insert $PRES_ID \
--slide-id $SLIDE_ID \
--text "$region Region Sales" \
--x 50 --y 30 --width 600 --height 80
done(0, 0) (720, 0)
┌───────────────────────────────────────┐
│ Title area │
│ (50, 50, 620, 80) │
│ │
│ Content area │
│ (50, 150, 620, 350) │
│ │
│ │
└───────────────────────────────────────┘
(0, 540) (720, 540)keyring del agent-skills google-slides-token-jsonpython scripts/google-slides.py checkhttps://docs.google.com/presentation/d/1abc...xyz/edit1abc...xyzpython scripts/google-slides.py presentations get $PRES_ID --json | \
jq -r '.slides[] | "\(.objectId) (index \(.slideProperties.slideIndex))"'--x--y--width--heightpip install --user google-auth google-auth-oauthlib google-api-python-client keyring pyyamlslides.googleapis.com