LinuxCommandLibrary

zapier-scaffold

Create Zapier integration project template

TLDR

Scaffold a new trigger, create, search, or resource

$ zapier scaffold [trigger|search|create|resource] [noun]
copy

Specify a custom destination directory for the scaffolded files
$ zapier scaffold [trigger|search|create|resource] [noun] [[-d|--dest]]=[path/to/directory]
copy

Overwrite existing files when scaffolding
$ zapier scaffold [trigger|search|create|resource] [noun] [[-f|--force]]
copy

Exclude comments from the scaffolded files
$ zapier scaffold [trigger|search|create|resource] [noun] --no-help
copy

Show extra debugging output
$ zapier scaffold [[-d|--debug]]
copy

SYNOPSIS

zapier scaffold

DESCRIPTION

The `zapier scaffold` command initializes a new Zapier integration project. It automates the creation of the basic project structure, including the `index.js` file (main integration logic), a `.zapierapprc` file (Zapier CLI configuration), a `package.json` file (Node.js dependencies), and other necessary files and directories.

This command significantly speeds up the development process by providing a pre-configured foundation for your integration. It prompts you for key information like the integration's name and description, and generates starter code with comments to guide you through the development process. It leverages the Zapier Platform SDK to handle authentication, triggers, searches, and creates.

The generated project is designed to be immediately deployable to the Zapier platform after implementing the core integration logic.

CAVEATS

Requires the Zapier CLI to be installed and configured. The generated project may require modification to suit specific integration requirements.

PROJECT STRUCTURE

The scaffold command generates a directory structure which usually includes:
- `index.js`: The main file containing your integration's logic (triggers, searches, creates).
- `.zapierapprc`: Zapier CLI configuration.
- `package.json`: Node.js dependencies.
- `/test`: Where your integration tests reside.

POST-SCAFFOLD STEPS

After scaffolding, you'll typically need to:
- Install dependencies using `npm install` or `yarn install`.
- Edit `index.js` to implement your integration's functionality.
- Write tests in the `/test` directory.
- Use `zapier push` to deploy your integration to Zapier.

HISTORY

The `zapier scaffold` command was introduced to simplify and expedite the creation of new Zapier integrations, reflecting Zapier's focus on low-code/no-code automation. It provides a standardized starting point, reducing the initial setup time and ensuring consistency across different integrations.

SEE ALSO

zapier init(1), zapier push(1), zapier validate(1)

Copied to clipboard