Coda
by @0x7466
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.
clawhub install codaπ About This Skill
name: coda description: 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.
Coda API Skill
Interact with the Coda REST API v1 to manage docs, tables, rows, pages, and automations.
When to Use
Use this skill when the user wants to:
When NOT to Use
Prerequisites
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
CLI Tool Usage
The skill includes a Python CLI tool at scripts/coda_cli.py:
# Setup
export CODA_API_TOKEN="your_token_here"List docs
python scripts/coda_cli.py docs list --query "Project"Get doc info
python scripts/coda_cli.py docs get Create doc
python scripts/coda_cli.py docs create --title "My New Doc"List tables in doc
python scripts/coda_cli.py tables list List rows in table
python scripts/coda_cli.py rows list Insert row
python scripts/coda_cli.py rows insert --data '{"Name": "Task 1", "Status": "Done"}'Update row
python scripts/coda_cli.py rows update --data '{"Status": "In Progress"}'Delete row (requires confirmation)
python scripts/coda_cli.py rows delete List pages
python scripts/coda_cli.py pages list Trigger automation (push button)
python scripts/coda_cli.py automations trigger Force delete without confirmation (use with caution)
python scripts/coda_cli.py docs delete --force
Workflow Guidelines
1. Doc ID Extraction
Coda doc IDs can be extracted from browser URLs:https://coda.io/d/_dAbCDeFGH/Project-TrackerAbCDeFGH (remove _d prefix)The CLI tool accepts both full URLs and raw IDs.
2. Rate Limit Handling
The API has strict rate limits:The CLI tool automatically implements exponential backoff for 429 responses.
3. Asynchronous Operations
Write operations return HTTP 202 with arequestId. The CLI tool optionally polls for completion using --wait flag.4. Safety Guardrails
Delete Operations (rows, docs, pages, folders):
--force flag only in automation/scriptsPublishing (docs publish):
--confirm-publish flag--forcePermissions (acl commands):
--confirm-permissions flag for any changesAutomation Triggers:
5. Pagination
List commands support:--limit: Maximum results (default 25, max varies by endpoint)--page-token: For fetching subsequent pages--all flagCommon Patterns
Batch Row Operations
# Insert multiple rows from JSON file
python scripts/coda_cli.py rows insert-batch --file rows.jsonUpsert rows (update if exists, insert if not) using key columns
python scripts/coda_cli.py rows upsert --file rows.json --keys "Email"
Sync Between Docs
# Export from source
python scripts/coda_cli.py rows list --format json > export.jsonImport to destination
python scripts/coda_cli.py rows insert-batch --file export.json
Explore Structure
# Get full doc structure
python scripts/coda_cli.py docs structure List all formulas
python scripts/coda_cli.py formulas list List all controls
python scripts/coda_cli.py controls list
Error Handling
Common HTTP status codes:
400: Bad request (invalid parameters)401: Invalid/expired API token403: Insufficient permissions (need Doc Maker role)404: Resource not found429: Rate limited (implement backoff)202: Accepted but not yet processed (async operation)Security Considerations
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
Examples
List and Filter Docs
python scripts/coda_cli.py docs list --is-owner --query "Project"
Create Doc from Template
python scripts/coda_cli.py docs create --title "Q4 Planning" --source-doc "template-doc-id"
Update Row Status
python scripts/coda_cli.py rows update AbCDeFGH grid-xyz row-123 \
--data '{"Status": "Complete", "Completed Date": "2024-01-15"}'
Delete Multiple Rows (with confirmation)
python scripts/coda_cli.py rows delete-batch AbCDeFGH grid-xyz \
--filter '{"Status": "Archived"}' \
--confirm "Delete all archived rows?"
Export Table to CSV
python scripts/coda_cli.py rows list AbCDeFGH grid-xyz --format csv > export.csv
Reference
β‘ When to Use
π‘ Examples
List and Filter Docs
python scripts/coda_cli.py docs list --is-owner --query "Project"
Create Doc from Template
python scripts/coda_cli.py docs create --title "Q4 Planning" --source-doc "template-doc-id"
Update Row Status
python scripts/coda_cli.py rows update AbCDeFGH grid-xyz row-123 \
--data '{"Status": "Complete", "Completed Date": "2024-01-15"}'
Delete Multiple Rows (with confirmation)
python scripts/coda_cli.py rows delete-batch AbCDeFGH grid-xyz \
--filter '{"Status": "Archived"}' \
--confirm "Delete all archived rows?"
Export Table to CSV
python scripts/coda_cli.py rows list AbCDeFGH grid-xyz --format csv > export.csv
βοΈ Configuration
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