Skip to main content

Set up with your AI

Your agent runs the commands for you

Open in Codex

Open in Claude Code

Open in Cursor

Open in VS Code Copilot

Your agent walks you through the process

Open in ChatGPT

Open in Claude

Open in Perplexity

Using another IDE agent (Cline, Windsurf, etc.)? Copy this prompt.

Prerequisites

  • Node.js 20+ installed
  • A Zapier account (free tier works). Or create one using the CLI in Step 3
  • At least one app connected to your Zapier account

Step 1: Install the SDK

Create a new project (or use an existing one) and install the required packages:
The examples in this guide assume you have "type": "module" in your package.json so that you’re using ES modules with support for top-level await. We do that above with npm pkg set type=module.

Step 2: Install the SDK skill

Install the Zapier SDK skill so your coding agent knows how to use the SDK across every future session:
Works with Claude Code, Cursor, Codex, OpenCode, Windsurf, and 50+ other coding agents.

Step 3: Authenticate

The SDK CLI can create a Zapier account or log into an existing one, then provision local SDK credentials: New to Zapier? Start with signup:
This opens your browser to create an account, authorize the SDK CLI, and store a local SDK credential. Already have a Zapier account? Use login instead:
As long as the CLI package is installed as a development dependency, the SDK will automatically use your CLI authentication.
Building for production or deploying to a server? CLI authentication is for development terminals. For any server-side deployment, client credentials are the recommended approach.
Want approvals on these credentials? Pass --use-approvals to signup or login to provision the credential with an empty permission policy. Every request will prompt you to approve (or deny) the action until you’ve built the policy up. See Permissions for the full flow.
Use headless authentication when your terminal cannot open a browser, like an SSH session or remote dev box. The CLI prints a signup or login URL; open it somewhere with a browser, finish authentication, then paste the final callback URL back into the terminal.
If an agent is running the command and should never stop for prompts, combine it with --non-interactive:
The client credentials guide covers creation, secure storage, and how to use them across platforms.
You can also provide a token directly:

Step 4: Generate Types for Your Apps

The SDK can generate TypeScript types for any app, giving you full autocomplete and type safety:
Types are generated in your src or lib folder by default. You can customize the output location:

Step 5: Initialize the SDK

Create a new file (e.g., index.ts) and initialize the SDK:

Step 6: List Your Connected Apps

Let’s verify everything works by listing available apps:
This returns the first page of results. For large datasets, use .items() to iterate over all results or maxItems to limit the total. See the API Reference for pagination patterns.
Run your script:

Step 7: Run Your First Action

Now let’s execute an action. First, you’ll need a connection for the app you want to use:

Step 8: Use the Proxy Pattern (Optional)

For a cleaner syntax, use the app proxy pattern:

Step 9: Make Custom API Calls with fetch (Optional)

Note on governance: The .fetch() method makes authenticated API calls directly, giving you access to any supported endpoint. Unlike pre-built actions, these direct API calls are not currently subject to your org’s app or action restriction policies. If your org has governance requirements, use pre-built actions where possible. Direct API governance is on the roadmap.
When you need to call an API that doesn’t have a built-in action, use fetch to make authenticated requests through the Zapier SDK:

Complete Example

Here’s a full example that sends a Slack message:

Next Steps

  • API Reference — full documentation of all SDK methods and patterns
  • CLI Reference — command-line tools including list-apps, add, and view-policy
  • Browse integrations apps you can connect
  • Try the demo use case — the meeting reschedule example on the overview page is a confirmed working end-to-end scenario, good for testing your setup
  • Hit a problem? — tell us what broke via the feedback form