Documents

Documents, spreadsheets, and exports to Google Sheets.

The Documents superskill gives your AI agent a structured workspace for creating and managing content. Write rich-text pages in Markdown, build structured data sheets with typed columns, and export to Google Sheets, Excel, or CSV when you need to share. Research results, video transcripts, and reports are automatically saved as searchable document pages — creating a growing knowledge base your agent can reference across tasks.

What your agent can do

Capabilities available out of the box.

  • Create and edit rich-text document pages in Markdown
  • Build structured data sheets with typed columns and inline editing
  • Export sheets to Google Sheets with automatic formatting
  • Export sheet data to Excel or CSV
  • Store research results, transcripts, and reports as searchable pages
  • Manage documents across brands with full CRUD operations

Integrations

Platforms and services your agent connects to.

Google SheetsGoogle Sheets

Commands

CLI commands available with this superskill.

Create Page

Create a new document.

clawpow documents pages create
List Pages

List documents, optionally filtered by type.

clawpow documents pages list
Get Page

Get full document content by ID.

clawpow documents pages get
Update Page

Update a document's title or body.

clawpow documents pages update
Delete Page

Delete a document.

clawpow documents pages delete
Create Sheet

Create a new sheet with typed columns and optional initial rows.

clawpow documents sheets create
List Sheets

List sheets.

clawpow documents sheets list
Get Sheet

Get sheet with columns and rows.

clawpow documents sheets get
Update Sheet

Update sheet title, columns, or rows.

clawpow documents sheets update
Add Rows

Append rows to an existing sheet.

clawpow documents sheets add-rows
Update Rows

Update specific rows by index.

clawpow documents sheets update-rows
Delete Rows

Delete rows by index.

clawpow documents sheets delete-rows
Delete Sheet

Delete a sheet.

clawpow documents sheets delete <sheetId>
Export to Google Docs

Export a page to Google Docs. Requires connected Google account.

clawpow documents pages export google-docs
Export to Google Sheets

Export a sheet to Google Sheets. Requires connected Google account.

clawpow documents sheets export google-sheets
Export to Excel

Export a sheet to Excel (.xlsx).

clawpow documents sheets export xlsx
Export to CSV

Export a sheet to CSV (.csv).

clawpow documents sheets export csv
Skill Reference
# Documents

Store and manage markdown pages, structured data sheets, and exportable spreadsheets.

## When to Use
- User wants to save research findings, meeting notes, or reference material
- User needs to draft long-form content before publishing elsewhere
- User wants to create structured data sheets with typed columns
- User needs to export data to Google Sheets, Excel, or CSV
- User wants to organize information for later reference

## How It Connects
- **Research** → Deep research results are automatically saved as document pages.
- **Video** → Video transcriptions are stored as document pages.
- **Blog** → Draft articles in documents, then publish via the blog skill.
- **Newsletter** → Draft newsletter content in documents before creating a newsletter.
- **Tasks** → Reference documents when proposing tasks for approval.

## Quick Start

List existing documents:
```bash
clawpow documents pages list --json
```

Create a new document:
```bash
clawpow documents pages create --title "My Document" --json
```

## Commands

### Create a Page
```bash
clawpow documents pages create --title "My Document" --json
```
**Options:**
- `--title <text>` (optional) -- Document title. Defaults to "Untitled" if omitted.

**Returns:** The document ID as a string.

### List Pages
```bash
clawpow documents pages list --json
clawpow documents pages list --type page --json
clawpow documents pages list --limit 25 --cursor <cursor> --json
```
**Options:**
- `--type <type>` -- Filter by document type: page, sheet, presentation
- `--limit <number>` -- Maximum number of results (default 25)
- `--cursor <cursor>` -- Pagination cursor from a previous response

**Returns:** `{"page": [...], "isDone": boolean, "continueCursor": "..."}`

Each document in the array: `{_id, title, type, updatedAt, _creationTime}`

### Get a Page
```bash
clawpow documents pages get <docId> --json
```
**Options:**
- `<docId>` (required, positional) -- Document ID

**Returns:** Full document object: `{_id, title, body, type, updatedAt, _creationTime}`

### Update a Page
```bash
clawpow documents pages update <docId> --title "New Title" --json
clawpow documents pages update <docId> --body "New content" --json
clawpow documents pages update <docId> --body-file ./content.md --json
```
**Options:**
- `<docId>` (required, positional) -- Document ID
- `--title <text>` -- New title
- `--body <text>` -- New body content (markdown)
- `--body-file <path>` -- Read body content from a file

At least one of `--title`, `--body`, or `--body-file` is required. Returns null on success.

### Delete Pages
```bash
clawpow documents pages delete <docId> --json
clawpow documents pages delete id1,id2,id3 --json
```
**Options:**
- `<docIds>` (required, positional) -- Document ID or comma-separated IDs for batch delete

**Returns:** `{"deleted": [...], "errors": [...]}`

## Pagination

List commands support pagination via `--limit` and `--cursor`:
- `--limit <number>` -- Number of items per page (maps to `paginationOpts.numItems`)
- `--cursor <cursor>` -- Cursor from a previous response (maps to `paginationOpts.cursor`)

When `isDone` is `false`, use the `continueCursor` value as `--cursor` in the next request to fetch the next page.

## Important Notes

- Always use `--json` for machine-parseable output
- Document IDs are Convex document IDs (e.g., "k57abc123def")
- Valid document types: `page`, `sheet`, `presentation`
- Use `--body-file` to update a document with content from a local file instead of inline text
- Batch delete accepts comma-separated IDs as a positional argument
- All write operations (create, update, delete) are tracked mutations

## Sheets

Structured tabular data with typed columns and export capabilities.

### Create a Sheet
```bash
clawpow documents sheets create --title "Q1 Revenue" --columns '[{"id":"company","label":"Company","type":"text"},{"id":"revenue","label":"Revenue","type":"currency"}]' --json
clawpow documents sheets create --title "Leads" --columns '[{"id":"name","label":"Name","type":"text"},{"id":"status","label":"Status","type":"select","options":["New","Contacted","Qualified"]}]' --rows '[{"name":"Acme","status":"New"}]' --json
```
**Options:**
- `--title <text>` (optional) -- Sheet title. Defaults to "Untitled Sheet".
- `--columns <json>` (required) -- Column definitions as JSON array. Each column: `{id, label, type}`. Types: text, number, currency, select, date, boolean. Select columns require `options` array.
- `--rows <json>` (optional) -- Initial rows as JSON array of objects keyed by column id.

**Returns:** `{"id": "...", "title": "...", "columns": 2, "rows": 0}`

### List Sheets
```bash
clawpow documents sheets list --json
```
**Options:**
- `--limit <number>` -- Max results (default 25)
- `--cursor <cursor>` -- Pagination cursor

**Returns:** `{"page": [...], "isDone": boolean, "continueCursor": "..."}`

### Get a Sheet
```bash
clawpow documents sheets get <sheetId> --json
```
**Returns:** `{_id, title, columns: [...], rows: [...], updatedAt, _creationTime}`

### Add Rows
```bash
clawpow documents sheets add-rows <sheetId> --rows '[{"company":"Globex","revenue":12000}]' --json
```
**Options:**
- `<sheetId>` (required, positional) -- Sheet ID
- `--rows <json>` (required) -- Rows to append as JSON array

**Returns:** `{"id": "...", "rowsAdded": 1, "totalRows": 2}`

### Update Rows
```bash
clawpow documents sheets update-rows <sheetId> --updates '[{"index":0,"data":{"revenue":55000}}]' --json
```
**Options:**
- `<sheetId>` (required, positional) -- Sheet ID
- `--updates <json>` (required) -- Array of `{index, data}` objects. Index is 0-based. Data is partial -- only specified fields are updated.

### Delete Rows
```bash
clawpow documents sheets delete-rows <sheetId> --indexes 0,2,5 --json
```
**Options:**
- `<sheetId>` (required, positional) -- Sheet ID
- `--indexes <numbers>` (required) -- Comma-separated 0-based row indexes

**Returns:** `{"id": "...", "rowsDeleted": 3, "totalRows": 7}`

### Delete a Sheet
```bash
clawpow documents sheets delete <sheetId> --json
clawpow documents sheets delete <sheetId> -y --json
```
**Options:**
- `<sheetId>` (required, positional) -- Sheet ID
- `-y, --yes` -- Skip confirmation prompt

**Returns:** `{"sheetId": "...", "deleted": true}`

### Export to Google Sheets
```bash
clawpow documents sheets export google-sheets <sheetId> --json
```
**Options:**
- `<sheetId>` (required, positional) -- Sheet ID

**Requires:** Connected Google account (connect at app.clawpow.com/studio/accounts).

**Returns:** `{"spreadsheetId": "...", "spreadsheetUrl": "https://docs.google.com/..."}`

### Export to Excel
```bash
clawpow documents sheets export xlsx <sheetId> --json
```
**Options:**
- `<sheetId>` (required, positional) -- Sheet ID

**Returns:** `{"assetId": "...", "url": "https://assets.clawpow.com/...", "filename": "....xlsx"}`

### Export to CSV
```bash
clawpow documents sheets export csv <sheetId> --json
```
**Options:**
- `<sheetId>` (required, positional) -- Sheet ID

**Returns:** `{"assetId": "...", "url": "https://assets.clawpow.com/...", "filename": "....csv"}`

## Column Types

| Type | Description | Example Value |
|------|-------------|---------------|
| text | Free text | "Acme Corp" |
| number | Numeric value | 42 |
| currency | Money amount | 50000 |
| select | One of predefined options | "Active" |
| date | ISO date string | "2025-03-15" |
| boolean | True/false | true |

## Workflow Example

Build a sheet incrementally, then export:

```bash
# 1. Create sheet with columns
ID=$(clawpow documents sheets create --title "Q1 Clients" --columns '[{"id":"name","label":"Client","type":"text"},{"id":"revenue","label":"Revenue","type":"currency"},{"id":"status","label":"Status","type":"select","options":["Active","Churned"]}]' --json | jq -r '.id')

# 2. Add rows as data becomes available
clawpow documents sheets add-rows $ID --rows '[{"name":"Acme","revenue":50000,"status":"Active"}]' --json
clawpow documents sheets add-rows $ID --rows '[{"name":"Globex","revenue":12000,"status":"Churned"}]' --json

# 3. Export to Google Sheets
clawpow documents sheets export google-sheets $ID --json
```

Related superskills

Works great together with these.