Baserow Skill
Use Baserow REST API directly via Python stdlib (urllib). API docs: https://baserow.ericbone.me/api-docs/database/265
Local auth convention (this workspace)
Primary env vars in ~/.openclaw/.env:
- - INLINECODE2
- INLINECODE3 (static; no expiry)
Auth header for DB calls:
CODEBLOCK0
Core API patterns
Base endpoint:
CODEBLOCK1
Always include: INLINECODE4
Renpho CRM table map (DB 265)
- -
827 Sales Pipeline (BD Opportunity table) - INLINECODE6 Opportunity Line Items
- INLINECODE7 Contacts
- INLINECODE8 Interactions
- INLINECODE9 Account Execution
Operating conventions (Renpho)
- - For inbound/outbound emails that are active deal motion: log in Interactions (830) and link Contact + Opportunity.
- Create/update a Sales Pipeline (827) opportunity for real BD opportunities.
- BD Inbox field can be used for intake linkage when that inbox object is present, but in-progress opportunity work should still live in Pipeline + Interactions.
- Keep Interactions to real sales interactions (no LinkedIn enrichment spam).
⚠️ Critical: .env Must Have Real Newlines
The .env file must use real newlines between vars, NOT \n literals:
CODEBLOCK2
If written by an agent (e.g. write tool), verify with cat ~/.openclaw/.env — literal \n breaks export $(grep ...) silently.
⚠️ Use curl for Writes (PATCH/POST), Python for Reads
Python urllib returns 403 on PATCH/POST against this Baserow instance. Use curl for all writes. Python urllib is fine for GET/reads.
Minimal examples
List rows (Python OK for reads)
CODEBLOCK3
Create row (use curl)
CODEBLOCK4
Update row (use curl)
CODEBLOCK5
Safety
- - Confirm table + row targets before bulk updates/deletes.
- Prefer small scoped updates and echo changed fields.
- Treat Baserow as source-of-truth for Renpho sales workflow (DB 265).
Baserow 技能
通过 Python 标准库(urllib)直接使用 Baserow REST API。API 文档:https://baserow.ericbone.me/api-docs/database/265
本地认证约定(此工作区)
~/.openclaw/.env 中的主要环境变量:
- - BASEROWBASEURL=https://baserow.ericbone.me
- BASEROW_TOKEN=<个人 API 令牌>(静态;无过期时间)
数据库调用的认证头:
Authorization: Token
核心 API 模式
基础端点:
$BASEROWBASEURL/api/database/rows/table/{table_id}/
始终包含:?userfieldnames=true
Renpho CRM 表映射(数据库 265)
- - 827 销售管道(BD 机会表)
- 828 机会行项目
- 829 联系人
- 830 互动记录
- 831 账户执行
操作约定(Renpho)
- - 对于处于活跃交易推进中的入站/出站邮件:记录在互动记录(830)中,并关联联系人和机会。
- 为真实的 BD 机会创建/更新销售管道(827)中的机会。
- 当收件箱对象存在时,BD 收件箱字段可用于接收链接,但进行中的机会工作仍应保留在管道和互动记录中。
- 将互动记录限制为真实的销售互动(不要 LinkedIn 信息填充垃圾)。
⚠️ 关键:.env 必须使用真实换行符
.env 文件必须在变量之间使用真实换行符,而不是 \n 字面量:
BASEROWBASEURL=https://baserow.ericbone.me
BASEROW_TOKEN=mOsuizlNhyUWclr7xKjIgxJxdMPVmkNy
如果由代理(例如 write 工具)编写,请使用 cat ~/.openclaw/.env 验证——字面量 \n 会静默破坏 export $(grep ...)。
⚠️ 写入操作使用 curl(PATCH/POST),读取操作使用 Python
Python urllib 对此 Baserow 实例执行 PATCH/POST 时返回 403。所有写入操作请使用 curl。 Python urllib 适用于 GET/读取操作。
最小示例
列出行(Python 适用于读取)
bash
export $(grep -v ^# ~/.openclaw/.env | xargs) && python3 - <
BASEURL].rstrip(/)
token=os.environ[BASEROW_TOKEN]
table=829
url=f{base}/api/database/rows/table/{table}/?userfieldnames=true&size=50
req=urllib.request.Request(url, headers={Authorization: fToken {token}})
with urllib.request.urlopen(req, timeout=30) as r:
print(json.dumps(json.load(r), indent=2)[:8000])
PY
创建行(使用 curl)
bash
source ~/.openclaw/.env # 或从 .env 导出
curl -s -X POST \
-H Authorization: Token $BASEROW_TOKEN \
-H Content-Type: application/json \
-d {Interaction title:示例,Type:Email,Sales Pipeline:[5],Contact:[3]} \
$BASEROWBASEURL/api/database/rows/table/830/?userfieldnames=true
更新行(使用 curl)
bash
source ~/.openclaw/.env
curl -s -X PATCH \
-H Authorization: Token $BASEROW_TOKEN \
-H Content-Type: application/json \
-d {Blockers:已更新的障碍文本,Last Touch:2026-02-24} \
$BASEROWBASEURL/api/database/rows/table/827/5/?userfieldnames=true
安全
- - 在进行批量更新/删除前,确认表和行目标。
- 优先使用小范围更新并回显更改的字段。
- 将 Baserow 视为 Renpho 销售工作流(数据库 265)的数据源。