用途:通过 Zapier AI Actions API 触发已配置的工作流动作,实现跨应用自动化。需先设置环境变量 ZAPIER_TOKEN,认证使用 x-api-key 请求头。
主要能力:校验 API 密钥;列出 Zapier AI Actions 面板中已暴露的动作(含 id、description、params);用自然语言 instructions 执行 AI Action;提供参数提示;以预览模式试运行;执行 V1 暴露动作。
必要用法示例: 校验密钥:curl -s "https://actions.zapier.com/api/v2/check/" --header "x-api-key: $ZAPIER_TOKEN" | jq . 列出动作:curl -s "https://actions.zapier.com/api/v1/exposed/" --header "x-api-key: $ZAPIER_TOKEN" | jq '.results[] | {id, description, params}' 执行动作:curl -s -X POST "https://actions.zapier.com/api/v2/ai-actions/ACTION_ID/execute/" --header "Content-Type: application/json" --header "x-api-key: $ZAPIER_TOKEN" -d '{"instructions": "Send a message saying hello to the #general channel"}' | jq . 参数提示模式支持 locked、guess、choose_from、ignored;可把请求体写入 /tmp/zapier_request.json 后用 -d @/tmp/zapier_request.json 提交。预演时在 URL 加 ?preview_only=true。V1 执行端点:https://actions.zapier.com/api/v1/dynamic/exposed/ACTION_ID/execute/。
限制:必须先在 Zapier AI Actions 面板配置并启用动作,API 只能执行已设置的动作;instructions 使用自然语言描述;响应 status 为 success、error、empty 或 preview;有速率限制,遇 HTTP 429 需退避重试。故障排查可运行 zero doctor check-connector --env-name ZAPIER_TOKEN 或 zero doctor check-connector --url https://actions.zapier.com/api/v2/check/ --method GET。其他收费、价格与平台细节暂未提供。