Airtable + pushplus:记录变化推到微信
效果:表里新增一行,或关键字段被改写后,微信收到你在脚本里拼好的记录摘要。
Airtable 没有内置 pushplus。用 Automations 里的脚本发 JSON。不要把「Send webhook」收到的 Airtable 原样 JSON 直接指向 /send,那些字段不会映射成 title / content。
前置条件
- 一个 pushplus token(官网扫码获取)
- 能编辑该 Base 的 Automations(脚本动作需相应权限)
配置步骤
- 打开 Base → 右上角 Automations → Create automation。
- Trigger 选 When a record is created,或 When a record matches conditions(例如状态改为「已成交」)。
- Action 选 Run a script。用
input.config()传入记录字段,再用remoteFetchAsyncPOST:
let cfg = input.config();
let res = await remoteFetchAsync("https://www.pushplus.plus/send", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
token: cfg.token,
title: "Airtable 记录更新",
content: "名称:" + cfg.name + "\n状态:" + cfg.status,
template: "markdown"
})
});
console.log(await res.text());
- 在脚本右侧 Input variables 绑定:
token、以及表里的name/status等字段。content必填。 - Test action,确认返回
code为200,再打开自动化。
只能填一个 Webhook URL 时,用 GET 固定文案(动态字段请仍用脚本):
https://www.pushplus.plus/send?token=你的token&title=Airtable有更新&content=请打开Airtable查看
完整字段见 消息接口。
验证
curl -X POST "https://www.pushplus.plus/send" \
-H "Content-Type: application/json" \
-d '{"token":"你的token","title":"Airtable 配置测试","content":"token 可用","template":"markdown"}'
常见问题
脚本报 fetch 未定义? 自动化脚本请用 remoteFetchAsync,不要用浏览器里的 fetch。
测试成功但没推到微信? 查额度与网络,见 收不到消息、接口限制。
怕刷屏? 把 Trigger 收成「字段等于某值」,不要对每一次单元格编辑都开火。