[go: up one dir, main page]

Skip to main content
The Zapier SDK is now in open beta. Access is free — try it, break it, and tell us what to fix. Give feedback →
The SDK gives coding agents and builders programmatic access to Zapier’s full app ecosystem. Any API call, on behalf of a user, with no OAuth setup required. Where MCP gives agents a curated menu of pre-built actions, the SDK lets agents go further: write loops, handle edge cases, chain complex logic across apps. Zapier handles auth, token refresh, retries, and API quirks across 9,000+ integrations. Your agent handles the logic.

For coding agents

Agents can write code in seconds. What they can’t do is manage OAuth at scale, handle webhook subscriptions, or enforce enterprise permissions. The SDK is the interface agents reach for when they need to connect to an app, take an action, or respond to an event without setting up the auth infrastructure every time.

For builders of AI products

Every builder working with agents is either solving the auth problem themselves — OAuth for each app, token refresh, retries — or going without it entirely (ungoverned, unaudited). The SDK replaces that with one integration, backed by the same infrastructure running Zapier’s full app catalog.

SDK or MCP — Which One Do You Need?

MCPSDK
Best forChat agentsCoding agents
Access modelCurated menu of pre-built actionsAny API call, in code, authenticated by Zapier
Use whenYou want a fast, governed set of tools for an agentYou need loops, conditionals, error handling, or calls that go beyond the pre-built catalog
Most teams end up using both. MCP for conversational agent interfaces; SDK when those agents need to execute code reliably in production.

What’s Available in Open Beta

In now

  • Full action catalog — invoke any of 9,000+ pre-built actions across Zapier’s full app catalog through one programmable interface
  • API call — raw authenticated HTTP calls to ~3,600 app APIs via Zapier’s infrastructure; go beyond pre-built actions to call any supported endpoint directly (more coming soon!)
  • App and action governance — if your org has restricted specific apps or actions inside Zapier, those policies apply automatically to SDK traffic that uses pre-built actions
  • Free during early access — no billing changes during the open beta window

Coming soon

  • Triggers API — subscribe to real-time events across connected apps in code; no polling, no custom webhook infrastructure (targeting May 2026)
  • Agent approval flow — users review and approve what an agent can do before it acts on their behalf
  • Self-serve enterprise opt-in/out — workspace admins toggle SDK access directly, no ticket required
  • Direct API governance — today, governance applies to pre-built actions only; direct API calls are not yet governable at the policy level. Direct API governance is in progress.

Not in scope for open beta

  • Full raw API call coverage across all 9,000 apps
Enterprise and Team plans: These accounts are off by default. Contact us for manual opt-in.

A Note on Governance

App and action restrictions your org has set up in Zapier apply automatically to SDK pre-built actions — no extra configuration. However, the SDK also provides direct API access via .fetch(), which currently falls outside those policy controls.
Important: If your agent calls a pre-built action, that action is governed. If it calls the underlying API endpoint directly via .fetch(), it is not yet governed. Direct API governance is on the roadmap.

Key Features

  • 9,000+ App Integrations: Access Zapier’s entire ecosystem of pre-built connectors
  • Type-Safe: Full TypeScript support with generated types for every app and action
  • Simple Authentication: Browser-based login, client credentials, or direct token for seamless auth
  • Paginated Results: Simple pagination and iteration over lists of resources
  • Built-in Actions: Easily call our built-in actions with a simple apps.slack.write.channel_message() syntax.
  • Custom API Requests: Use our fetch method and make authenticated requests to any API through Zapier’s infrastructure to go beyond our built-in actions

Get Started

Set up in Cursor → Not using Cursor? Copy and paste this prompt into an IDE agent (VS Code with Copilot, Claude Code, Windsurf, etc.).
Set up the Zapier SDK for me. Work through these steps one at a time, running each command in the terminal and telling me what happened before moving on:

1. Check what folder I'm in and whether a package.json already exists.
   - If there's already a package.json, use this project as-is.
   - If there's no package.json, create one, run: npm init -y

2. Check Node.js is installed and is version 20 or higher: node -v
   - If Node is not found: tell me to install it from https://nodejs.org or run brew install node, then stop.
   - If Node is older than 20: tell me to upgrade it, then stop.

3. Install the SDK: npm install @zapier/zapier-sdk
   - An EPERM error on ~/.npm/_cacache usually means the command sandbox is blocking npm's cache writes, not a file permissions issue.

4. Install dev dependencies: npm install -D @zapier/zapier-sdk-cli @types/node typescript

5. Log in to Zapier: npx zapier-sdk login
   - This opens a browser window. A permissions or sandbox error here typically means the command sandbox is preventing credentials from being written to disk.
   - If login fails for another reason, try again.

6. List my connected apps: npx zapier-sdk list-connections --owner me --json 2>/dev/null | head -n 1000
   - Read the output and show only the first 10 results as a markdown table with columns: ID, App Key, Expired. Do not show Title. Always tell me how many total connections there are, and if there are more than 10, note that you are only showing the first 10.
   - The page size is 100. If the output contains exactly 100 connections, there may be additional connections beyond this first page. Just note that and move on — do not fetch additional pages.
   - If the list is empty: tell me to connect at least one app at https://zapier.com/app/assets/connections and come back.

Once all steps are done, tell me I am ready and explain:

Zapier has pre-built connectors for 8,000+ apps — Slack, Google Sheets, Salesforce, GitHub, and thousands more. The Zapier SDK and CLI expose that same integration layer to code. Instead of building OAuth flows, handling token refresh, and reverse-engineering each app's API yourself, you get a single consistent interface that already knows how to talk to all of them. Your users' existing Zapier connections are authenticated and ready to use.

- **CLI — explore, run one-offs, or let an agent act:** the CLI is for exploration and ad-hoc action. Use it to see what an app can do, inspect the exact inputs an action expects, and run actions interactively — whether that's you in a terminal or an agent executing a task on demand. See the CLI reference: https://docs.zapier.com/sdk/cli-reference
- **TypeScript SDK — build production integrations and agent tools:** the SDK is for shipping. Use it when you need something repeatable, embedded, or in production — a scheduled workflow, a backend service, a tool inside an AI agent. It's type-safe, handles token refresh and retries automatically, and uses the same app keys, action keys, and input shapes you already discovered via the CLI. See the SDK reference: https://docs.zapier.com/sdk/reference

**Want to run a quick test?**

If I have a Slack connection, offer to send a DM to yourself on Slack. Describe the steps that will happen and end with: "Want to run this quick test?" Then STOP. Do not output anything else. Do not continue to the next section. Wait for my reply before proceeding.

When I reply to the quick test, only proceed if my response is a clear, unambiguous affirmative (e.g. "yes", "go ahead"). If ambiguous or unclear, skip the test and continue.

If I don't have a Slack connection, skip the test and continue.

---

When I reply yes to the quick test, run these exact commands in order:

1. Look up my Slack username:
   npx zapier-sdk run-action slack search user_by_email --connection-id ID --inputs '{"email":"ZAPIER_EMAIL"}'

2. Send a direct message to yourself using the username from step 1:
   npx zapier-sdk run-action slack write direct_message --connection-id ID --inputs '{"channel":"USERNAME","text":"Hello via Zapier SDK 👋"}'

Replace ID with my Slack connection ID from the table above. Replace ZAPIER_EMAIL with my Zapier login email. Replace USERNAME with the username returned from step 1.

If user_by_email fails, ask me for my Slack email and try again.

---

After the test completes (or if I skip it, or if there's no Slack connection):

Pick 1–3 apps from the connections table and show me the commands I could use to explore what actions they support. Do not run these commands — just display them so I can try on my own. For example:
   npx zapier-sdk list-actions APP_KEY

**All set! Now, a few ideas to start exploring what the Zapier SDK can do:**

Suggest 3 ideas worth exploring — good starting points based on my connected apps. Each idea reads from one app, optionally processes it, and writes to another. Do not suggest anything event-driven. Keep each idea to one sentence. Examples: "get all your Jira issues still In Progress and DM yourself a tidy table on Slack"; "pull every HubSpot deal that closed this week and drop it into a Google Sheet". Make the ideas specific to my connected apps — not generic.
Or follow the manual quickstart guide to set up step by step.

What Can You Build?

Example Use Case: Reschedule a meeting and notify attendees

Your user says: “Move my 2pm meeting to Thursday and let the attendees know.” Your agent finds the meeting in Google Calendar, reschedules it, and messages each attendee in Slack - all via the SDK:
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk();

// Bind the user's connected accounts
const { data: calConnection } = await zapier.findFirstConnection({
  appKey: "google-calendar",
  owner: "me",
  isExpired: false,
});
const { data: slackConnection } = await zapier.findFirstConnection({
  appKey: "slack",
  owner: "me",
  isExpired: false,
});

const calendar = zapier.apps.google_calendar({
  connectionId: calConnection.id,
});
const slack = zapier.apps.slack({ connectionId: slackConnection.id });

// Find a specific meeting
const { data: events } = await calendar.search.event_v2({
  inputs: {
    calendarid: "Calendar ID",
    search_term: "Meeting Title",
  },
});
const meeting = events[0] as {
  id: string;
  summary: string;
  attendees: { email: string }[];
};

// Move it to Thursday
await calendar.write.update_event({
  inputs: {
    calendarid: "Calendar ID",
    eventid: meeting.id,
    start__dateTime: "2026-02-19T12:00:00-00:00",
    end__dateTime: "2026-02-19T12:30:00-00:00",
  },
});

// Look up Slack user IDs for all attendees
const slackUsers = await Promise.all(
  meeting.attendees.map((attendee) =>
    slack.search.user_by_email({ inputs: { email: attendee.email } }),
  ),
);

// Notify each attendee via Slack DM
for (const { data } of slackUsers) {
  const user = data[0] as { id: string };
  await slack.write.direct_message({
    inputs: {
      channel: user.id,
      text: `Our "${meeting.summary}" meeting has been moved to Thursday at 12pm.`,
    },
  });
}

What’s happening under the hood:

  • findFirstConnection retrieves the user’s connected Google Calendar and Slack accounts — no OAuth flows to build
  • apps.google_calendar(...) binds your connect once, so every subsequent call uses those credentials
  • search, write, and read map to the type of action: find data, create/update data, or list data
  • The SDK handles token refresh, retries, and API differences across apps — your agent just calls actions

Feedback

Going beyond local development? You’ll need to create Client Credentials and treat them like any other sensitive API key. See the API Reference for setup.
We want your feedback. The SDK is still taking shape and your input drives what we build next. Hit a bug? Missing a feature? Have an idea? Tell us about it