360 Secure SkillHub
360 安全技能中心

Native Airtable

这是直接调用Airtable官方API的读数据工具,无需第三方代理。核心功能包括列出可访问的基地、基地内表格、表格记录,支持筛选、指定字段、视图、搜索及获取单条记录等操作。需先配置Personal Access Token(PAT)作为环境变量授权,通过Python脚本执行命令行指令,适用于提取Airtable表格/数据库数据的场景,免费版也可用。

codeninja23
codeninja23
热度 81.83
最近更新 2026-05-17 12:40:41
分类:数据依赖:代码执行 / 第三方 API / 读写文件应用场景:数据处理 / API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add native-airtable
Metadata
name
airtable
description
Read Airtable bases, tables, and records directly via the Airtable API. Use when you need spreadsheet/database data from Airtable. Calls api.airtable.com directly with no third-party proxy.
metadata
{"openclaw":{"requires":{"env":["AIRTABLE_PAT"],"bins":["python3"]},"primaryEnv":"AIRTABLE_PAT","files":["scripts/*"]}}

Airtable

Read bases, tables, and records directly via api.airtable.com.

Setup (one-time)

  1. Go to https://airtable.com/create/tokens
  2. Click + Create new token, give it a name
  3. Add scopes:
    • data.records:read
    • schema.bases:read
  4. Under Access, select which bases to grant access to (or all)
  5. Copy the token — it starts with pat
  6. Set the environment variable:
    AIRTABLE_PAT=pat_your_token_here
    

Commands

List all accessible bases

python3 /mnt/skills/user/airtable/scripts/airtable.py list-bases

List tables in a base

python3 /mnt/skills/user/airtable/scripts/airtable.py list-tables <base_id>

List records in a table

python3 /mnt/skills/user/airtable/scripts/airtable.py list-records <base_id> "Table Name"
python3 /mnt/skills/user/airtable/scripts/airtable.py list-records <base_id> "Table Name" --limit 50

Filter records with a formula

python3 /mnt/skills/user/airtable/scripts/airtable.py list-records <base_id> "Tasks" --filter "{Status}='Done'"
python3 /mnt/skills/user/airtable/scripts/airtable.py list-records <base_id> "Contacts" --filter "NOT({Email}='')"

Filter to specific fields only

python3 /mnt/skills/user/airtable/scripts/airtable.py list-records <base_id> "People" --fields "Name,Email,Company"

Use a specific view

python3 /mnt/skills/user/airtable/scripts/airtable.py list-records <base_id> "Tasks" --view "Active Tasks"

Get a specific record

python3 /mnt/skills/user/airtable/scripts/airtable.py get-record <base_id> "Table Name" <record_id>

Search records

python3 /mnt/skills/user/airtable/scripts/airtable.py search-records <base_id> "Contacts" "Smith"
python3 /mnt/skills/user/airtable/scripts/airtable.py search-records <base_id> "Contacts" "smith@acme.com" --field "Email"

Notes

  • Free plan: unlimited bases, 1,000 records per base. API reads work on free.
  • Base IDs start with app, record IDs start with rec.
  • Table names are case-sensitive and must match exactly. Use quotes if the name has spaces.
  • Airtable deprecated old API keys in Feb 2024. Only Personal Access Tokens (PAT) work now.