Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/drive-skill-content-creation-guidance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@googleworkspace/cli": patch
---

docs(skills): add content creation guidance to gws-drive SKILL.md

Point agents to the Sheets, Docs, and Slides APIs when creating files with
content. `drive files create` with a Google MIME type produces an empty shell;
the guidance prevents agents from silently losing data.
14 changes: 14 additions & 0 deletions skills/gws-drive/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ gws drive <resource> <method> [flags]
|---------|-------------|
| [`+upload`](../gws-drive-upload/SKILL.md) | Upload a file with automatic metadata |

## Content Creation Guidance

> **Important:** The Drive API cannot set cell values, document text, or slide content. Using `drive files create` with a Sheets, Docs, or Slides MIME type creates an unreachable empty shell — use the service-specific APIs to create and populate content:
Comment thread
nuthalapativarun marked this conversation as resolved.
Outdated
>
> | Goal | Step 1 — create | Step 2 — write content |
> |------|-----------------|----------------------|
> | Spreadsheet | `gws sheets spreadsheets create` → returns `spreadsheetId` | `gws sheets spreadsheets values batchUpdate` |
> | Google Doc | `gws docs documents create` → returns `documentId` | `gws docs documents batchUpdate` |
> | Slides presentation | `gws slides presentations create` → returns `presentationId` | `gws slides presentations batchUpdate` |
>
> Note: the `create` calls for Docs and Slides also produce blank files; any content in the request body is ignored by those APIs. Always follow with a `batchUpdate` call to insert content.
>
> Only use `drive files create` when uploading binary/non-Google file types (e.g. PDF, PNG, CSV) or creating plain empty containers like folders.

## API Resources

### about
Expand Down
Loading