LinuxCommandLibrary

zapier-validate

Validate Zapier app definitions

TLDR

Validate an integration

$ zapier validate
copy

Validate an integration without style checks
$ zapier validate --without-style
copy

Validate an integration without running the build script
$ zapier validate --skip-build
copy

Validate an integration with additional debug output
$ zapier validate [[-d|--debug]]
copy

Validate an integration with a different output structure
$ zapier validate [[-f|--format]] [plain|json|raw|row|table]
copy

SYNOPSIS

zapier-validate [options]

PARAMETERS

--app-dir
    Specifies the directory containing the Zapier app definition. Defaults to the current working directory.

--manifest
    Points to a specific manifest file to validate. Overrides the default discovery behavior.

--skip-install
    Skips the installation of Node.js modules before validation. Useful in CI/CD environments where dependencies are pre-installed.

--no-color
    Disables colored output in the terminal.

--help, -h
    Displays a help message with available options and exits.

--version, -v
    Shows the command's version number and exits.

DESCRIPTION

The zapier-validate command is an essential tool for developers building custom integrations for the Zapier platform. It serves as a static analysis checker, scrutinizing the manifest and definition files of a Zapier app – typically zapier.json and associated JavaScript/TypeScript files – to ensure they adhere to Zapier's strict API specifications, schema, and best practices.

When executed within a Zapier app project directory, zapier-validate performs a series of checks. These include verifying the correct structure of triggers, actions, and authentication mechanisms; validating input and output fields for appropriate data types and required attributes; and flagging common misconfigurations or syntax errors. Its primary goal is to identify potential issues early in the development cycle, preventing runtime errors or rejections during the Zapier app review process. By providing immediate feedback on the validity of an integration's definition, zapier-validate significantly streamlines the development workflow, reduces debugging time, and helps maintain the quality and reliability of custom Zapier apps. It is typically part of the broader Zapier CLI.

CAVEATS

The zapier-validate command is typically part of the Zapier CLI (installed via npm install -g zapier-cli). The actual command executed is often zapier validate, where validate is a subcommand of the main zapier executable. The user's request for zapier-validate might refer to an alias or a direct executable in specific environments.

It requires Node.js and npm/yarn to be installed, as the Zapier CLI is a Node.js application.

The command must be run within a directory that contains a valid Zapier app project structure, or have the --app-dir or --manifest option pointing to one.

Validation focuses on structural and schema compliance; it does not execute the app's code or test its runtime behavior against external APIs.

INSTALLATION

The Zapier CLI, which includes the validate subcommand, is installed globally via npm:
npm install -g zapier-cli

TYPICAL USAGE

Developers run zapier-validate (or zapier validate) frequently during the development of a Zapier integration. It's often integrated into pre-commit hooks or CI/CD pipelines to ensure code quality and adherence to Zapier's platform requirements before deployment.

ERROR REPORTING

The command provides detailed error messages, indicating the file, line number, and nature of any validation failures, making it easier to pinpoint and fix issues in the app definition.

Copied to clipboard