SDKs overview
The Zapier Platform is designed to enable users to connect disparate applications and automate workflows without writing code. For developers, this translates into building and maintaining custom integrations (apps) that can be published to the Zapier App Directory. Instead of traditional client-side SDKs for direct API consumption in typical application development, Zapier's developer tools primarily consist of a Command Line Interface (CLI) and associated libraries that facilitate the creation, testing, and deployment of these app integrations.
These developer tools allow integrators to define triggers, actions, and searches for their applications within the Zapier ecosystem. This approach shifts the focus from developers writing code to interact with Zapier's API from an external application, to developers writing code that becomes part of the Zapier platform, exposing their application's functionality to Zapier users. The Zapier Platform CLI is the central tool for this development process, providing a structured environment for building these connectors and managing their lifecycle on the Zapier developer platform.
Official SDKs by language
Zapier's official developer toolkit is centered around JavaScript and Node.js, reflecting the environment in which custom app integrations are built and executed within the Zapier platform. The primary tool is the Zapier Platform CLI, which leverages Node.js for its operations. This CLI is not a traditional API client library but rather a development kit for defining and deploying app integrations to Zapier's cloud infrastructure. Developers define their app's logic (triggers, actions, authentication) using JavaScript within a project structure managed by the CLI.
While the core development is in JavaScript, the CLI provides a framework that abstracts away much of the underlying infrastructure, allowing developers to focus on the integration logic. The Zapier Platform itself handles the execution environment and API interactions once an app is deployed. For detailed guidance on building integrations, refer to the Zapier Platform developer documentation.
| Language | Package/Tool | Installation Command | Maturity |
|---|---|---|---|
| JavaScript (Node.js) | zapier-platform-cli |
npm install -g zapier-platform-cli |
Stable |
Installation
The primary tool for developing on the Zapier Platform is the Zapier Platform CLI, which requires Node.js and npm (Node Package Manager) to be installed on your system. Node.js is a JavaScript runtime environment that allows you to execute JavaScript code outside of a web browser. npm is the default package manager for Node.js, used to install and manage project dependencies.
Prerequisites
- Node.js: Ensure you have Node.js version 10 or newer installed. You can download it from the official Node.js website.
- npm: npm is typically installed automatically with Node.js.
CLI Installation Steps
- Open your terminal or command prompt.
- Install the Zapier Platform CLI globally: Execute the following command to install the CLI tool that allows you to create, test, and deploy Zapier integrations:
npm install -g zapier-platform-cli - Verify installation: After installation, you can verify that the CLI is correctly installed by running:
zapier --versionThis command should output the installed version of the Zapier Platform CLI.
- Log in to your Zapier developer account: To interact with the Zapier platform, you'll need to log in using your developer credentials:
zapier loginThis command will prompt you to enter your Zapier username and password.
Once installed and logged in, you can use the CLI to initialize new app projects, test your integration locally, and push updates to the Zapier developer platform. For a complete guide on getting started, consult the Zapier CLI documentation.
Quickstart example
This quickstart demonstrates how to create a new Zapier app project using the Zapier Platform CLI and define a basic custom action. This example assumes you have the Zapier Platform CLI installed and are logged into your Zapier developer account.
1. Initialize a new app project
Navigate to your desired development directory in your terminal and create a new Zapier app project:
zapier init my-custom-app --template basic
This command creates a new directory named my-custom-app with a basic project structure. Change into this new directory:
cd my-custom-app
2. Define a simple custom action
Open the my-custom-app/index.js file (or my-custom-app/src/index.js depending on template) in your code editor. This file is where you define your app's triggers, actions, and authentication. Add a simple action that logs a message. For a more complete understanding of actions, refer to the Zapier actions guide.
const triggerMyEvent = require('./triggers/my_event.js');
const createMessage = require('./creates/create_message.js');
module.exports = {
version: require('./package.json').version,
platformVersion: require('./package.json').dependencies['zapier-platform-core'].replace('^', ''),
authentication: {
type: 'basic',
test: {},
connectionLabel: '{{bundle.authData.username}}',
},
beforeRequest: [],
afterResponse: [],
triggers: {
[triggerMyEvent.key]: triggerMyEvent,
},
searches: {},
creates: {
[createMessage.key]: createMessage,
},
};
Now, create a new file ./creates/create_message.js and add the following content:
module.exports = {
key: 'create_message',
noun: 'Message',
display: {
label: 'Create Custom Message',
description: 'Creates a custom message for testing purposes.',
important: true,
},
operation: {
perform: (z, bundle) => {
const message = bundle.inputData.text || 'Hello from Zapier custom app!';
z.console.log(`Creating message: ${message}`);
return { id: new Date().getTime(), message: message, status: 'created' };
},
inputFields: [
{ key: 'text', label: 'Message Text', type: 'string', helpText: 'The text content of the message.' },
],
outputFields: [
{ key: 'id', label: 'ID', type: 'string' },
{ key: 'message', label: 'Message Content', type: 'string' },
{ key: 'status', label: 'Status', type: 'string' },
],
},
};
3. Test the action locally
You can test your action locally without deploying it to Zapier. From your project directory, run:
zapier test
This command executes your app's tests. You can also interactively test your action using the zapier push command and then running a test Zap on the Zapier website.
4. Deploy your app
Once you are satisfied with your app, you can deploy it to the Zapier Platform:
zapier push
This command pushes your app code to Zapier, making it available for you to use in your Zaps or share with others. After pushing, you can navigate to the Zapier developer dashboard to manage your app.
Community libraries
Given Zapier's primary focus on no-code automation and its specific developer platform for building app integrations, there are fewer general-purpose community SDKs or libraries for interacting with Zapier's API in the same way one might find for other API platforms (e.g., Python libraries for Stripe or Java SDKs for AWS). The official Zapier Platform CLI effectively serves as the core SDK for integration builders.
However, the open-source nature of Node.js and JavaScript means that developers can leverage a vast ecosystem of existing libraries within their Zapier app integrations. For example, when building a custom action or trigger, a developer might use:
- HTTP client libraries: Libraries like
axiosornode-fetchto make requests to external APIs from within their Zapier integration code. - Utility libraries: General-purpose JavaScript utility libraries (e.g.,
lodash,moment.js) to help with data manipulation or date formatting. - Authentication libraries: Libraries that assist with OAuth flows or other authentication mechanisms if the integrated service requires complex authentication.
These are not Zapier-specific libraries but standard JavaScript tools that can be incorporated into a Zapier app project. Developers can declare these dependencies in their package.json file, and the Zapier Platform CLI handles their inclusion during the deployment process. The Mozilla Developer Network's JavaScript guide provides a comprehensive resource for understanding JavaScript modules and imports.
For specific examples and patterns for integrating external services with custom code, developers often refer to the Zapier Help documentation and community forums, which may contain discussions or shared code snippets relevant to common integration challenges. The emphasis remains on building the integration within the Zapier Platform's prescribed structure, rather than consuming a Zapier API directly from an external application using a separate client library.