Zapier Platform CLI

18.5.0 · active · verified Wed Apr 22

The Zapier Platform CLI is a command-line interface tool that enables developers to build, test, and deploy custom integrations for the Zapier Developer Platform. It provides a code-first approach to creating Zapier apps, allowing for advanced customization of API interactions, authentication flows, triggers, actions, and searches. This CLI is particularly suited for development teams leveraging version control and CI/CD pipelines, offering greater control than the browser-based Platform UI. The current stable version is 18.5.0, with frequent minor releases providing continuous improvements and bug fixes. Developers primarily write Node.js applications that export a defined schema, which Zapier then introspects to understand the app's capabilities. Integrations built with the CLI run on AWS Lambda, utilizing standard Node.js libraries and a specific `zapier-platform-core` dependency for platform interaction.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to set up the Zapier Platform CLI, log into your Zapier account, initialize a new integration project, add a minimal 'Hello World' trigger, validate the app, run tests, and finally deploy the integration to the Zapier Developer Platform.

npm install -g zapier-platform-cli

# Log in to your Zapier developer account
zapier-platform login --sso # Use --sso if you log in via Google/SSO
# Follow browser prompts or enter deploy key

# Initialize a new Zapier integration project
mkdir my-zapier-app
cd my-zapier-app
zapier-platform init . --template minimal

# Install project dependencies
npm install

# Add a simple 'hello world' trigger to src/index.js
# Replace module.exports content with:
# module.exports = {
#   version: require('./package.json').version,
#   platformVersion: require('zapier-platform-core').version,
#   triggers: {
#     hello_world: {
#       key: 'hello_world',
#       noun: 'Hello World',
#       display: {
#         label: 'New Hello World',
#         description: 'Triggers when a new hello world event occurs.',
#       },
#       operation: {
#         perform: () => [{
#           id: 1,
#           message: 'Hello, world!',
#           createdAt: new Date().toISOString()
#         }],
#         sample: {
#           id: 1,
#           message: 'Hello, world!',
#           createdAt: '2023-01-01T12:00:00Z'
#         }
#       },
#     },
#   },
# };

# Validate the project schema
zapier-platform validate

# Run local tests (if you have them, e.g., default ones)
zapier-platform test

# Register your app with Zapier (first time only)
zapier-platform register

# Push your integration to Zapier
zapier-platform push

view raw JSON →