General-purpose Coda document manager via REST API v1. Supports listing/creating/updating/deleting docs, managing tables/rows/pages, triggering automations, and exploring doc structure. Requires CODA_API_TOKEN environment variable. Delete operations require explicit confirmation; publishing and permission changes require explicit user intent.
Interact with the Coda REST API v1 to manage docs, tables, rows, pages, and automations.
Use this skill when the user wants to:
1. **API Token**: Set environment variable `CODA_API_TOKEN` with your Coda API token
- Get token at: https://coda.io/account -> API Settings
2. **Python 3.7+** with `requests` library installed
3. **Permissions**: Some operations (create doc, update doc title, create page) require Doc Maker role in the workspace
The skill includes a Python CLI tool at `scripts/coda_cli.py`:
```bash
export CODA_API_TOKEN="your_token_here"
python scripts/coda_cli.py docs list --query "Project"
python scripts/coda_cli.py docs get <doc-id>
python scripts/coda_cli.py docs create --title "My New Doc"
python scripts/coda_cli.py tables list <doc-id>
python scripts/coda_cli.py rows list <doc-id> <table-id>
python scripts/coda_cli.py rows insert <doc-id> <table-id> --data '{"Name": "Task 1", "Status": "Done"}'
python scripts/coda_cli.py rows update <doc-id> <table-id> <row-id> --data '{"Status": "In Progress"}'
python scripts/coda_cli.py rows delete <doc-id> <table-id> <row-id>
python scripts/coda_cli.py pages list <doc-id>
python scripts/coda_cli.py automations trigger <doc-id> <button-id>
python scripts/coda_cli.py docs delete <doc-id> --force
```
Coda doc IDs can be extracted from browser URLs:
The CLI tool accepts both full URLs and raw IDs.
The API has strict rate limits:
The CLI tool automatically implements exponential backoff for 429 responses.
Write operations return HTTP 202 with a `requestId`. The CLI tool optionally polls for completion using `--wait` flag.
**Delete Operations** (rows, docs, pages, folders):
**Publishing** (`docs publish`):
**Permissions** (`acl` commands):
**Automation Triggers**:
List commands support:
```bash
python scripts/coda_cli.py rows insert-batch <doc-id> <table-id> --file rows.json
python scripts/coda_cli.py rows upsert <doc-id> <table-id> --file rows.json --keys "Email"
```
```bash
python scripts/coda_cli.py rows list <source-doc> <table-id> --format json > export.json
python scripts/coda_cli.py rows insert-batch <dest-doc> <table-id> --file export.json
```
```bash
python scripts/coda_cli.py docs structure <doc-id>
python scripts/coda_cli.py formulas list <doc-id>
python scripts/coda_cli.py controls list <doc-id>
```
Common HTTP status codes:
1. **Token Storage**: Never commit `CODA_API_TOKEN` to version control
2. **Token Scope**: The token has full access to all docs the user can access
3. **Workspace Restrictions**: Creating docs requires Doc Maker role in target workspace
4. **Data Exposure**: Row data may contain sensitive information; handle exports carefully
```bash
python scripts/coda_cli.py docs list --is-owner --query "Project"
```
```bash
python scripts/coda_cli.py docs create --title "Q4 Planning" --source-doc "template-doc-id"
```
```bash
python scripts/coda_cli.py rows update AbCDeFGH grid-xyz row-123 \
--data '{"Status": "Complete", "Completed Date": "2024-01-15"}'
```
```bash
python scripts/coda_cli.py rows delete-batch AbCDeFGH grid-xyz \
--filter '{"Status": "Archived"}' \
--confirm "Delete all archived rows?"
```
```bash
python scripts/coda_cli.py rows list AbCDeFGH grid-xyz --format csv > export.csv
```
Leave a review
No reviews yet. Be the first to review this skill!