Skip to content

Google Slides Provider

The google_slides provider renders SlideFlow output into real Google Slides decks. It can create a blank deck or copy a template, insert chart images, run text/table/AI replacements, and optionally share the final deck.

Setup Checklist

  1. Enable APIs in your Google Cloud project:
  2. Google Slides API
  3. Google Drive API
  4. Create a service account.
  5. Share the template deck (and destination Drive folder) with that service account email.
  6. Supply credentials via either:
  7. provider.config.credentials in YAML (file path or raw JSON), or
  8. GOOGLE_SLIDEFLOW_CREDENTIALS environment variable.

For production Shared Drive setup and command-by-command service-account bootstrap, see Google Service Accounts & Shared Drives.

Template Design for Automation

Use a template deck that is stable and automation-friendly:

  • Keep placeholder text explicit (for example {{TITLE}}, {{TABLE_1,1}}).
  • Keep slide IDs stable after wiring your config.
  • Reserve chart regions with enough space for your configured x/y/width/height.
  • Avoid deleting/recreating slides after IDs are mapped in YAML.

Getting Slide IDs

In the Google Slides editor, navigate to a target slide and inspect the URL fragment. The slide fragment typically looks like #slide=id.<slide_object_id>. Use that object ID in presentation.slides[].id.

Provider Config Fields

provider:
  type: "google_slides"
  config:
    credentials: "/path/to/service-account.json"
    template_id: "<template_presentation_id>"
    presentation_folder_id: "<folder_for_output_decks>"
    drive_folder_id: "<folder_for_chart_images>"
    new_folder_name: "Weekly Reports"
    new_folder_name_fn: "compute_subfolder_name"
    share_with:
      - "team@example.com"
    share_role: "reader"
    transfer_ownership_to: "owner@example.com"
    transfer_ownership_strict: false
    chart_image_sharing_mode: "public" # public | restricted
    requests_per_second: 1.0
    strict_cleanup: false

If you use GOOGLE_SLIDEFLOW_CREDENTIALS, you can omit config.credentials.

Field behavior:

  • template_id: if set, SlideFlow copies the template instead of creating a blank deck.
  • presentation_folder_id: destination folder for generated decks.
  • drive_folder_id: destination folder for uploaded chart images.
  • If omitted, SlideFlow falls back to the presentation destination folder logic.
  • new_folder_name + new_folder_name_fn: optional dynamic subfolder under presentation_folder_id.
  • share_with + share_role: shares the rendered deck after generation.
  • transfer_ownership_to: optional ownership handoff target after successful render/share.
  • transfer_ownership_strict: if true, ownership handoff failure fails the run.
  • chart_image_sharing_mode: uploaded chart-image ACL mode:
  • public (default): grants anyone:reader before insertion.
  • restricted: skips public ACL grant (tighter access; insertion compatibility depends on your Drive permissions model).
  • requests_per_second: throttles API calls.
  • strict_cleanup: if true, cleanup failures (chart image trash) fail the render.

Sharing and Permissions

Sharing is performed by the service account, not your personal user.

  • Ensure the service account has permission to share files in the target drive/folder.
  • share_role supports reader, writer, and commenter.
  • Google may send notification emails when sharing is executed.
  • Ownership transfer is explicit opt-in and only works for files in My Drive (not Shared Drives).
  • Transfer uses Google Drive ownership APIs and may notify the target owner.

For Shared Drive-first permission patterns and ownership-transfer constraints, see Google Service Accounts & Shared Drives.

Cleanup Semantics

Chart images are uploaded to Drive so Slides can reference them. After render, SlideFlow attempts to trash those images.

  • Default behavior: cleanup issues are logged but do not fail the run.
  • With strict_cleanup: true: cleanup failure raises an error and fails the run.
  • Cleanup now emits a summary log with deleted/failed counts and failed file IDs when applicable.

Citation Rendering

When citations.enabled: true, SlideFlow renders a Sources block into speaker notes.

  • citations.location: per_slide:
  • each slide receives its own notes-level citation block.
  • citations.location: document_end:
  • citations are deduplicated and written to the first slide notes.

For Google Slides, per_section behaves the same as per_slide.

Performance and Quotas

For bulk generation, tune both concurrency and API pacing:

  • CLI concurrency: slideflow build ... --threads <n>
  • API rate limit: slideflow build ... --rps <float> or provider.config.requests_per_second

Start conservative (for example --threads 2, --rps 0.8) and increase gradually.

Common Failures

  • 404/403 on template copy: service account cannot access template deck.
  • 403 on folder writes: service account lacks folder-level permissions.
  • Replacement count is zero: placeholder text in template does not exactly match YAML placeholder.
  • Deck created but no charts: chart generation failed before insertion (check chart logs and data source validity).