# Google Slides on boxd

> Google Slides is a cloud-based presentation editor with real-time collaboration, template gallery, and integration with other Google Workspace apps.

- Page: https://boxd.sh/integrations/googleslides/
- CLI: `run googleslides` (8 commands, 6 marked common)
- SDK: `import { googleslides } from "@boxd/run"`; every parameter and response type is at `@boxd/run/googleslides`
- Triggers: 1
- Connect: `run auth googleslides` (Sign in with Google Slides), or https://app.boxd.sh/integrations/detail/googleslides
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth googleslides      # once: prints a link to connect your account
run googleslides           # list its commands
run googleslides presentations-get --help
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { googleslides } from "@boxd/run";

const result = await googleslides.presentationsGet({});
console.log(result);

googleslides.on("slide-added", { presentation_id: "…" }, async (event) => {
  // New Slide Added: runs on this machine, once per event
  console.log(event);
});
```

Run it with `run googleslides.run.ts`. A script that calls `.on()` keeps running as a job and handles each event.

## Commands

Required flags are listed; `run googleslides <command> --help` lists the optional ones. "common" marks what `run googleslides` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `create-presentation` ·common | `googleslides.createPresentation()` | — | 4 | Create a blank Google Slides presentation |
| `create-slides-markdown` ·common | `googleslides.createSlidesMarkdown()` | `--markdown-text` `--title` | 0 | Creates a new Google Slides presentation from Markdown text |
| `get-page-thumbnail2` | `googleslides.getPageThumbnail2()` | `--pageObjectId` `--presentationId` | 2 | Generate a thumbnail of the latest version of a specified page |
| `presentations-batch-update` ·common | `googleslides.presentationsBatchUpdate()` | `--presentationId` | 3 | Update Google Slides presentations using markdown content or raw API text |
| `presentations-copy-from-template` ·common | `googleslides.presentationsCopyFromTemplate()` | `--template-presentation-id` | 2 | Create a new Google Slides presentation by duplicating an existing template deck via Drive file copy |
| `presentations-get` ·common | `googleslides.presentationsGet()` | — | 3 | Retrieve the latest version of a presentation |
| `presentations-pages-get` ·common | `googleslides.presentationsPagesGet()` | `--pageObjectId` `--presentationId` | 0 | Get the latest version of a specific page in a presentation |
| `presentations-pages-get-thumbnail` ·deprecated | `googleslides.presentationsPagesGetThumbnail()` | `--pageObjectId` `--presentationId` | 2 | Use get-page-thumbnail2 instead |

## Triggers

`googleslides.on("<event>", handler)` in a script; required config goes before the handler as an object.

| Event | Name | Required config | Description |
|---|---|---|---|
| `"slide-added"` | New Slide Added | `presentation_id` | Fires when a new slide is added to a Google Slides presentation |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
