🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Teable

by @killgfat

Manage Teable resources with full CRUD for records, bases, spaces, tables, dashboards, and trash via API and command-line scripts.

πŸ’‘ Examples

Create a Record with Typecast

# Enable typecast for automatic type conversion
python3 scripts/teable_record.py create \
  --table-id "tblABC123" \
  --fields '{"Name":"John","Age":"30","Completed":"yes","DueDate":"2024-01-15"}' \
  --typecast

Batch Create Records

python3 scripts/teable_record.py create \
  --table-id "tblABC123" \
  --fields '[{"Name":"Alice"},{"Name":"Bob"},{"Name":"Charlie"}]'

List Records with Pagination

# Get first 100 records
python3 scripts/teable_record.py list --table-id "tblABC123" --take 100

Get next 100 (skip first 100)

python3 scripts/teable_record.py list --table-id "tblABC123" --take 100 --skip 100

Filter and Sort Records

python3 scripts/teable_record.py list \
  --table-id "tblABC123" \
  --filter '{"operator":"and","filterSet":[{"fieldId":"fld1","operator":"is","value":"Active"}]}' \
  --order-by '[{"fieldId":"fld2","order":"asc"}]'

Complete Workflow Example

# 1. Create a space
python3 scripts/teable_space.py create --name "Project Alpha" --icon "πŸš€"

2. Create a base in the space

python3 scripts/teable_base.py create --space-id "spcXXX" --name "Task Manager"

3. Create a table in the base

python3 scripts/teable_table.py create --base-id "bseXXX" --name "Tasks"

4. Add records

python3 scripts/teable_record.py create \ --table-id "tblXXX" \ --fields '{"Task":"Design","Status":"In Progress","Priority":"High"}'

βš™οΈ Configuration

Install the required Python package:

pipx install requests

or globally

pip3 install requests

Environment Variables

Required: Set the TEABLE_API_KEY environment variable before using any scripts:

# Temporary (current shell session)
export TEABLE_API_KEY="your_personal_access_token_here"

Permanent (add to ~/.bashrc or ~/.zshrc)

echo 'export TEABLE_API_KEY="your_personal_access_token_here"' >> ~/.bashrc source ~/.bashrc

Getting Your Teable API Token: 1. Log in to your Teable instance 2. Go to Settings β†’ Access Token 3. Create a new Personal Access Token 4. Copy and save the token (shown only once)

Optional: For self-hosted Teable instances, set TEABLE_URL:

export TEABLE_URL="https://your-teable-instance.com"

Default: https://app.teable.ai

πŸ“‹ Tips & Best Practices

401 Unauthorized

Check that TEABLE_API_KEY is correctly set:

echo $TEABLE_API_KEY

403 Forbidden

Your token lacks the required permissions. Create a new token with appropriate scopes in Teable settings.

404 Not Found

Verify that IDs are correct (spaceId, baseId, tableId, recordId, etc.) and match the expected format.

Connection Timeout

  • Self-hosted users: Check that TEABLE_URL is accessible
  • Users in mainland China accessing official API: Use proxychains
  •   proxychains python3 scripts/teable_record.py list --table-id "tblXXX"
      

    Typecast Not Working

    Ensure the --typecast flag is included in your command:

    python3 scripts/teable_record.py create \
      --table-id "tblXXX" \
      --fields '{"Age":"30"}' \
      --typecast  # Required for string-to-number conversion
    

    View on ClawHub
    TERMINAL
    clawhub install teable-api

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’