每个应用需先执行 create-connection 完成浏览器 OAuth 授权,否则动作无法调用;CLI 需单独安装 @zapier/zapier-sdk-cli 开发依赖;使用 Zapier 服务与 API 受其服务条款约束,MIT 仅覆盖代码
sdk
zapierMIT活跃维护Zapier 官方 SDK 的配套资料库,提供供 AI Agent 直接读取的文档、经过验证的示例代码和技能清单,方便在自动化集成场景中接入 Zapier 的 API 与 OAuth 能力。
Agent-readable docs, verified examples, and skill manifest for @zapier/zapier-sdk
npm install @zapier/zapier-sdk
npm install -D @zapier/zapier-sdk-cli @types/node typescript
npx zapier-sdk loginREADME 未说明
通过 Zapier 托管 OAuth 凭据,让你的 agent 以编程方式调用 9000+ 应用的任意 API
Zapier 官方 SDK 的配套资料库,提供供 AI Agent 直接读取的文档、经过验证的示例代码和技能清单,方便在自动化集成场景中接入 Zapier 的 API 与 OAuth 能力。
核心能力
- 用 create-connection 为应用建立 OAuth 连接,代码不接触 token
- 用 run-action 按 app/action 名直接执行动作并传 JSON 输入
- 运行时从 Zapier 实时目录解析 action schema,避免硬编码
- 提供 by-app/by-domain/by-pattern 三类已验证示例索引
- 附带 agentskills.io 规范的 skill 与只读 explorer 子代理
容易踩的坑
暂无 release 数据(可能没有发版,或尚未同步)。
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Let your agent connect to anything. Zapier handles the keys.
Programmatic access to Zapier's full app ecosystem via @zapier/zapier-sdk on npm. Any API call, on behalf of a user.
This repo bundles the SDK's docs, verified examples, and installable agent skills.
Captured CLI output, replayed — not a mockup. The copyable commands are in Getting started below; the capture provenance lives in transcript.mjs.
Getting started
Prefer to let your AI coding assistant handle setup? Install as a plugin instead.
1. Install
npm install @zapier/zapier-sdk
npm install -D @zapier/zapier-sdk-cli @types/node typescript
2. Authenticate
Log in once. Your credentials get stored on your machine and picked up automatically the next time you call createZapierSdk().
npx zapier-sdk login
npx zapier-sdk get-profile
3. Connect an app
Every action needs a connection: an OAuth grant Zapier holds for the app you're calling. Add one (or several) for whichever apps you want to try. Each create-connection command opens a browser for OAuth.
npx zapier-sdk list-connections
npx zapier-sdk create-connection notion
npx zapier-sdk create-connection gmail
npx zapier-sdk create-connection google-sheets
npx zapier-sdk create-connection airtable
Any of Zapier's 9,000+ apps works. Swap notion for the slug you need.
4. Fire an action
Once you have a connection, run-action calls any action from the CLI.
# Search Notion pages by title
npx zapier-sdk run-action notion search page_by_title \
--inputs '{"title":"Meeting Notes","exact_match":"no"}'
# Search Gmail with the standard Gmail query syntax
npx zapier-sdk run-action gmail search message \
--inputs '{"query":"from:[email protected]"}'
# Look up a Google Sheets row by column value
npx zapier-sdk run-action google-sheets search lookup_row \
--inputs '{"spreadsheet":"<sheet-id>","worksheet":"<tab-id>","lookup_key":"Email","lookup_value":"[email protected]"}'
# Find an Airtable record by field
npx zapier-sdk run-action airtable search findRecord \
--inputs '{"applicationId":"<base-id>","tableName":"Leads","searchByField":"Email","searchByValue":"[email protected]"}'
See more actions in examples/by-app/. Full API reference at docs.zapier.com/sdk/reference. Want to see more examples in this repo? Open a PR — contributions welcome.
Examples
The examples/ directory is the heart of this repo — indexed three ways:
by-app/— plain single-action SDK examples, one authenticated call.by-domain/— curation-only READMEs mapping a domain (engineering, real estate, ...) to the examples that matter.by-pattern/— end-to-end automations by shape (notify-on-event, data-sync, lead-routing, scheduled-report).
How it fits together
Your code calls one npm package; Zapier holds the OAuth grants and resolves action schemas at runtime, so your code never touches a token.
Install with your favorite AI coding assistant
Drop every best practice for writing Zapier SDK code straight into your agent's context. Your agent picks up:
- The
zapier-sdkskill: how to authenticate, discover apps and actions at runtime, run actions without inventing method names, and reach for the right escape hatch when there's no first-class action. - The
zapier-sdk-explorersubagent: a read-only investigator that resolves exact app / action / field IDs against the live Zapier catalog before your agent writes a line of code. - The verified examples corpus: every action key checked against
listActionson the way in, so your agent has canonical, copy-paste-ready patterns to grep.
Result: fewer round trips to the docs, no more invented action keys, and workflows that work the first time.
Claude Code
/plugin marketplace add zapier/marketplace
/plugin install sdk@zapier
OpenAI Codex
codex plugin marketplace add zapier/marketplace
codex plugin add sdk@zapier
Or open the in-CLI picker with /plugins and toggle the SDK plugin on.
GitHub Copilot CLI
copilot plugin marketplace add zapier/marketplace
copilot plugin install sdk@zapier
Cursor and other assistants
The skill conforms to agentskills.io so any conformant runtime can load it directly. For tools without native agentskills.io support, clone the repo and reference skills/zapier-sdk/SKILL.md from your assistant's rules or instructions file (.cursorrules, AGENTS.md, .github/copilot-instructions.md, etc.):
git clone https://github.com/zapier/sdk.git
Learn more
- zapier.com/sdk — product page, pricing, and what the SDK unlocks.
- docs.zapier.com/sdk — SDK guides and tutorials.
- docs.zapier.com/sdk/reference — full method reference.
- docs.zapier.com/sdk/cli-reference — CLI reference for
zapier-sdk. skills/zapier-sdk/references/cli-commands.md— full CLI command inventory in-repo, generated fromzapier-sdk --help.@zapier/zapier-sdk— runtime SDK on npm.@zapier/zapier-sdk-cli— CLI companion on npm.- Zapier MCP — the MCP-server alternative for tool-calling from Cursor, Claude Desktop, or Codex.
llms.txt— this repo's LLM-friendly index of the skill, examples, and agents.- docs.zapier.com/llms.txt — LLM-friendly index of the docs.
- docs.zapier.com — everything else Zapier.
Contributing
PRs and feature requests welcome. Start with CONTRIBUTING.md. For SDK security issues, email [email protected] — don't open a public issue.
Trademarks
Product and company names used in these examples are trademarks of their respective owners and are used only to identify the service each example integrates with. These examples are not affiliated with, endorsed by, or sponsored by those companies.
License
MIT (see LICENSE) — covers the code only. Using the Zapier service and APIs through this SDK is governed separately by the Zapier Terms of Service or your other agreement with Zapier for use of the Zapier service.