Skip to content

zapier/sdk

Repository files navigation

Zapier SDK

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.

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:receipts@stripe.com"}'

# 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":"jane@example.com"}'

# Find an Airtable record by field
npx zapier-sdk run-action airtable search findRecord \
  --inputs '{"applicationId":"<base-id>","tableName":"Leads","searchByField":"Email","searchByValue":"jane@example.com"}'

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).

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-sdk skill: 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-explorer subagent: 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 listActions on 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

Contributing

PRs and feature requests welcome. Start with CONTRIBUTING.md. For SDK security issues, email security@zapier.com — 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.

About

Agent-readable docs, verified examples, and skill manifest for @zapier/zapier-sdk

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

240 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors