Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/Zapier integration playbook/Cli-build
Reference · Zapier integration playbook

Cli-build

Part of Zapier integration playbook. Install the skill and your agent reads this page when it needs the depth.

Building with the Zapier Platform CLI

Source: docs.zapier.com integrations/build-cli/* (overview, input-fields, dynamic-dropdowns, making-http-requests, testing-and-debugging, hydration), integrations/build/cli-hook-trigger, the CLI command reference and the platform schema (packages/schema/docs/build/schema.md in zapier/zapier-platform). Check the schema and CLI reference for the installed zapier-platform-core version before copying a key.

Contents

UI or CLI

Project and app definition

npm install -g zapier-platform-cli
zapier-platform login            # --sso with a deploy key for SSO accounts
zapier-platform init my-app      # pick a template: minimal, oauth2, custom-auth, dynamic-dropdown...; --language typescript
zapier-platform register "Acme Billing"   # creates the integration on Zapier
zapier-platform scaffold trigger invoice  # adds triggers/invoice.js and wires it into index.js

Authentication

authentication.type is one of basic, custom, digest, oauth1, oauth2, session; test (a request or function hitting a cheap "who am I" endpoint) is required.

Need Type Key parts
API key, or key-as-Basic custom fields (key, plus subdomain if any), a beforeRequest that adds the header
Username + password basic / digest fields provided automatically
Token exchange, non-standard grant (e.g. client_credentials) session sessionConfig.perform returns { sessionKey }; beforeRequest adds it
Third-party OAuth oauth2 oauth2Config.authorizeUrl, getAccessToken, optional refreshAccessToken, autoRefresh: true, scope, enablePkce

Triggers

triggers: {
  new_invoice: {
    key: 'new_invoice',
    noun: 'Invoice',
    display: { label: 'New Invoice', description: 'Triggers when a new invoice is created.' },
    operation: {
      perform: async (z, bundle) => {
        const res = await z.request({ url: 'https://api.acme.test/invoices', params: { sort: '-created_at', limit: 100 } });
        return res.data.items;          // array; the deduper keys on `id`
      },
      sample: { id: 1042, number: 'INV-1042', total: 120.5, created_at: '2026-01-15T10:00:00Z' },
      outputFields: [{ key: 'id', label: 'Invoice ID', primary: true }, { key: 'number', label: 'Invoice Number' }],
    },
  },
},

Creates, searches, search-or-create

Input fields

inputFields entries: key, label, type (string, text, integer, number, boolean, datetime, file, password, copy, code, json (core v18.4.0+)), required, helpText, default, placeholder, choices, list, children, dynamic, search, dependsOn, altersDynamicFields, computed.

Output fields and samples

Requests, middleware, errors

Files and hydration

Test, push, release

zapier-platform invoke auth start             # write authData to .env
zapier-platform invoke auth test              # run authentication.test
zapier-platform invoke trigger new_invoice    # local run; -r for remote
zapier-platform test                          # unit tests (createAppTester + nock)
zapier-platform validate                      # schema and publishing checks
zapier-platform push                          # uploads the version in package.json
zapier-platform promote 1.1.0
zapier-platform migrate 1.0.3 1.1.0 10        # percent, same major only
zapier-platform canary:create 1.0.3 1.1.0 -p 10 -d 3600
zapier-platform deprecate 1.0.0 2027-03-01 --reason=...
zapier-platform pull                          # fetch changes Zapier engineers made

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.