zapier
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTroubleshooting
故障排查
If requests fail, run or
zero doctor check-connector --env-name ZAPIER_TOKENzero doctor check-connector --url https://actions.zapier.com/api/v2/check/ --method GET如果请求失败,请运行 或
zero doctor check-connector --env-name ZAPIER_TOKENzero doctor check-connector --url https://actions.zapier.com/api/v2/check/ --method GETHow to Use
使用方法
All examples below assume you have set. Authentication uses the header.
ZAPIER_TOKENx-api-key以下所有示例均假设你已设置 。认证使用 请求头。
ZAPIER_TOKENx-api-key1. Check API Key
1. 检查API密钥
Verify that your API key is valid.
bash
curl -s "https://actions.zapier.com/api/v2/check/" --header "x-api-key: $ZAPIER_TOKEN" | jq .验证你的API密钥是否有效。
bash
curl -s "https://actions.zapier.com/api/v2/check/" --header "x-api-key: $ZAPIER_TOKEN" | jq .2. List Exposed Actions
2. 列出已暴露的操作
Retrieve all actions you have configured and exposed in your Zapier AI Actions dashboard.
bash
curl -s "https://actions.zapier.com/api/v1/exposed/" --header "x-api-key: $ZAPIER_TOKEN" | jq '.results[] | {id, description, params}'检索你在Zapier AI Actions控制台中配置并暴露的所有操作。
bash
curl -s "https://actions.zapier.com/api/v1/exposed/" --header "x-api-key: $ZAPIER_TOKEN" | jq '.results[] | {id, description, params}'3. Execute an AI Action
3. 执行AI操作
Execute a configured action using natural language instructions. Replace with the action ID from the list above.
ACTION_IDbash
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 .使用自然语言指令执行已配置的操作。将 替换为上述列表中的操作ID。
ACTION_IDbash
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 .4. Execute with Parameter Hints
4. 带参数提示执行
Supply parameter hints to guide the AI in filling action fields. Supported modes: (use exact value), (AI matches text), (AI selects from list), (skip parameter).
lockedguesschoose_fromignoredWrite to :
/tmp/zapier_request.jsonjson
{
"instructions": "Send an email about the weekly report",
"params": {
"to": {
"mode": "locked",
"value": "team@example.com"
},
"subject": {
"mode": "locked",
"value": "Weekly Report"
}
}
}Then run:
bash
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 @/tmp/zapier_request.json | jq .提供参数提示以引导AI填充操作字段。支持的模式:(使用精确值)、(AI匹配文本)、(AI从列表中选择)、(跳过参数)。
lockedguesschoose_fromignored写入 :
/tmp/zapier_request.jsonjson
{
"instructions": "Send an email about the weekly report",
"params": {
"to": {
"mode": "locked",
"value": "team@example.com"
},
"subject": {
"mode": "locked",
"value": "Weekly Report"
}
}
}然后运行:
bash
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 @/tmp/zapier_request.json | jq .5. Preview an Action (Dry Run)
5. 预览操作(试运行)
Preview what the action would do without actually executing it. Add as a query parameter.
preview_only=truebash
curl -s -X POST "https://actions.zapier.com/api/v2/ai-actions/ACTION_ID/execute/?preview_only=true" --header "Content-Type: application/json" --header "x-api-key: $ZAPIER_TOKEN" -d '{"instructions": "Create a new row in the Sales spreadsheet with name John and amount 500"}' | jq .预览操作的执行结果而不实际运行它。添加 作为查询参数。
preview_only=truebash
curl -s -X POST "https://actions.zapier.com/api/v2/ai-actions/ACTION_ID/execute/?preview_only=true" --header "Content-Type: application/json" --header "x-api-key: $ZAPIER_TOKEN" -d '{"instructions": "Create a new row in the Sales spreadsheet with name John and amount 500"}' | jq .6. Execute a V1 Exposed Action
6. 执行V1版本的暴露操作
Execute an action using the V1 endpoint. Replace with the exposed action ID.
ACTION_IDbash
curl -s -X POST "https://actions.zapier.com/api/v1/dynamic/exposed/ACTION_ID/execute/" --header "Content-Type: application/json" --header "x-api-key: $ZAPIER_TOKEN" -d '{"instructions": "Send a Slack message to #dev saying deployment complete"}' | jq .使用V1端点执行操作。将 替换为暴露的操作ID。
ACTION_IDbash
curl -s -X POST "https://actions.zapier.com/api/v1/dynamic/exposed/ACTION_ID/execute/" --header "Content-Type: application/json" --header "x-api-key: $ZAPIER_TOKEN" -d '{"instructions": "Send a Slack message to #dev saying deployment complete"}' | jq .Guidelines
使用指南
- Configure actions first: Before using the API, you must configure and enable actions in the Zapier AI Actions dashboard. The API can only execute actions you have set up
- Use natural language: The field accepts plain English descriptions of what you want to do. The AI interprets and maps instructions to the correct action parameters
instructions - Parameter modes: Use mode when you know the exact value,
lockedwhen the AI should match text to available options, andguessto provide a list of valid IDschoose_from - Preview before executing: Use to verify the AI correctly interprets your instructions before running the action
preview_only=true - Response statuses: Check the field in responses - values are
status,success,error, oremptypreview - Rate limits: Zapier enforces rate limits on API calls. Implement backoff if you receive HTTP 429 responses
- Action IDs: Each configured action has a unique ID. Use the list endpoint to discover available action IDs
- 先配置操作:在使用API之前,你必须在 Zapier AI Actions控制台 中配置并启用操作。API只能执行你已设置好的操作
- 使用自然语言:字段接受你想要执行操作的普通英文描述。AI会解析并将指令映射到正确的操作参数
instructions - 参数模式:当你知道精确值时使用 模式,当AI需要将文本与可用选项匹配时使用
locked模式,使用guess模式来提供有效ID列表choose_from - 执行前预览:使用 在运行操作前验证AI是否正确解析了你的指令
preview_only=true - 响应状态:检查响应中的 字段——值包括
status、success、error或emptypreview - 速率限制:Zapier对API调用实施速率限制。如果收到HTTP 429响应,请实现退避机制
- 操作ID:每个已配置的操作都有唯一ID。使用列表端点查看可用的操作ID