Skip to main content
This page documents all available methods in the Zapier SDK.

Installation

npm install @zapier/zapier-sdk
npm install -D @zapier/zapier-sdk-cli @types/node typescript

Initialization

Option 1: Browser-based auth Running npx zapier-sdk login authenticates through your browser and stores a token on your local machine. As long as you have the CLI package installed as a development dependency, the SDK will automatically use it.
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk();
Option 2: Client credentials Provide a client ID and client secret. You can get these by running npx zapier-sdk create-client-credentials. This allows you to run the SDK in a server/serverless environment.
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk({
  credentials: {
    clientId: "your_client_id",
    clientSecret: "your_client_secret",
  },
});
Option 3: Direct token Provide a valid Zapier token. This is for partner OAuth or internal Zapier use.
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk({
  credentials: "your_zapier_token_here",
});

Accounts

getProfile

Get current user’s profile information Parameters:
NameTypeRequiredDescription
optionsobjectNo
Returns: Promise<ProfileItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ first_namestringYes
​ ↳ last_namestringYes
​ ↳ full_namestringYes
​ ↳ emailstringYes
​ ↳ email_confirmedbooleanYes
​ ↳ timezonestringYes
Example:
const { data: profile } = await zapier.getProfile();

Actions

getAction

Get detailed information about a specific action Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionTypestringYesAction type that matches the action’s defined type
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
Returns: Promise<ActionItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringNo
​ ↳ keystringYes
​ ↳ descriptionstringYes
​ ↳ is_importantbooleanNo
​ ↳ is_hiddenbooleanNo
​ ↳ app_keystringYes
​ ↳ app_versionstringNo
​ ↳ action_typestringYes
​ ↳ titlestringYes
​ ↳ typestringYes
Example:
const { data: action } = await zapier.getAction({
  app: "example-app",
  actionType: "read",
  action: "example-action",
});

getActionInputFieldsSchema

Get the JSON Schema representation of input fields for an action. Returns a JSON Schema object describing the structure, types, and validation rules for the action’s input parameters. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp key (e.g., ‘SlackCLIAPI’ or slug like ‘github’) to get the input schema for
​ ↳ actionTypestringYesAction type that matches the action’s defined type
​ ↳ actionstringYesAction key to get the input schema for
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId.
​ ↳ inputsobjectNoCurrent input values that may affect the schema (e.g., when fields depend on other field values)
Returns: Promise<InputSchemaItem> Example:
const { data: inputSchema } = await zapier.getActionInputFieldsSchema({
  app: "example-app",
  actionType: "read",
  action: "example-action",
});

listActionInputFieldChoices

Get the available choices for a dynamic dropdown input field Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionTypestringYesAction type that matches the action’s defined type
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ inputFieldstringYesInput field key to get choices for
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId.
​ ↳ inputsobjectNoCurrent input values that may affect available choices
​ ↳ pagenumberNoPage number for paginated results
​ ↳ pageSizenumberNoNumber of choices per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<InputFieldChoiceItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ keystringNo
​ ↳ labelstringNo
​ ↳ samplestringNo
​ ↳ valuestringNo
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: inputFieldChoices, nextCursor } =
  await zapier.listActionInputFieldChoices({
    app: "example-app",
    actionType: "read",
    action: "example-action",
    inputField: "example-input-field",
  });

// Or iterate over all pages
for await (const page of zapier.listActionInputFieldChoices({
  app: "example-app",
  actionType: "read",
  action: "example-action",
  inputField: "example-input-field",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const inputFieldChoice of zapier
  .listActionInputFieldChoices({
    app: "example-app",
    actionType: "read",
    action: "example-action",
    inputField: "example-input-field",
  })
  .items()) {
  // Do something with each inputFieldChoice
}

listActionInputFields

Get the input fields required for a specific action Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionTypestringYesAction type that matches the action’s defined type
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId.
​ ↳ inputsobjectNoCurrent input values that may affect available fields
​ ↳ pageSizenumberNoNumber of input fields per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<RootFieldItem>>
NameTypeRequiredDescription
data[]object[]YesOne of the variants below, distinguished by type
nextCursorstringNoCursor for the next page; omitted when there are no more pages
When type is "input_field":
NameTypeRequiredDescription
typestringYes
keystringYes
default_valuestringYes
depends_onarrayYes
descriptionstringYes
invalidates_input_fieldsbooleanYes
is_requiredbooleanYes
placeholderstringYes
titlestringYes
value_typestringYes
formatstringNo
itemsobjectNo
​ ↳ typestringYes
When type is "info_field":
NameTypeRequiredDescription
typestringYes
keystringYes
descriptionstringYes
titlestringNo
When type is "fieldset":
NameTypeRequiredDescription
typestringYes
keystringYes
titlestringYes
fieldsarrayYes
Example:
// Get first page and a cursor for the second page
const { data: rootFields, nextCursor } = await zapier.listActionInputFields({
  app: "example-app",
  actionType: "read",
  action: "example-action",
});

// Or iterate over all pages
for await (const page of zapier.listActionInputFields({
  app: "example-app",
  actionType: "read",
  action: "example-action",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const rootField of zapier
  .listActionInputFields({
    app: "example-app",
    actionType: "read",
    action: "example-action",
  })
  .items()) {
  // Do something with each rootField
}

listActions

List all actions for a specific app Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp key of actions to list (e.g., ‘SlackCLIAPI’ or slug like ‘github’)
​ ↳ actionTypestringNoFilter actions by type
​ ↳ pageSizenumberNoNumber of actions per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<ActionItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringNo
​ ↳ keystringYes
​ ↳ descriptionstringYes
​ ↳ is_importantbooleanNo
​ ↳ is_hiddenbooleanNo
​ ↳ app_keystringYes
​ ↳ app_versionstringNo
​ ↳ action_typestringYes
​ ↳ titlestringYes
​ ↳ typestringYes
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: actions, nextCursor } = await zapier.listActions({
  app: "example-app",
});

// Or iterate over all pages
for await (const page of zapier.listActions({
  app: "example-app",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const action of zapier
  .listActions({
    app: "example-app",
  })
  .items()) {
  // Do something with each action
}

runAction

Execute an action with the given inputs Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionTypestringYesAction type that matches the action’s defined type
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId.
​ ↳ inputsobjectNoInput parameters for the action
​ ↳ timeoutMsnumberNoMaximum time to wait for action completion in milliseconds (default: 180000)
​ ↳ pageSizenumberNoNumber of results per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<ActionResultItem>> Example:
// Get first page and a cursor for the second page
const { data: actionResults, nextCursor } = await zapier.runAction({
  app: "example-app",
  actionType: "read",
  action: "example-action",
});

// Or iterate over all pages
for await (const page of zapier.runAction({
  app: "example-app",
  actionType: "read",
  action: "example-action",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const actionResult of zapier
  .runAction({
    app: "example-app",
    actionType: "read",
    action: "example-action",
  })
  .items()) {
  // Do something with each actionResult
}

Apps

apps.{appKey}

Bind a connection alias or numeric connectionId to an app Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly.
Returns: Promise<AppProxy> Example:
const result = await zapier.apps.appKey();

apps.{appKey}.{actionType}.{actionKey}

Execute an action with the given inputs for the bound app, as an alternative to runAction Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inputsobjectNo
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly.
​ ↳ timeoutMsnumberNoMaximum time to wait for action completion in milliseconds (default: 180000)
Returns: Promise<PaginatedResult<ActionResultItem>> Example:
// Get first page and a cursor for the second page
const { data: actionResults, nextCursor } =
  await zapier.apps.appKey.actionType.actionKey();

// Or iterate over all pages
for await (const page of zapier.apps.appKey.actionType.actionKey()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const actionResult of zapier.apps.appKey.actionType
  .actionKey()
  .items()) {
  // Do something with each actionResult
}

getApp

Get detailed information about a specific app Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
Returns: Promise<AppItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ slugstringYesURL-friendly slug identifier
​ ↳ age_in_daysnumberNoNumber of days since the implementation was created
​ ↳ auth_typestringNoAuthentication type (e.g., oauth2, api_key)
​ ↳ bannerstringNoBanner message or status indicator
​ ↳ categories[]object[]NoCategories the implementation belongs to
​   ↳ idnumberYesUnique identifier for the category
​   ↳ namestringYesDisplay name of the category
​   ↳ slugstringYesURL-friendly slug for the category
​ ↳ imagesobjectNoIcon images at various sizes
​   ↳ url_16x16stringNo16x16 pixel icon URL
​   ↳ url_32x32stringNo32x32 pixel icon URL
​   ↳ url_64x64stringNo64x64 pixel icon URL
​   ↳ url_128x128stringNo128x128 pixel icon URL
​ ↳ popularitynumberNoPopularity score for ranking apps
​ ↳ has_filtersbooleanNoWhether the app has filter actions
​ ↳ has_readsbooleanNoWhether the app has read actions
​ ↳ has_searchesbooleanNoWhether the app has search actions
​ ↳ has_searches_or_writesbooleanNoWhether the app has search or write actions
​ ↳ has_upfront_fieldsbooleanNoWhether the app has upfront input fields
​ ↳ has_writesbooleanNoWhether the app has write actions
​ ↳ is_betabooleanNoWhether the app is in beta
​ ↳ is_built_inbooleanNoWhether the app is a built-in Zapier app
​ ↳ is_deprecatedbooleanNoWhether the app is deprecated
​ ↳ is_featuredbooleanNoWhether the app is featured
​ ↳ is_hiddenbooleanNoWhether the app is hidden from listings
​ ↳ is_invitebooleanNoWhether the app is invite-only
​ ↳ is_premiumbooleanNoWhether the app requires a premium plan
​ ↳ is_publicbooleanNoWhether the app is publicly available
​ ↳ is_upcomingbooleanNoWhether the app is upcoming/not yet released
​ ↳ versionstringNoApp version
​ ↳ visibilitystringNoVisibility status (e.g., public, private)
​ ↳ actionsobjectNoCount of available actions by type
​   ↳ readnumberNoNumber of read actions
​   ↳ read_bulknumberNoNumber of bulk read actions
​   ↳ writenumberNoNumber of write actions
​   ↳ searchnumberNoNumber of search actions
​   ↳ search_or_writenumberNoNumber of search-or-write actions
​   ↳ search_and_writenumberNoNumber of search-and-write actions
​   ↳ filternumberNoNumber of filter actions
​ ↳ descriptionstringNoDescription of the app
​ ↳ primary_colorstringNoPrimary brand color (hex)
​ ↳ secondary_colorstringNoSecondary brand color (hex)
​ ↳ classificationstringNoApp classification category
​ ↳ api_docs_urlstringNoURL to API documentation
​ ↳ imagestringNoDefault image URL for the app
​ ↳ titlestringYesDisplay name of the app
​ ↳ keystringYesApp key (versionless implementation name)
​ ↳ implementation_idstringYesFull implementation ID including version
Example:
const { data: app } = await zapier.getApp({
  app: "example-app",
});

listApps

List all available apps with optional filtering Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ searchstringNoSearch term to filter apps by name
​ ↳ pageSizenumberNoNumber of apps per page
​ ↳ appsarrayNoFilter apps by app keys (e.g., ‘SlackCLIAPI’ or slug like ‘github’)
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<AppItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ slugstringYesURL-friendly slug identifier
​ ↳ age_in_daysnumberNoNumber of days since the implementation was created
​ ↳ auth_typestringNoAuthentication type (e.g., oauth2, api_key)
​ ↳ bannerstringNoBanner message or status indicator
​ ↳ categories[]object[]NoCategories the implementation belongs to
​   ↳ idnumberYesUnique identifier for the category
​   ↳ namestringYesDisplay name of the category
​   ↳ slugstringYesURL-friendly slug for the category
​ ↳ imagesobjectNoIcon images at various sizes
​   ↳ url_16x16stringNo16x16 pixel icon URL
​   ↳ url_32x32stringNo32x32 pixel icon URL
​   ↳ url_64x64stringNo64x64 pixel icon URL
​   ↳ url_128x128stringNo128x128 pixel icon URL
​ ↳ popularitynumberNoPopularity score for ranking apps
​ ↳ has_filtersbooleanNoWhether the app has filter actions
​ ↳ has_readsbooleanNoWhether the app has read actions
​ ↳ has_searchesbooleanNoWhether the app has search actions
​ ↳ has_searches_or_writesbooleanNoWhether the app has search or write actions
​ ↳ has_upfront_fieldsbooleanNoWhether the app has upfront input fields
​ ↳ has_writesbooleanNoWhether the app has write actions
​ ↳ is_betabooleanNoWhether the app is in beta
​ ↳ is_built_inbooleanNoWhether the app is a built-in Zapier app
​ ↳ is_deprecatedbooleanNoWhether the app is deprecated
​ ↳ is_featuredbooleanNoWhether the app is featured
​ ↳ is_hiddenbooleanNoWhether the app is hidden from listings
​ ↳ is_invitebooleanNoWhether the app is invite-only
​ ↳ is_premiumbooleanNoWhether the app requires a premium plan
​ ↳ is_publicbooleanNoWhether the app is publicly available
​ ↳ is_upcomingbooleanNoWhether the app is upcoming/not yet released
​ ↳ versionstringNoApp version
​ ↳ visibilitystringNoVisibility status (e.g., public, private)
​ ↳ actionsobjectNoCount of available actions by type
​   ↳ readnumberNoNumber of read actions
​   ↳ read_bulknumberNoNumber of bulk read actions
​   ↳ writenumberNoNumber of write actions
​   ↳ searchnumberNoNumber of search actions
​   ↳ search_or_writenumberNoNumber of search-or-write actions
​   ↳ search_and_writenumberNoNumber of search-and-write actions
​   ↳ filternumberNoNumber of filter actions
​ ↳ descriptionstringNoDescription of the app
​ ↳ primary_colorstringNoPrimary brand color (hex)
​ ↳ secondary_colorstringNoSecondary brand color (hex)
​ ↳ classificationstringNoApp classification category
​ ↳ api_docs_urlstringNoURL to API documentation
​ ↳ imagestringNoDefault image URL for the app
​ ↳ titlestringYesDisplay name of the app
​ ↳ keystringYesApp key (versionless implementation name)
​ ↳ implementation_idstringYesFull implementation ID including version
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: apps, nextCursor } = await zapier.listApps();

// Or iterate over all pages
for await (const page of zapier.listApps()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const app of zapier.listApps().items()) {
  // Do something with each app
}

Client Credentials

createClientCredentials

Create new client credentials for the authenticated user Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ namestringYesHuman-readable name for the client credentials
​ ↳ allowedScopesarrayNoScopes to allow for these credentials
Returns: Promise<ClientCredentialsItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ client_idstringYesThe public identifier (Client ID) of the OAuth application
​ ↳ namestringYesHuman-readable name of the OAuth application
​ ↳ client_secretstringYesThe client secret (only shown once on creation)
Example:
const result = await zapier.createClientCredentials({
  name: "example-name",
});

deleteClientCredentials

Delete client credentials by client ID Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ clientIdstringYesThe client ID of the client credentials to delete
Returns: Promise<{ success: boolean }> Example:
const result = await zapier.deleteClientCredentials({
  clientId: "example-client-id",
});

listClientCredentials

List client credentials for the authenticated user Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ pageSizenumberNoNumber of credentials per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<ClientCredentialsItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ client_idstringYesThe public identifier (Client ID) of the OAuth application
​ ↳ namestringYesHuman-readable name of the OAuth application
​ ↳ allowed_scopesarrayYesList of OAuth scopes that this application is allowed to request
​ ↳ created_atstringNoWhen the application was created (ISO 8601)
​ ↳ updated_atstringNoWhen the application was last updated (ISO 8601)
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: clientCredentials, nextCursor } =
  await zapier.listClientCredentials();

// Or iterate over all pages
for await (const page of zapier.listClientCredentials()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const clientCredentials of zapier.listClientCredentials().items()) {
  // Do something with each clientCredentials
}

Connections

createConnection

Create a new app connection, end-to-end. Mints the start URL via get-connection-start-url, prints it to stderr, opportunistically opens it in a browser when it looks safe to do so (skipping CI / SSH / headless-Linux by default — pass --browser always to force, --browser never to suppress), then polls via wait-for-new-connection until the user completes OAuth and the new connection appears. Returns the connection. This is the right command for most callers. Reach for the lower-level building blocks when you want either of: (a) hand off the URL and not block on completion — call get-connection-start-url alone, no wait-for-new-connection needed, or (b) do something custom between minting the URL and waiting — call get-connection-start-url, do your work (email or DM the URL, render a QR code, etc.), then wait-for-new-connection. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ browserstringNoWhen to auto-open the URL in a browser. auto (default) opens in local sessions and skips opening in CI / SSH / headless-Linux. always forces the open attempt. never skips it. The URL is always printed to stderr regardless — a failed or skipped open degrades gracefully to copy-paste.
​ ↳ timeoutMsnumberNoHow long to wait for the user to complete the connection flow before giving up. Default 5 minutes (300_000).
​ ↳ pollIntervalMsnumberNoDelay before the first poll request, in ms. Default 3 seconds (3_000). Subsequent polling cadence is managed by the SDK’s polling primitive (backoff with sane defaults).
Returns: Promise<ConnectionItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesThe new connection’s ID. Public UUID when available, falling back to the numeric ID.
​ ↳ appstringYesVersionless app key the connection was created for (e.g., ‘SlackCLIAPI’).
​ ↳ titlestringNoHuman-readable connection title set by the auth flow, when available.
Example:
const result = await zapier.createConnection({
  app: "example-app",
});

findFirstConnection

Find the first connection matching the criteria Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ searchstringNoSearch term to filter connections by title
​ ↳ titlestringNoFilter connections by exact title match (searches first, then filters locally)
​ ↳ ownerstringNoFilter by owner, ‘me’ for your own connections or a specific user ID
​ ↳ appstringNoApp key of connections to list (e.g., ‘SlackCLIAPI’ or slug like ‘github’)
​ ↳ accountstringNoAccount to filter by
​ ↳ includeSharedbooleanNoInclude connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections.
​ ↳ expiredbooleanNoShow only expired connections (default: only non-expired connections are returned)
Returns: Promise<ConnectionItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesUnique identifier for the connection
​ ↳ datestringYesDate created
​ ↳ lastchangedstringNoDate last changed
​ ↳ account_idstringYesAccount ID associated with this connection
​ ↳ destination_selected_apistringNoDestination API key (if applicable)
​ ↳ is_invite_onlybooleanYesWhether the connection is invite-only
​ ↳ is_privatebooleanYesWhether the connection is private
​ ↳ shared_with_allbooleanYesWhether the connection is shared with all users
​ ↳ is_stalestringNoStale status string
​ ↳ is_sharedstringNoShared status string
​ ↳ marked_stale_atstringNoDate when marked stale
​ ↳ labelstringNoUser label for the connection
​ ↳ identifierstringNoIdentifier
​ ↳ titlestringNoTitle of the connection
​ ↳ urlstringNoURL to the connection resource
​ ↳ groupsarrayNoArray of groups associated with the connection
​ ↳ membersstringNoMembers associated with the connection
​ ↳ permissionsobjectNoPermissions for the connection
​ ↳ public_idstringNoPublic UUID for the connection
​ ↳ account_public_idstringNoPublic UUID for the associated account
​ ↳ customuser_public_idstringNoPublic UUID for the associated custom user
​ ↳ implementation_idstringNoImplementation ID (was selected_api)
​ ↳ profile_idstringNoProfile ID (was customuser_id)
​ ↳ is_expiredstringNoWhether the connection is expired (mapped from is_stale)
​ ↳ expired_atstringNoDate when connection expired (mapped from marked_stale_at)
​ ↳ app_keystringNoApp Key extracted from implementation_id
​ ↳ app_versionstringNoApp Version extracted from implementation_id
Example:
const { data: connection } = await zapier.findFirstConnection();

findUniqueConnection

Find a unique connection matching the criteria Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ searchstringNoSearch term to filter connections by title
​ ↳ titlestringNoFilter connections by exact title match (searches first, then filters locally)
​ ↳ ownerstringNoFilter by owner, ‘me’ for your own connections or a specific user ID
​ ↳ appstringNoApp key of connections to list (e.g., ‘SlackCLIAPI’ or slug like ‘github’)
​ ↳ accountstringNoAccount to filter by
​ ↳ includeSharedbooleanNoInclude connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections.
​ ↳ expiredbooleanNoShow only expired connections (default: only non-expired connections are returned)
Returns: Promise<ConnectionItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesUnique identifier for the connection
​ ↳ datestringYesDate created
​ ↳ lastchangedstringNoDate last changed
​ ↳ account_idstringYesAccount ID associated with this connection
​ ↳ destination_selected_apistringNoDestination API key (if applicable)
​ ↳ is_invite_onlybooleanYesWhether the connection is invite-only
​ ↳ is_privatebooleanYesWhether the connection is private
​ ↳ shared_with_allbooleanYesWhether the connection is shared with all users
​ ↳ is_stalestringNoStale status string
​ ↳ is_sharedstringNoShared status string
​ ↳ marked_stale_atstringNoDate when marked stale
​ ↳ labelstringNoUser label for the connection
​ ↳ identifierstringNoIdentifier
​ ↳ titlestringNoTitle of the connection
​ ↳ urlstringNoURL to the connection resource
​ ↳ groupsarrayNoArray of groups associated with the connection
​ ↳ membersstringNoMembers associated with the connection
​ ↳ permissionsobjectNoPermissions for the connection
​ ↳ public_idstringNoPublic UUID for the connection
​ ↳ account_public_idstringNoPublic UUID for the associated account
​ ↳ customuser_public_idstringNoPublic UUID for the associated custom user
​ ↳ implementation_idstringNoImplementation ID (was selected_api)
​ ↳ profile_idstringNoProfile ID (was customuser_id)
​ ↳ is_expiredstringNoWhether the connection is expired (mapped from is_stale)
​ ↳ expired_atstringNoDate when connection expired (mapped from marked_stale_at)
​ ↳ app_keystringNoApp Key extracted from implementation_id
​ ↳ app_versionstringNoApp Version extracted from implementation_id
Example:
const { data: connection } = await zapier.findUniqueConnection();

getConnection

Execute getConnection Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly.
Returns: Promise<ConnectionItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesUnique identifier for the connection
​ ↳ datestringYesDate created
​ ↳ lastchangedstringNoDate last changed
​ ↳ account_idstringYesAccount ID associated with this connection
​ ↳ destination_selected_apistringNoDestination API key (if applicable)
​ ↳ is_invite_onlybooleanYesWhether the connection is invite-only
​ ↳ is_privatebooleanYesWhether the connection is private
​ ↳ shared_with_allbooleanYesWhether the connection is shared with all users
​ ↳ is_stalestringNoStale status string
​ ↳ is_sharedstringNoShared status string
​ ↳ marked_stale_atstringNoDate when marked stale
​ ↳ labelstringNoUser label for the connection
​ ↳ identifierstringNoIdentifier
​ ↳ titlestringNoTitle of the connection
​ ↳ urlstringNoURL to the connection resource
​ ↳ groupsarrayNoArray of groups associated with the connection
​ ↳ membersstringNoMembers associated with the connection
​ ↳ permissionsobjectNoPermissions for the connection
​ ↳ public_idstringNoPublic UUID for the connection
​ ↳ account_public_idstringNoPublic UUID for the associated account
​ ↳ customuser_public_idstringNoPublic UUID for the associated custom user
​ ↳ implementation_idstringNoImplementation ID (was selected_api)
​ ↳ profile_idstringNoProfile ID (was customuser_id)
​ ↳ is_expiredstringNoWhether the connection is expired (mapped from is_stale)
​ ↳ expired_atstringNoDate when connection expired (mapped from marked_stale_at)
​ ↳ app_keystringNoApp Key extracted from implementation_id
​ ↳ app_versionstringNoApp Version extracted from implementation_id
Example:
const { data: connection } = await zapier.getConnection();

getConnectionStartUrl

Mint a short-lived URL that begins an SDK-initiated connection flow. The URL is signed by zapier.com and bound to the current user/account — opening it in a different browser session will fail the binding check. Returns the URL as data so the caller decides what to do with it. Use this directly (rather than the higher-level create-connection) when you want either of: (a) hand off the URL and not block waiting for completion — call this alone, skip wait-for-new-connection entirely, or (b) do something custom between minting the URL and waiting for the connection — call this, then email or DM the URL, render it as a QR code for mobile sign-in, etc., then call wait-for-new-connection. For the common case where you’d just print and poll back-to-back, create-connection is one call. Pair with wait-for-new-connection to detect completion: pass the startedAt returned here straight through (it’s the server’s mint time, so polling isn’t affected by client clock skew). Example (JS):
const {
  data: { url, app, startedAt },
} = await zapier.getConnectionStartUrl({ app: "slack" });
// hand `url` off — print it, DM it, email it, render a button, whatever
const { data: conn } = await zapier.waitForNewConnection({ app, startedAt });
Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
Returns: Promise<ConnectionStartUrlItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ urlstringYesURL the user should open in their browser to complete the auth flow. Single-use, time-limited.
​ ↳ expiresAtnumberYesUnix timestamp (seconds) after which the URL’s signature is rejected by zapier.com.
​ ↳ startedAtnumberYesUnix timestamp (seconds) when the server minted the URL. Use it as the startedAt for wait-for-new-connection so polling is anchored to server time rather than a possibly-skewed client clock.
​ ↳ appstringYesVersionless app key the URL was minted for (e.g., ‘SlackCLIAPI’). Useful for downstream filtering.
Example:
const result = await zapier.getConnectionStartUrl({
  app: "example-app",
});

listConnections

List available connections with optional filtering Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ searchstringNoSearch term to filter connections by title
​ ↳ titlestringNoFilter connections by exact title match (searches first, then filters locally)
​ ↳ ownerstringNoFilter by owner, ‘me’ for your own connections or a specific user ID
​ ↳ appstringNoApp key of connections to list (e.g., ‘SlackCLIAPI’ or slug like ‘github’)
​ ↳ connectionsarrayNoList of connection IDs to filter by
​ ↳ accountstringNoAccount to filter by
​ ↳ includeSharedbooleanNoInclude connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections.
​ ↳ expiredbooleanNoShow only expired connections (default: only non-expired connections are returned)
​ ↳ pageSizenumberNoNumber of connections per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<ConnectionItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYesUnique identifier for the connection
​ ↳ datestringYesDate created
​ ↳ lastchangedstringNoDate last changed
​ ↳ account_idstringYesAccount ID associated with this connection
​ ↳ destination_selected_apistringNoDestination API key (if applicable)
​ ↳ is_invite_onlybooleanYesWhether the connection is invite-only
​ ↳ is_privatebooleanYesWhether the connection is private
​ ↳ shared_with_allbooleanYesWhether the connection is shared with all users
​ ↳ is_stalestringNoStale status string
​ ↳ is_sharedstringNoShared status string
​ ↳ marked_stale_atstringNoDate when marked stale
​ ↳ labelstringNoUser label for the connection
​ ↳ identifierstringNoIdentifier
​ ↳ titlestringNoTitle of the connection
​ ↳ urlstringNoURL to the connection resource
​ ↳ groupsarrayNoArray of groups associated with the connection
​ ↳ membersstringNoMembers associated with the connection
​ ↳ permissionsobjectNoPermissions for the connection
​ ↳ public_idstringNoPublic UUID for the connection
​ ↳ account_public_idstringNoPublic UUID for the associated account
​ ↳ customuser_public_idstringNoPublic UUID for the associated custom user
​ ↳ implementation_idstringNoImplementation ID (was selected_api)
​ ↳ profile_idstringNoProfile ID (was customuser_id)
​ ↳ is_expiredstringNoWhether the connection is expired (mapped from is_stale)
​ ↳ expired_atstringNoDate when connection expired (mapped from marked_stale_at)
​ ↳ app_keystringNoApp Key extracted from implementation_id
​ ↳ app_versionstringNoApp Version extracted from implementation_id
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: connections, nextCursor } = await zapier.listConnections();

// Or iterate over all pages
for await (const page of zapier.listConnections()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const connection of zapier.listConnections().items()) {
  // Do something with each connection
}

waitForNewConnection

Wait for a new connection to appear for the given app. Polls /api/v0/connections with server-side ordering=-date until the most recent matching row’s date is at or after the started-at timestamp, then returns it. Pair with get-connection-start-url — that mints the URL the user opens, this waits for the resulting connection to land. Errors with a timeout after the configured timeout (default 5 min). Example (JS):
const {
  data: { url, app, startedAt },
} = await zapier.getConnectionStartUrl({ app: "slack" });
// show `url` to the user via the channel they're reading from
const { data: conn } = await zapier.waitForNewConnection({ app, startedAt });
Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ startedAtnumberYesUnix timestamp (seconds). Only connections whose date is at or after this value count as ‘new’. Prefer the startedAt returned by get-connection-start-url — it’s server-stamped, so the comparison isn’t thrown off by client clock skew. If you mint the timestamp yourself, capture it before showing the start URL so a fast OAuth completion isn’t missed.
​ ↳ timeoutMsnumberNoHow long to wait before giving up. Default 5 minutes (300_000).
​ ↳ pollIntervalMsnumberNoDelay before the first poll request, in ms. Default 3 seconds (3_000). Subsequent polling cadence is managed by the SDK’s polling primitive (backoff with sane defaults).
Returns: Promise<ConnectionItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesThe new connection’s ID. Public UUID when available, falling back to the numeric ID.
​ ↳ appstringYesVersionless app key the connection was created for (e.g., ‘SlackCLIAPI’).
​ ↳ titlestringNoHuman-readable connection title set by the auth flow, when available.
Example:
const { data: connection } = await zapier.waitForNewConnection({
  app: "example-app",
  startedAt: 100,
});

HTTP Requests

fetch

Make authenticated HTTP requests to any API through Zapier. Pass a connectionId to automatically inject the user’s stored credentials (OAuth tokens, API keys, etc.) into the outgoing request. Mirrors the native fetch(url, init?) signature with additional Zapier-specific options. Parameters:
NameTypeRequiredDescription
urlstring, customYesThe full URL of the API endpoint to call (proxied through Zapier’s Relay service)
initobjectNoRequest options including method, headers, body, and authentication
​ ↳ methodstringNoHTTP method for the request (defaults to GET)
​ ↳ headersobjectNoHTTP headers to include in the request
​ ↳ bodystring, custom, recordNoRequest body — plain objects and JSON strings are auto-detected and Content-Type is set accordingly
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly.
​ ↳ callbackUrlstringNoURL to send async response to (makes request async)
​ ↳ maxTimenumberNoMaximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling.
Returns: Promise<Response> Example:
const result = await zapier.fetch("https://example.com", {});

Tables

createTable

Create a new table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ namestringYesThe name for the new table
​ ↳ descriptionstringNoAn optional description of the table
Returns: Promise<TableItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ namestringYes
​ ↳ descriptionstringNo
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ kindstringYes
​ ↳ account_idstringYes
​ ↳ profile_idstringYes
​ ↳ parent_table_idstringNo
Example:
const result = await zapier.createTable({
  name: "example-name",
});

createTableFields

Create one or more fields in a table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ fields[]object[]YesArray of field definitions to create
​   ↳ typestringYesThe data type of the field
​   ↳ namestringYesThe display name of the field
​   ↳ optionsobjectNoData configuration options for the field
​   ↳ configobjectNoDisplay configuration for the field
Returns: Promise<FieldItem[]>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ typestringYes
​ ↳ namestringYes
​ ↳ created_atstringNo
​ ↳ edited_atstringNo
​ ↳ optionsobjectNo
​ ↳ configobjectNo
​ ↳ deleted_atstringNo
Example:
const result = await zapier.createTableFields({
  table: "example-table",
  fields: [
    {
      type: "string",
      name: "example-name",
    },
  ],
});

createTableRecords

Create one or more records in a table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ records[]object[]YesArray of records to create (max 100)
​   ↳ dataobjectYesThe field values for the record, keyed by field ID
​ ↳ keyModestringNoHow to interpret field keys in record data. “names” (default) uses human-readable field names, “ids” uses raw field IDs (f1, f2).
Returns: Promise<RecordItem[]>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ dataobjectYes
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ deleted_atstringNo
Example:
const result = await zapier.createTableRecords({
  table: "example-table",
  records: [
    {
      data: {},
    },
  ],
});

deleteTable

Delete a table by its ID Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
Returns: Promise<{ success: boolean }> Example:
const result = await zapier.deleteTable({
  table: "example-table",
});

deleteTableFields

Delete one or more fields from a table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ fieldsarrayYesFields to operate on. Accepts field names (e.g., “Email”) or IDs (e.g., “f6”, “6”, or 6).
Returns: Promise<{ success: boolean }> Example:
const result = await zapier.deleteTableFields({
  table: "example-table",
  fields: ["example-field"],
});

deleteTableRecords

Delete one or more records from a table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ recordsarrayYesRecord IDs to operate on
Returns: Promise<{ success: boolean }> Example:
const result = await zapier.deleteTableRecords({
  table: "example-table",
  records: ["example-record"],
});

getTable

Get detailed information about a specific table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
Returns: Promise<TableItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ namestringYes
​ ↳ descriptionstringNo
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ kindstringYes
​ ↳ account_idstringYes
​ ↳ profile_idstringYes
​ ↳ parent_table_idstringNo
Example:
const { data: table } = await zapier.getTable({
  table: "example-table",
});

getTableRecord

Get a single record from a table by ID Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ recordstringYesThe unique identifier of the record
​ ↳ keyModestringNoHow to interpret field keys in record data. “names” (default) uses human-readable field names, “ids” uses raw field IDs (f1, f2).
Returns: Promise<RecordItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ dataobjectYes
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ deleted_atstringNo
Example:
const { data: record } = await zapier.getTableRecord({
  table: "example-table",
  record: "example-record",
});

listTableFields

List fields for a table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ fieldsarrayNoFields to operate on. Accepts field names (e.g., “Email”) or IDs (e.g., “f6”, “6”, or 6).
​ ↳ trashstringNoControl soft-deleted item visibility. “exclude” (default) returns active items only, “include” returns both active and soft-deleted, “only” returns soft-deleted items only.
Returns: Promise<PaginatedResult<FieldItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ typestringYes
​ ↳ namestringYes
​ ↳ created_atstringNo
​ ↳ edited_atstringNo
​ ↳ optionsobjectNo
​ ↳ configobjectNo
​ ↳ deleted_atstringNo
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: fields, nextCursor } = await zapier.listTableFields({
  table: "example-table",
});

// Or iterate over all pages
for await (const page of zapier.listTableFields({
  table: "example-table",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const field of zapier
  .listTableFields({
    table: "example-table",
  })
  .items()) {
  // Do something with each field
}

listTableRecords

List records in a table with optional filtering and sorting Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ filters[]object[]NoFilter conditions for the query
​   ↳ fieldKeystringYesThe field key to filter on (e.g. f1, f2)
​   ↳ operatorstringYesThe comparison operator
​   ↳ valueunknownNoThe value to compare against
​ ↳ sortobjectNoSort records by a field
​   ↳ fieldKeystringYesThe field key to sort by
​   ↳ directionstringNoSort direction
​ ↳ pageSizenumberNoNumber of records per page (max 1000)
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
​ ↳ keyModestringNoHow to interpret field keys in record data. “names” (default) uses human-readable field names, “ids” uses raw field IDs (f1, f2).
​ ↳ trashstringNoControl soft-deleted item visibility. “exclude” (default) returns active items only, “include” returns both active and soft-deleted, “only” returns soft-deleted items only.
Returns: Promise<PaginatedResult<RecordItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ dataobjectYes
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ deleted_atstringNo
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: records, nextCursor } = await zapier.listTableRecords({
  table: "example-table",
});

// Or iterate over all pages
for await (const page of zapier.listTableRecords({
  table: "example-table",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const record of zapier
  .listTableRecords({
    table: "example-table",
  })
  .items()) {
  // Do something with each record
}

listTables

List tables available to the authenticated user Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablesarrayNoFilter by specific table IDs
​ ↳ kindstringNoFilter by table type
​ ↳ searchstringNoSearch term to filter tables by name
​ ↳ ownerstringNoFilter by table owner. Use “me” for the current user, or a numeric user ID. Requires includeShared to be true.
​ ↳ includeSharedbooleanNoInclude tables shared with you. Without this, only your own tables are returned.
​ ↳ pageSizenumberNoNumber of tables per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<TableItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ namestringYes
​ ↳ descriptionstringNo
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ kindstringYes
​ ↳ account_idstringYes
​ ↳ profile_idstringYes
​ ↳ parent_table_idstringNo
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: tables, nextCursor } = await zapier.listTables();

// Or iterate over all pages
for await (const page of zapier.listTables()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const table of zapier.listTables().items()) {
  // Do something with each table
}

updateTableRecords

Update one or more records in a table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ records[]object[]YesArray of records to update (max 100)
​   ↳ idstringYesThe record ID to update
​   ↳ dataobjectYesThe field values to update, keyed by field key
​ ↳ keyModestringNoHow to interpret field keys in record data. “names” (default) uses human-readable field names, “ids” uses raw field IDs (f1, f2).
Returns: Promise<RecordItem[]>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ dataobjectYes
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ deleted_atstringNo
Example:
const result = await zapier.updateTableRecords({
  table: "example-table",
  records: [
    {
      id: "example-id",
      data: {},
    },
  ],
});

Code Workflows (Experimental)

ℹ️ Experimental. Import from "@zapier/zapier-sdk/experimental" to use these methods. Methods and behavior may change.

cancelDurableRun

Cancel a run-once durable run in initialized or started status. Returns 409 if the run is already terminal. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ runstringYesDurable run ID
Returns: Promise<DurableRunItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesRun ID that was targeted
​ ↳ statusstringYesAlways cancelled on a successful call. Synthesized client-side — the backend returns 204; callers needing the run’s full state should follow up with getDurableRun.
Example:
const result = await zapier.cancelDurableRun({
  run: "example-run",
});

createWorkflow

Create a durable workflow container. Starts disabled with no version; publish a version to add code. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ namestringYesWorkflow name
​ ↳ descriptionstringNoOptional description for the workflow
​ ↳ privatebooleanNoIf true, only the creating user can see or manage this workflow. Defaults to false (account-visible).
Returns: Promise<WorkflowItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow ID (UUID)
​ ↳ namestringYesWorkflow name
​ ↳ descriptionstringYesWorkflow description (null if unset)
​ ↳ trigger_urlstringYesPublic webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive.
​ ↳ enabledbooleanYesWhether the workflow currently accepts triggers. Always false on a new workflow until enabled.
​ ↳ is_privatebooleanYesWhether the workflow is private to the creating user. False means account-visible.
​ ↳ created_by_user_idstringYesUser ID of the workflow creator (null in legacy data)
​ ↳ created_atstringYesWhen the workflow was created (ISO-8601)
Example:
const result = await zapier.createWorkflow({
  name: "example-name",
});

deleteWorkflow

Delete a durable workflow. Throws ZapierNotFoundError if the workflow doesn’t exist; callers wanting idempotency should catch that themselves. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
Returns: Promise<{ success: boolean }>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow ID that was targeted for deletion
Example:
const result = await zapier.deleteWorkflow({
  workflow: "example-workflow",
});

disableWorkflow

Disable a durable workflow so it stops accepting triggers Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
Returns: Promise<WorkflowItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow ID (UUID)
​ ↳ enabledbooleanYesWorkflow’s enabled state after the operation. Typically false; mirrors the row’s true state in case a concurrent enable raced with this call.
Example:
const result = await zapier.disableWorkflow({
  workflow: "example-workflow",
});

enableWorkflow

Enable a durable workflow so it accepts triggers Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
Returns: Promise<WorkflowItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow ID (UUID)
​ ↳ enabledbooleanYesWorkflow’s enabled state after the operation (always true)
Example:
const result = await zapier.enableWorkflow({
  workflow: "example-workflow",
});

getDurableRun

Get the full state of a run-once durable run, including its operations journal Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ runstringYesDurable run ID
Returns: Promise<DurableRunItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesRun ID (UUID)
​ ↳ statusstringYesRun lifecycle status. finished / failed / cancelled are terminal.
​ ↳ inputunknownYesInput data passed to the run
​ ↳ outputunknownYesReturn value, present when status is finished
​ ↳ errorobjectYesStructured error details when the run failed (null otherwise)
​ ↳ executionobjectYesLinked execution, including the operations journal. Null while the run is still in initialized state.
​ ↳ is_privatebooleanYesWhen true, the run is visible only to the creating user; otherwise visible across the account.
​ ↳ created_atstringYesWhen the run was created (ISO-8601)
​ ↳ updated_atstringYesWhen the run was last updated (ISO-8601)
Example:
const { data: durableRun } = await zapier.getDurableRun({
  run: "example-run",
});

getTriggerRun

Get the workflow run associated with a deployed workflow’s trigger. Useful immediately after firing a trigger, when you have the trigger ID but not yet the run ID. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ triggerstringYesWorkflow trigger ID
Returns: Promise<WorkflowRunItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow run ID (UUID)
​ ↳ durable_run_idstringYesLinked sdkdurableapi run ID. Null until the durable run is created.
​ ↳ workflow_version_idstringYesWorkflow version the run is bound to
​ ↳ statusstringYesWorkflow run lifecycle status. finished / failed / cancelled are terminal.
​ ↳ inputunknownYesInput passed to the run
​ ↳ outputunknownYesReturn value, present when status is finished
​ ↳ errorunknownYesError payload when status is failed (null otherwise)
​ ↳ created_atstringYesWhen the run was created (ISO-8601)
​ ↳ updated_atstringYesWhen the run was last updated (ISO-8601)
Example:
const { data: workflowRun } = await zapier.getTriggerRun({
  trigger: "example-trigger",
});

getWorkflow

Get a durable workflow with its current version details and trigger claim status Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
Returns: Promise<WorkflowItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow ID (UUID)
​ ↳ namestringYesWorkflow name
​ ↳ descriptionstringYesOptional workflow description (null if unset)
​ ↳ trigger_urlstringYesPublic webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive.
​ ↳ enabledbooleanYesWhether the workflow currently accepts triggers
​ ↳ disabled_reasonstringNoWhy the workflow is off, when system-disabled. Null when not system-disabled. Independent of per-trigger claim status: an enabled workflow can still have a failed trigger.
​ ↳ is_privatebooleanYesWhether the workflow is private to the creating user. False means account-visible.
​ ↳ created_by_user_idstringYesUser ID of the workflow creator (null in legacy data)
​ ↳ current_versionobjectNoThe currently published version, if any. Absent for workflows with no version published yet.
​   ↳ idstringYesWorkflow version ID (UUID)
​   ↳ workflow_idstringYesParent workflow ID
​   ↳ source_filesobjectYesSource files keyed by filename → contents
​   ↳ zapier_durable_versionstringYesPinned semver of @zapier/zapier-durable used by this version’s runs
​   ↳ dependenciesobjectYesAdditional npm dependencies pinned for this version (or null)
​   ↳ created_by_user_idstringYesID of the user who published this version
​   ↳ created_atstringYesWhen the version was published (ISO-8601)
​   ↳ triggerobjectYesTrigger configuration persisted on this version, or null for webhook-only workflows.
​   ↳ connectionsobjectYesConnection aliases bound on this version (or null).
​   ↳ app_versionsobjectYesApp-version pins bound on this version (or null).
​ ↳ triggers[]object[]YesTrigger configurations from the current version, with live claim status. Empty array when the workflow has no triggers.
​   ↳ selected_apistringYesZapier app/API identifier (e.g. ‘GoogleSheetsAPI’)
​   ↳ actionstringYesTrigger action key (e.g. ‘new_row’)
​   ↳ authentication_idstringNoConnection ID for the trigger source. Null for no-auth triggers.
​   ↳ paramsobjectNoTrigger parameters as a JSON object
​   ↳ statusstringYesLive trigger claim status — whether the trigger is currently subscribed to its source.
​   ↳ errorstringNoFailure reason for the latest claim. Present (non-null) only when status is ‘failed’.
​ ↳ created_atstringYesWhen the workflow was created (ISO-8601)
​ ↳ updated_atstringYesWhen the workflow was last modified (ISO-8601)
Example:
const { data: workflow } = await zapier.getWorkflow({
  workflow: "example-workflow",
});

getWorkflowRun

Get the current state of a workflow run (a triggered execution of a deployed workflow) Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringNoParent workflow ID — used only to scope the CLI run-id picker; ignored by the API call.
​ ↳ runstringYesWorkflow run ID
Returns: Promise<WorkflowRunItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow run ID (UUID)
​ ↳ trigger_idstringYesID of the trigger that fired this run, if any
​ ↳ durable_run_idstringYesLinked sdkdurableapi run ID. Null until the durable run is created.
​ ↳ workflow_version_idstringYesWorkflow version the run is bound to
​ ↳ statusstringYesWorkflow run lifecycle status. finished / failed / cancelled are terminal.
​ ↳ inputunknownYesInput passed to the run
​ ↳ outputunknownYesReturn value, present when status is finished
​ ↳ errorunknownYesError payload when status is failed (null otherwise)
​ ↳ created_atstringYesWhen the run was created (ISO-8601)
​ ↳ updated_atstringYesWhen the run was last updated (ISO-8601)
Example:
const { data: workflowRun } = await zapier.getWorkflowRun({
  run: "example-run",
});

getWorkflowVersion

Get full details of a workflow version including source files Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
​ ↳ versionstringYesWorkflow version ID
Returns: Promise<WorkflowVersionItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow version ID (UUID)
​ ↳ workflow_idstringYesParent workflow ID (UUID)
​ ↳ source_filesobjectYesSource files keyed by filename → contents
​ ↳ zapier_durable_versionstringYesPinned semver of @zapier/zapier-durable used by this version’s runs
​ ↳ dependenciesobjectYesAdditional npm dependencies pinned for this version (or null)
​ ↳ created_by_user_idstringYesID of the user who published this version
​ ↳ created_atstringYesWhen the version was published (ISO-8601)
​ ↳ triggerobjectYesTrigger configuration persisted on this version, or null for webhook-only workflows.
​ ↳ connectionsobjectYesConnection aliases bound on this version (or null).
​ ↳ app_versionsobjectYesApp-version pins bound on this version (or null).
Example:
const { data: workflowVersion } = await zapier.getWorkflowVersion({
  workflow: "example-workflow",
  version: "example-version",
});

listDurableRuns

List run-once durable runs for the authenticated account, newest first Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ pageSizenumberNoNumber of runs per page (max 100)
​ ↳ cursorstringNoPagination cursor
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
Returns: Promise<PaginatedResult<DurableRunItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYesRun ID (UUID)
​ ↳ statusstringYesRun lifecycle status. finished / failed / cancelled are terminal.
​ ↳ inputunknownYesInput data passed to the run
​ ↳ outputunknownYesReturn value, present when status is finished
​ ↳ errorobjectYesStructured error details when the run failed (null otherwise)
​ ↳ execution_idstringYesLinked execution ID. Null until the run leaves the initialized state.
​ ↳ is_privatebooleanYesWhen true, the run is visible only to the creating user; otherwise visible across the account.
​ ↳ created_atstringYesWhen the run was created (ISO-8601)
​ ↳ updated_atstringYesWhen the run was last updated (ISO-8601)
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: durableRuns, nextCursor } = await zapier.listDurableRuns();

// Or iterate over all pages
for await (const page of zapier.listDurableRuns()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const durableRun of zapier.listDurableRuns().items()) {
  // Do something with each durableRun
}

listWorkflowRuns

List workflow runs (triggered executions) for a specific deployed workflow, newest first Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
​ ↳ pageSizenumberNoNumber of runs per page (max 100)
​ ↳ cursorstringNoPagination cursor
​ ↳ maxItemsnumberNoMaximum total runs to return across all pages
Returns: Promise<PaginatedResult<WorkflowRunItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYesWorkflow run ID (UUID)
​ ↳ trigger_idstringYesID of the trigger that fired this run, if any. Null for runs created without a trigger.
​ ↳ durable_run_idstringYesLinked sdkdurableapi run ID. Null until the durable run is created.
​ ↳ workflow_version_idstringYesWorkflow version the run is bound to. Null in rare edge cases.
​ ↳ statusstringYesWorkflow run lifecycle status. finished / failed / cancelled are terminal.
​ ↳ inputunknownYesInput passed to the run
​ ↳ errorunknownYesError payload when status is failed (null otherwise)
​ ↳ created_atstringYesWhen the run was created (ISO-8601)
​ ↳ updated_atstringYesWhen the run was last updated (ISO-8601)
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: workflowRuns, nextCursor } = await zapier.listWorkflowRuns({
  workflow: "example-workflow",
});

// Or iterate over all pages
for await (const page of zapier.listWorkflowRuns({
  workflow: "example-workflow",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const workflowRun of zapier
  .listWorkflowRuns({
    workflow: "example-workflow",
  })
  .items()) {
  // Do something with each workflowRun
}

listWorkflowVersions

List published versions for a workflow, newest first Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
​ ↳ pageSizenumberNoNumber of versions per page (max 100)
​ ↳ cursorstringNoPagination cursor
​ ↳ maxItemsnumberNoMaximum total versions to return across all pages
Returns: Promise<PaginatedResult<WorkflowVersionItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYesWorkflow version ID (UUID)
​ ↳ workflow_idstringYesParent workflow ID (UUID)
​ ↳ zapier_durable_versionstringYesPinned semver of @zapier/zapier-durable used by this version’s runs
​ ↳ dependenciesobjectYesAdditional npm dependencies pinned for this version (or null)
​ ↳ created_by_user_idstringYesID of the user who published this version
​ ↳ created_atstringYesWhen the version was published (ISO-8601)
​ ↳ triggerobjectYesTrigger configuration persisted on this version, or null for webhook-only workflows.
​ ↳ connectionsobjectYesConnection aliases bound on this version (or null).
​ ↳ app_versionsobjectYesApp-version pins bound on this version (or null).
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: workflowVersions, nextCursor } =
  await zapier.listWorkflowVersions({
    workflow: "example-workflow",
  });

// Or iterate over all pages
for await (const page of zapier.listWorkflowVersions({
  workflow: "example-workflow",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const workflowVersion of zapier
  .listWorkflowVersions({
    workflow: "example-workflow",
  })
  .items()) {
  // Do something with each workflowVersion
}

listWorkflows

List all active durable workflows for the authenticated account Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ pageSizenumberNoNumber of workflows per page (max 100)
​ ↳ maxItemsnumberNoMaximum total workflows to return across all pages
​ ↳ cursorstringNoCursor to start from for pagination
Returns: Promise<PaginatedResult<WorkflowItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYesWorkflow ID (UUID)
​ ↳ namestringYesWorkflow name
​ ↳ descriptionstringYesOptional workflow description (null if unset)
​ ↳ trigger_urlstringYesPublic webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive.
​ ↳ enabledbooleanYesWhether the workflow currently accepts triggers
​ ↳ disabled_reasonstringNoWhy the workflow is off, when system-disabled. Null when not system-disabled.
​ ↳ is_privatebooleanYesWhether the workflow is private to the creating user. False means account-visible.
​ ↳ created_by_user_idstringYesUser ID of the workflow creator (null in legacy data)
​ ↳ current_version_idstringYesID of the workflow version that runs handle. Null until a version is published.
​ ↳ triggers[]object[]YesTrigger configurations from the current version, with live claim status. Empty array when the workflow has no triggers.
​   ↳ selected_apistringYesZapier app/API identifier (e.g. ‘GoogleSheetsAPI’)
​   ↳ actionstringYesTrigger action key (e.g. ‘new_row’)
​   ↳ authentication_idstringNoConnection ID for the trigger source. Null for no-auth triggers.
​   ↳ paramsobjectNoTrigger parameters as a JSON object
​   ↳ statusstringYesLive trigger claim status — whether the trigger is currently subscribed to its source.
​   ↳ errorstringNoFailure reason for the latest claim. Present (non-null) only when status is ‘failed’.
​ ↳ created_atstringYesWhen the workflow was created (ISO-8601)
​ ↳ updated_atstringYesWhen the workflow was last modified (ISO-8601)
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: workflows, nextCursor } = await zapier.listWorkflows();

// Or iterate over all pages
for await (const page of zapier.listWorkflows()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const workflow of zapier.listWorkflows().items()) {
  // Do something with each workflow
}

publishWorkflowVersion

Publish a new version of a durable workflow. Enables the workflow by default. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
​ ↳ sourceFilesobjectYesSource files keyed by filename → contents
​ ↳ dependenciesobjectNoOptional npm package dependencies
​ ↳ zapierDurableVersionstringNoExact semver of @zapier/zapier-durable to use (e.g. “1.2.3”). Defaults to server-configured version if omitted.
​ ↳ enabledbooleanNoEnable the workflow after publishing. Defaults to true; pass false to publish without enabling.
​ ↳ connectionsobjectNoMap of connection aliases to Zapier connections used by the workflow. Pass null to clear an existing binding.
​ ↳ appVersionsobjectNoMap of app keys to pinned app implementation/version used by the workflow. Pass null to clear an existing binding.
​ ↳ triggerobjectNoTrigger configuration. When provided, the workflow subscribes to a Zapier trigger; omit for webhook-only workflows.
​   ↳ selectedApistringNoZapier app/API identifier (e.g. ‘GoogleSheetsAPI’). Required when a trigger is configured.
​   ↳ actionstringYesTrigger action key (e.g. ‘new_row’)
​   ↳ authenticationIdstringNoConnection ID for the trigger source. Omit or pass null for no-auth triggers (e.g. Schedule by Zapier).
​   ↳ paramsobjectNoTrigger parameters as a JSON object
Returns: Promise<WorkflowVersionItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow version ID (UUID)
​ ↳ workflow_idstringYesParent workflow ID (UUID)
​ ↳ source_filesobjectYesSource files keyed by filename → contents
​ ↳ zapier_durable_versionstringYesPinned semver of @zapier/zapier-durable used by this version’s runs
​ ↳ dependenciesobjectYesAdditional npm dependencies pinned for this version (or null)
​ ↳ created_by_user_idstringYesID of the user who published this version
​ ↳ created_atstringYesWhen the version was published (ISO-8601)
​ ↳ triggerobjectYesTrigger configuration persisted on this version, or null for webhook-only workflows.
​ ↳ connectionsobjectYesConnection aliases bound on this version (or null).
​ ↳ app_versionsobjectYesApp-version pins bound on this version (or null).
Example:
const result = await zapier.publishWorkflowVersion({
  workflow: "example-workflow",
  sourceFiles: {},
});

runDurable

Run a workflow source file as a run-once durable run on sdkdurableapi (no deployed workflow required). Returns the run ID immediately; poll via getDurableRun for terminal status. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ sourceFilesobjectYesSource files keyed by filename → contents
​ ↳ inputunknownNoInput data passed to the run
​ ↳ dependenciesobjectNoOptional npm package dependencies
​ ↳ zapierDurableVersionstringNoExact semver of @zapier/zapier-durable to use (e.g. “1.2.3”). Defaults to server-configured version if omitted.
​ ↳ connectionsobjectNoNamed connection aliases. Maps each alias to an object holding its Zapier connection ID, e.g. { "slack": { "connectionId": "123" } }.
​ ↳ appVersionsobjectNoPinned app versions. Maps app keys (slugs) to implementation names and versions.
​ ↳ privatebooleanNoOnly the creating user can see the run (default false)
​ ↳ notifications[]object[]NoWebhook subscribers for run lifecycle events. Each entry specifies a URL and the events it subscribes to.
​   ↳ typestringNoNotification transport. Webhook is the only supported type.
​   ↳ urlstringYesURL to POST event notifications to. Payload is {run_id, event}.
​   ↳ max_retriesnumberNoMax delivery attempts with exponential backoff. Defaults to 3 server-side.
​   ↳ eventsarrayYesOne or more lifecycle events to subscribe this URL to.
Returns: Promise<DurableRunItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesRun ID (UUID) — server-generated, time-sortable
​ ↳ statusstringYesAlways initialized on creation. Poll via getDurableRun to observe the run advancing to started / finished / failed / cancelled.
​ ↳ is_privatebooleanYesWhen true, the run is visible only to the creating user; otherwise visible across the account.
​ ↳ created_atstringYesWhen the run was created (ISO-8601)
Example:
const result = await zapier.runDurable({
  sourceFiles: {},
});

triggerWorkflow

Look up a workflow’s trigger URL and fire it manually. The trigger endpoint is tokenized (the URL contains a secret) and takes no auth header, so the SDK uses a raw fetch rather than the api plugin. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
​ ↳ inputunknownNoJSON payload delivered as the trigger body. Sent as application/json; omit to fire with an empty body.
Returns: Promise<WorkflowRunItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ workflowstringYesThe workflow ID that was triggered
​ ↳ statusnumberYesHTTP status returned by the trigger endpoint
​ ↳ bodyunknownYesResponse body from the trigger endpoint. Parsed as JSON when the response body parses, otherwise returned as the raw response text.
Example:
const result = await zapier.triggerWorkflow({
  workflow: "example-workflow",
});

updateWorkflow

Update a durable workflow’s name and/or description Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
​ ↳ namestringNoNew name for the workflow
​ ↳ descriptionstringNoNew description for the workflow (pass null to clear)
Returns: Promise<WorkflowItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow ID (UUID)
​ ↳ namestringYesWorkflow name (post-update)
​ ↳ descriptionstringYesWorkflow description, post-update (null if unset)
​ ↳ trigger_urlstringYesPublic webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive.
​ ↳ enabledbooleanYesWhether the workflow currently accepts triggers
​ ↳ is_privatebooleanYesWhether the workflow is private to the creating user. False means account-visible.
​ ↳ created_by_user_idstringYesUser ID of the workflow creator (null in legacy data)
​ ↳ created_atstringYesWhen the workflow was created (ISO-8601)
​ ↳ updated_atstringYesWhen this update was applied (ISO-8601)
Example:
const result = await zapier.updateWorkflow({
  workflow: "example-workflow",
});

Triggers (Experimental)

ℹ️ Experimental. Import from "@zapier/zapier-sdk/experimental" to use these methods. Methods and behavior may change.

ackTriggerInboxMessages

Acknowledge messages from a lease. Acked messages are removed from the inbox; unacked ones return to the available pool when the lease expires. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ leasestringYesLease ID returned from leaseTriggerInboxMessages
​ ↳ messagesarrayNoSpecific message IDs to ack. Omit to ack every message in the lease.
Returns: Promise<TriggerInboxAckItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ acked_idstringYes
​ ↳ results[]object[]Yes
​   ↳ idstringYes
​   ↳ created_atstringYes
​   ↳ statusstringYesMessage lifecycle status
​   ↳ message_attributesobjectYes
​     ↳ lease_countnumberYes
​     ↳ error_messagestringYes
​     ↳ possible_duplicate_databooleanYes
Example:
const result = await zapier.ackTriggerInboxMessages({
  inbox: "example-inbox",
  lease: "example-lease",
});

createTriggerInbox

Create a new trigger inbox subscription. Always creates a new inbox; use ensureTriggerInbox for get-or-create on a stable name. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ namestringNoOptional inbox name. Auto-generated when omitted. Throws a conflict error if the name is already in use by another subscription.
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ connectionstring, numberNoConnection alias or connection ID. Optional for triggers that don’t require auth.
​ ↳ inputsobjectNoInput parameters for the trigger subscription
​ ↳ notificationUrlstringNoWebhook URL to POST to when new messages arrive
Returns: Promise<TriggerInboxItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const result = await zapier.createTriggerInbox({
  app: "example-app",
  action: "example-action",
});

deleteTriggerInbox

Mark a trigger inbox for deletion Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
Returns: Promise<{ success: boolean }>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const result = await zapier.deleteTriggerInbox({
  inbox: "example-inbox",
});

drainTriggerInbox

Drain an existing trigger inbox: lease currently-available messages, process each via onMessage, return when the inbox is empty, maxMessages is reached, or the abort signal fires. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ onMessagefunctionNoPer-message handler. Resolves to ack; rejects to release-or-leave per releaseOnError. Throw ZapierReleaseTriggerMessageSignal to release explicitly, or ZapierAbortDrainSignal to stop after the current batch.
​ ↳ concurrencynumberNoPer-message handler workers running in parallel. Defaults to leaseLimit, or 1 if neither is set.
​ ↳ leaseLimitnumberNoPer-lease HTTP batch size. Defaults to concurrency, or 1 if neither is set.
​ ↳ leaseSecondsnumberNoSeconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes).
​ ↳ releaseOnErrorbooleanNoIf true, errors release the message when the drain finishes. If false (default), errors leave it leased until the lease timeout. ZapierReleaseTriggerMessageSignal always releases regardless.
​ ↳ continueOnErrorbooleanNoIf false (default, fail-fast), the first handler error rejects and stops the drain. If true, handler errors are observed via onError and the drain continues. SDK-level errors (lease / ack / release) reject regardless.
​ ↳ onErrorfunctionNoPer-message error observer for continueOnError: true. Called with the failure and the message; control-flow signals are filtered out. Throws from onError are swallowed.
​ ↳ signalanyNoAbort signal. Aborting cancels in-flight HTTP, releases unprocessed messages, and resolves cleanly. Errors during shutdown still reject.
​ ↳ maxMessagesnumberNoCap total messages drained. Defaults to draining the inbox until empty.
Returns: Promise<void> Example:
const result = await zapier.drainTriggerInbox({
  inbox: "example-inbox",
  onMessage: async (message) => {
    /* process message */
  },
});

ensureTriggerInbox

Get-or-create a trigger inbox by name. Idempotent on (user, account, name): returns the existing inbox if a matching subscription is registered, creates a new one otherwise. Throws ZapierConflictError if the name exists with a different subscription. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ namestringYesInbox name; serves as the idempotency key. Required for ensureTriggerInbox — without one, the API mints a fresh inbox each call (use createTriggerInbox for that path).
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ connectionstring, numberNoConnection alias or connection ID. Optional for triggers that don’t require auth.
​ ↳ inputsobjectNoInput parameters for the trigger subscription
​ ↳ notificationUrlstringNoWebhook URL to POST to when new messages arrive
Returns: Promise<TriggerInboxItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const result = await zapier.ensureTriggerInbox({
  name: "example-name",
  app: "example-app",
  action: "example-action",
});

getTriggerInbox

Get details of a trigger inbox by ID Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
Returns: Promise<TriggerInboxItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const { data: triggerInbox } = await zapier.getTriggerInbox({
  inbox: "example-inbox",
});

getTriggerInputFieldsSchema

Get the JSON Schema representation of input fields for a trigger. Returns a JSON Schema object describing the structure, types, and validation rules for the trigger’s input parameters. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp key (e.g., ‘SlackCLIAPI’ or slug like ‘github’) to get the input schema for
​ ↳ actionstringYesTrigger action key to get the input schema for
​ ↳ connectionstring, numberNoConnection alias or connection ID. Required if the trigger needs a connection to determine available fields.
​ ↳ inputsobjectNoCurrent input values that may affect the schema (e.g., when fields depend on other field values)
Returns: Promise<any> Example:
const result = await zapier.getTriggerInputFieldsSchema({
  app: "example-app",
  action: "example-action",
});

leaseTriggerInboxMessages

Lease up to N messages from a trigger inbox. Returns messages plus a lease ID; ack within the lease window to remove from the inbox. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ leaseLimitnumberNoMaximum messages to lease in a single batch (1-100)
​ ↳ leaseSecondsnumberNoSeconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes).
​ ↳ signalanyNoAbort signal forwarded to the lease HTTP request. Aborting causes the in-flight request to reject with AbortError.
Returns: Promise<TriggerInboxLeaseItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ lease_idstringYes
​ ↳ leased_untilstringYes
​ ↳ results[]object[]Yes
​   ↳ idstringYes
​   ↳ created_atstringYes
​   ↳ statusstringYesMessage lifecycle status
​   ↳ message_attributesobjectYes
​     ↳ lease_countnumberYes
​     ↳ error_messagestringYes
​     ↳ possible_duplicate_databooleanYes
​   ↳ payloadobjectYes
​ ↳ inbox_attributesobjectYes
​   ↳ statusstringYesInbox lifecycle status
​   ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
Example:
const result = await zapier.leaseTriggerInboxMessages({
  inbox: "example-inbox",
});

listTriggerInboxMessages

List messages in a trigger inbox (no payload, status-only) Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ pageSizenumberNoNumber of messages per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoPagination cursor
Returns: Promise<PaginatedResult<TriggerMessageItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ statusstringYesMessage lifecycle status
​ ↳ message_attributesobjectYes
​   ↳ lease_countnumberYes
​   ↳ error_messagestringYes
​   ↳ possible_duplicate_databooleanYes
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: triggerMessages, nextCursor } =
  await zapier.listTriggerInboxMessages({
    inbox: "example-inbox",
  });

// Or iterate over all pages
for await (const page of zapier.listTriggerInboxMessages({
  inbox: "example-inbox",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const triggerMessage of zapier
  .listTriggerInboxMessages({
    inbox: "example-inbox",
  })
  .items()) {
  // Do something with each triggerMessage
}

listTriggerInboxes

List all trigger inboxes for the authenticated user Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ namestringNoFilter by inbox name (exact match). Names are unique per (user, account), so this returns at most one inbox.
​ ↳ statusstringNoFilter by inbox status
​ ↳ pageSizenumberNoNumber of inboxes per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor (offset) to start from for pagination
Returns: Promise<PaginatedResult<TriggerInboxItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: triggerInboxs, nextCursor } = await zapier.listTriggerInboxes();

// Or iterate over all pages
for await (const page of zapier.listTriggerInboxes()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const triggerInbox of zapier.listTriggerInboxes().items()) {
  // Do something with each triggerInbox
}

listTriggerInputFieldChoices

Get the available choices for a dynamic dropdown input field on a trigger Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ inputFieldstringYesInput field key to get choices for
​ ↳ connectionstring, numberNoConnection alias or connection ID. Required if the trigger needs a connection to populate dynamic dropdown options.
​ ↳ inputsobjectNoCurrent input values that may affect available choices
​ ↳ pagenumberNoPage number for paginated results
​ ↳ pageSizenumberNoNumber of choices per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<InputFieldChoiceItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ keystringNo
​ ↳ labelstringNo
​ ↳ samplestringNo
​ ↳ valuestringNo
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: inputFieldChoices, nextCursor } =
  await zapier.listTriggerInputFieldChoices({
    app: "example-app",
    action: "example-action",
    inputField: "example-input-field",
  });

// Or iterate over all pages
for await (const page of zapier.listTriggerInputFieldChoices({
  app: "example-app",
  action: "example-action",
  inputField: "example-input-field",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const inputFieldChoice of zapier
  .listTriggerInputFieldChoices({
    app: "example-app",
    action: "example-action",
    inputField: "example-input-field",
  })
  .items()) {
  // Do something with each inputFieldChoice
}

listTriggerInputFields

Get the input fields required for a specific trigger Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ connectionstring, numberNoConnection alias or connection ID. Required if the trigger needs a connection to determine available fields.
​ ↳ inputsobjectNoCurrent input values that may affect available fields
​ ↳ pageSizenumberNoNumber of input fields per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<RootFieldItem>>
NameTypeRequiredDescription
data[]object[]YesOne of the variants below, distinguished by type
nextCursorstringNoCursor for the next page; omitted when there are no more pages
When type is "input_field":
NameTypeRequiredDescription
typestringYes
keystringYes
default_valuestringYes
depends_onarrayYes
descriptionstringYes
invalidates_input_fieldsbooleanYes
is_requiredbooleanYes
placeholderstringYes
titlestringYes
value_typestringYes
formatstringNo
itemsobjectNo
​ ↳ typestringYes
When type is "info_field":
NameTypeRequiredDescription
typestringYes
keystringYes
descriptionstringYes
titlestringNo
When type is "fieldset":
NameTypeRequiredDescription
typestringYes
keystringYes
titlestringYes
fieldsarrayYes
Example:
// Get first page and a cursor for the second page
const { data: rootFields, nextCursor } = await zapier.listTriggerInputFields({
  app: "example-app",
  action: "example-action",
});

// Or iterate over all pages
for await (const page of zapier.listTriggerInputFields({
  app: "example-app",
  action: "example-action",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const rootField of zapier
  .listTriggerInputFields({
    app: "example-app",
    action: "example-action",
  })
  .items()) {
  // Do something with each rootField
}

listTriggers

List all triggers for a specific app Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp key of triggers to list (e.g., ‘SlackCLIAPI’ or slug like ‘github’)
​ ↳ pageSizenumberNoNumber of triggers per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<ActionItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringNo
​ ↳ keystringYes
​ ↳ descriptionstringYes
​ ↳ is_importantbooleanNo
​ ↳ is_hiddenbooleanNo
​ ↳ app_keystringYes
​ ↳ app_versionstringNo
​ ↳ action_typestringYes
​ ↳ titlestringYes
​ ↳ typestringYes
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: actions, nextCursor } = await zapier.listTriggers({
  app: "example-app",
});

// Or iterate over all pages
for await (const page of zapier.listTriggers({
  app: "example-app",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const action of zapier
  .listTriggers({
    app: "example-app",
  })
  .items()) {
  // Do something with each action
}

pauseTriggerInbox

Pause a trigger inbox; events stop being collected Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
Returns: Promise<TriggerInboxItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const result = await zapier.pauseTriggerInbox({
  inbox: "example-inbox",
});

releaseTriggerInboxMessages

Release messages from a lease back to the inbox without acknowledging them. Released messages become immediately available for re-leasing. The lease attempt still counts against the per-message lease limit; releasing does not refund the attempt. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ leasestringYesLease ID returned from leaseTriggerInboxMessages
​ ↳ messagesarrayNoSpecific message IDs to release. Omit to release every message in the lease.
Returns: Promise<TriggerInboxReleaseItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ released_idstringYes
​ ↳ results[]object[]Yes
​   ↳ idstringYes
​   ↳ created_atstringYes
​   ↳ statusstringYesMessage lifecycle status
​   ↳ message_attributesobjectYes
​     ↳ lease_countnumberYes
​     ↳ error_messagestringYes
​     ↳ possible_duplicate_databooleanYes
Example:
const result = await zapier.releaseTriggerInboxMessages({
  inbox: "example-inbox",
  lease: "example-lease",
});

resumeTriggerInbox

Resume a paused trigger inbox; events resume being collected Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
Returns: Promise<TriggerInboxItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const result = await zapier.resumeTriggerInbox({
  inbox: "example-inbox",
});

updateTriggerInbox

Update settings on an existing trigger inbox Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ notificationUrlstringNoWebhook URL to POST to when new messages arrive. Pass null to clear.
Returns: Promise<TriggerInboxItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const result = await zapier.updateTriggerInbox({
  inbox: "example-inbox",
});

watchTriggerInbox

Continuously consume a trigger inbox: drain currently-available messages via onMessage, then subscribe to SSE notifications for new arrivals until aborted. A periodic safety drain runs every maxDrainIntervalSeconds (default: 300) to guarantee forward progress if SSE events are missed. Resolves cleanly on signal abort or ZapierAbortDrainSignal from a handler. Transient drain failures (5xx, 429, network blips) retry indefinitely with bounded backoff until they succeed or the watch is aborted; it rejects on a fail-fast handler error, an initialization_failure, or a permanent HTTP error. Real-time wake-up health is reported on stderr: a warning when wake-ups pause and the watch falls back to the safety drain, plus (with debug) transient reconnect notices. Persistent drain failures likewise warn once on stderr while bounded-backoff retries continue. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ onMessagefunctionNoPer-message handler. Resolves to ack; rejects to release-or-leave per releaseOnError. Throw ZapierReleaseTriggerMessageSignal to release explicitly, or ZapierAbortDrainSignal to stop after the current batch.
​ ↳ concurrencynumberNoPer-message handler workers running in parallel. Defaults to leaseLimit, or 1 if neither is set.
​ ↳ leaseLimitnumberNoPer-lease HTTP batch size. Defaults to concurrency, or 1 if neither is set.
​ ↳ leaseSecondsnumberNoSeconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes).
​ ↳ releaseOnErrorbooleanNoIf true, errors release the message when the drain finishes. If false (default), errors leave it leased until the lease timeout. ZapierReleaseTriggerMessageSignal always releases regardless.
​ ↳ continueOnErrorbooleanNoIf false (default, fail-fast), the first handler error rejects and stops the drain. If true, handler errors are observed via onError and the drain continues. SDK-level errors (lease / ack / release) reject regardless.
​ ↳ onErrorfunctionNoPer-message error observer for continueOnError: true. Called with the failure and the message; control-flow signals are filtered out. Throws from onError are swallowed.
​ ↳ signalanyNoAbort signal. Aborting cancels in-flight HTTP, releases unprocessed messages, and resolves cleanly. Errors during shutdown still reject.
​ ↳ maxDrainIntervalSecondsnumberNoMaximum seconds between safety drain attempts (default: 300). The watcher subscribes to SSE notifications for near-real-time wake-ups; this interval is the backstop that guarantees forward progress if SSE events are missed or the connection drops undetected.
Returns: Promise<void> Example:
const result = await zapier.watchTriggerInbox({
  inbox: "example-inbox",
  onMessage: async (message) => {
    /* process message */
  },
});