npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@zapier/zapier-sdk

v0.15.10

Published

Complete Zapier SDK - combines all Zapier SDK packages

Maintainers

tims256tims256philip.ng-zapierphilip.ng-zapierzapetczapetcchaodonghuchaodonghujc.coto-zapierjc.coto-zapierandrew.gosnell-zapierandrew.gosnell-zapierdjeebusdjeebusemma-haysemma-haysmichaelannmichaelannnickaccuardizapiernickaccuardizapierjdaudierjdaudierjoaopimenteljoaopimentelrghazalirghazalirsiemensrsiemensnoahmangernoahmangerkola-erkola-ercodebycalebcodebycalebcalebpetersoncalebpetersonlukecjohnsonlukecjohnsonzapier-engineeringzapier-engineeringjdealjdealbryanhelmigbryanhelmigpwhammanpwhammanamber.diehl-zapieramber.diehl-zapierpercy_at_zapierpercy_at_zapieromar.razaomar.razalijennilijennikatestamzapkatestamzapfokkezbfokkezbzoeykim-zapierzoeykim-zapierjhk2020jhk2020natalie.davis-zapiernatalie.davis-zapiernik.danilov-zapiernik.danilov-zapierjonathan.harrell-zapierjonathan.harrell-zapierdilan-zapierdilan-zapiersandy.brydon-zapiersandy.brydon-zapieremily.harris-zapieremily.harris-zapiermichaelgilleymichaelgilleycorbin.schwartz-zapiercorbin.schwartz-zapiermikekucheramikekucheraandrew.kordampalos-zapierandrew.kordampalos-zapierjasonkotenkojasonkotenkonate.moore-zapiernate.moore-zapierjosuezapjosuezapmikeknoopmikeknooplarrytlarrytrhubbardrhubbardtomasz.piechota-zapiertomasz.piechota-zapierservice-account-appsecservice-account-appsecmary.rising-zapiermary.rising-zapiernolan.little-zapiernolan.little-zapierstacietaylorcimastacietaylorcimankroeker_zapnkroeker_zaphitchcockwillhitchcockwillibrahem.zayedibrahem.zayedchelsea.weberchelsea.weberseason.huangseason.huangchris.vanderkolk.zapierchris.vanderkolk.zapiererin.williams-zapiererin.williams-zapierdarko.ronic.zapierdarko.ronic.zapierkredlearkredlearchelschubbchelschubbskylershawskylershawmaggie.cody-zapiermaggie.cody-zapierandya-zapierandya-zapierianscoianscowill.wigginswill.wigginsrondiegerondiegeannaulyanovaannaulyanovabskaurudbskaurudkaitrin.coxkaitrin.coxchasehambychasehambymilkrammilkrammburnimburnipeterbritnellpeterbritnellcarolinezapiercarolinezapierchris.lee-zapierchris.lee-zapieremmaielleemmaiellejeanetteujeanetteujordanraleighjordanraleighrobertsclrobertscldayne-taittdayne-taittlaurenmbeattylaurenmbeattyihor.horakihor.horakmaxwellgbrownmaxwellgbrownhanz.corteshanz.cortesalejandro-lagosalejandro-lagostom.leung-zapiertom.leung-zapierlizzyzaplizzyzapcolemacleancolemacleanrchinermanrchinermansdelosrios95sdelosrios95jason.rametta-zapierjason.rametta-zapierjoseph-corona-zapierjoseph-corona-zapierpedro.louro-zapierpedro.louro-zapierlachlan.willis-zapierlachlan.willis-zapieralphabrettalphabrettbrandon.parker-zapierbrandon.parker-zapierpoterekmpoterekmgreg-zapiergreg-zapierloveena.vattenkyloveena.vattenkymsholtymsholtyplorryplorryjoel.taddeijoel.taddeistandielplsstandielplsfgrafafgrafaaparkinaparkinadampieadampieilari.scheininilari.scheininannader-zapierannader-zapieramickael-zapamickael-zapkalenwesselkalenwesselkat.nestorkat.nestorxavierh-zapierxavierh-zapierjames.hong-zapierjames.hong-zapierservice-account-renovateservice-account-renovatecortega_zpcortega_zpjelani.jackson-zapierjelani.jackson-zapierwernertcwernertcbrandon.myers.zapierbrandon.myers.zapierben.clapp.zapierben.clapp.zapierrebecca.davis.zapierrebecca.davis.zapierdavidwin-zapdavidwin-zapdylan.laible-zapierdylan.laible-zapiermason.geloso-zapiermason.geloso-zapiervaleriia.shpinervaleriia.shpinerzac.jones-zapierzac.jones-zapiermanasseh_zapiermanasseh_zapierlisa.orrlisa.orraaclarker-zapaaclarker-zapfernando.velascosalazarfernando.velascosalazarnormanroanormanroadaniel.vagg-zapierdaniel.vagg-zapierpaulo.neto-zapierpaulo.neto-zapieralec.hinh-zapieralec.hinh-zapierscott.woodend-zapierscott.woodend-zapiersteven.nelemans-zapiersteven.nelemans-zapiercody.landrycody.landryschlickmannschlickmannjacquelynmccrayjacquelynmccraywojciech.matuszewski-zapierwojciech.matuszewski-zapieralex.blackalex.blackdanielheidornzapdanielheidornzapraquel.zapierraquel.zapiersarahstorysarahstorymatthew.hockenbury-zapiermatthew.hockenbury-zapierjonathan.wise-zapierjonathan.wise-zapierdewayne-zapierdewayne-zapiertupelo8tupelo8chrys.swingler-zapierchrys.swingler-zapiermahsa.khoshab-zapiermahsa.khoshab-zapieranna.hadnagy-zapieranna.hadnagy-zapierjake.talgard-zapierjake.talgard-zapierbenjamin.kempe-zapierbenjamin.kempe-zapierryan.vennell-zapierryan.vennell-zapierzackary.higgins-zapierzackary.higgins-zapierbryce.seagervandyk-zapierbryce.seagervandyk-zapierkit.burgess-zapierkit.burgess-zapiervitor.balocco-zapiervitor.balocco-zapierzapier-interfaceszapier-interfacesbrody-zapierbrody-zapieraaron.kosel-zapieraaron.kosel-zapierdiomerdiomercameron.barnes-zapiercameron.barnes-zapiersarah.hernandez-zapiersarah.hernandez-zapierdavid.jardine-zapierdavid.jardine-zapierryan.detzel-zapierryan.detzel-zapierjacob.blakely-zapierjacob.blakely-zapierkasey.cowley-zapierkasey.cowley-zapierjessica.winters-zapierjessica.winters-zapierabraham.duran-zapierabraham.duran-zapieraleks.ozolins-zapieraleks.ozolins-zapiernicholas.civili-zapiernicholas.civili-zapieraubry.stewart-zapieraubry.stewart-zapierkristen.keller-zapierkristen.keller-zapierryan.laxson-zapierryan.laxson-zapiershanan.holm-zapiershanan.holm-zapieromar.delossantos-zapieromar.delossantos-zapierosarhomiyeke.iyere-zapierosarhomiyeke.iyere-zapiermike.lambert-zapiermike.lambert-zapiercatherine.murray-zapiercatherine.murray-zapierken.ng-zapierken.ng-zapierlukas.toma-zapierlukas.toma-zapiermarina.handmarina.handvivian.lau-zapiervivian.lau-zapierdan.middleton-zapierdan.middleton-zapierjames.miltenberger-zapierjames.miltenberger-zapiercharan.mahesan-zapiercharan.mahesan-zapierolajide.ayinla-zapierolajide.ayinla-zapiersara.gomez-zapiersara.gomez-zapierismail.latona-zapierismail.latona-zapiertazrafiqtazrafiqservice-account-catalogservice-account-catalogashley.isles-zapierashley.isles-zapierryan.dunnewold-zapierryan.dunnewold-zapierrval-zapierrval-zapierjenna.macdonald-zapierjenna.macdonald-zapiersharvari.desai-zapiersharvari.desai-zapierdaniel.shepard-zapierdaniel.shepard-zapierlstensagerlstensagerkunal.mahajan-zapierkunal.mahajan-zapierben.mcadams-zapierben.mcadams-zapierjason.brandt-zapierjason.brandt-zapiernitish.sachar.zapiernitish.sachar.zapiermark.auburn-zapiermark.auburn-zapierjames-zapierjames-zapierjacob.bridges-zapierjacob.bridges-zapierbrian.corbinbrian.corbinpradeepan.michaelraj-zapierpradeepan.michaelraj-zapierdaria.usatyuk-zapierdaria.usatyuk-zapiersteve.gasior-zapiersteve.gasior-zapierenes.grahovac-zapierenes.grahovac-zapierbilly.kaufman-zapierbilly.kaufman-zapierjames.rosebaugh-nordan-zapierjames.rosebaugh-nordan-zapierindra.kabiraj-zapierindra.kabiraj-zapiernatay.aberra-zapiernatay.aberra-zapierpeter.lord-zapierpeter.lord-zapierstephanie.coates-zapierstephanie.coates-zapierseth.duncan-zapierseth.duncan-zapiernick.fredman-zapiernick.fredman-zapiermatt.luksomatt.luksoerik.aybar-zapiererik.aybar-zapierchris.taylor-zapierchris.taylor-zapierchris.haferl-zapierchris.haferl-zapierjason.poole-zapierjason.poole-zapieramy.steen-zapieramy.steen-zapiermojtaba.hosseini-zapiermojtaba.hosseini-zapierandy.spezzatti-zapierandy.spezzatti-zapierseth.etter-zapierseth.etter-zapiersage-zapiersage-zapierblakek-zapierblakek-zapierkelly.vaughn-zapierkelly.vaughn-zapierdanielle.weisz-zapierdanielle.weisz-zapierenrique.maytorena-zapierenrique.maytorena-zapierhgascoigne_zapierhgascoigne_zapierandrew-scala-zapierandrew-scala-zapierjuan-vazquez-zapierjuan-vazquez-zapierandyzapierandyzapierdaniel-frazierdaniel-frazierjase.hackman-zapierjase.hackman-zapierrahul.es-zapierrahul.es-zapierrob.golding-day-zapierrob.golding-day-zapiercass.hill-zapiercass.hill-zapiernumichuunumichuujay.reddy-zapierjay.reddy-zapiercameron.phillips-zapiercameron.phillips-zapierajdlpajdlpalvaro.martin-zapieralvaro.martin-zapiersimon.charette-zapiersimon.charette-zapierchristopher.mclachlan-lee-zapierchristopher.mclachlan-lee-zapierbailey.griswold-zapierbailey.griswold-zapierchristopher.mckay-zapierchristopher.mckay-zapierthomas.cranny-zapierthomas.cranny-zapierrenae.corcoran-zapierrenae.corcoran-zapierjosh.newman-zapierjosh.newman-zapierjohn.wick-test-zapierjohn.wick-test-zapierchang-hung.liang-zapierchang-hung.liang-zapierrocio.aramberri-zapierrocio.aramberri-zapiercooksey-zapiercooksey-zapierkrishna.chaitanya-zapierkrishna.chaitanya-zapierjustin.zapierjustin.zapiersugatmahantisugatmahantianthony.torres-zapieranthony.torres-zapiermaria.bances-zapiermaria.bances-zapiernick.james-zapiernick.james-zapierclaire.mcnelis-zapierclaire.mcnelis-zapierchris.weaverchris.weaverjames.carr-zapierjames.carr-zapierbrodenzapierbrodenzapierrebecca-ghazalirebecca-ghazalibradley.bohen-zapierbradley.bohen-zapierstevemolitorstevemolitorsammons.zapiersammons.zapierchristophe.coutzoukis-zapierchristophe.coutzoukis-zapierana.krivokapic-zapierana.krivokapic-zapiersaraelizabeth.horning-zapiersaraelizabeth.horning-zapiervictor.avasiloaei-zapiervictor.avasiloaei-zapierjordy.vandomselaar-zapierjordy.vandomselaar-zapierjuancarlos.prida-zapierjuancarlos.prida-zapierjdeal_zapierjdeal_zapiermike.pirnat-zapiermike.pirnat-zapierkeerthana.mohan-zapierkeerthana.mohan-zapiernicole.thomasnicole.thomasahsanhassanahsanhassanchris.johns-zapierchris.johns-zapieralden.aikele-zapieralden.aikele-zapierryan.fitzgerald-zapierryan.fitzgerald-zapiermiklossimonmiklossimondave.kolas-zapierdave.kolas-zapierbrodie.kurczynski_zapierbrodie.kurczynski_zapierjuanma.roca-zapierjuanma.roca-zapierlindsay.smith-zapierlindsay.smith-zapierfrank.leng-zapierfrank.leng-zapiererika.satterfield-zapiererika.satterfield-zapierkaushibkaushibalexmichael.lewis-zapieralexmichael.lewis-zapieragustina.feijoo-zapieragustina.feijoo-zapierraj.balasubramaniam-zapierraj.balasubramaniam-zapieranna.mira-zapieranna.mira-zapiertravis.stephens-zapiertravis.stephens-zapierdenis.chendenis.chenluces.huayhuacalambert-zapierluces.huayhuacalambert-zapierbrad.peters-zapierbrad.peters-zapierdeirdremarie.massaro-zapierdeirdremarie.massaro-zapierashraf.khattab-zapierashraf.khattab-zapierwalt.della-zapierwalt.della-zapierthalida.noel-zapierthalida.noel-zapierruta.reisoglu-zapierruta.reisoglu-zapierlucas.carlson-zapierlucas.carlson-zapierbj.collins-zapierbj.collins-zapierjames.baldwin-zapierjames.baldwin-zapiereleanor.kiefelhaggerty-zapiereleanor.kiefelhaggerty-zapieryohana-heringeryohana-heringermai.berrondo-zapiermai.berrondo-zapierjonathan.ballard-zapierjonathan.ballard-zapierveervikram.raj-zapierveervikram.raj-zapierbetsy.gottesman.zapierbetsy.gottesman.zapiergwen.myall-zapiergwen.myall-zapieradam.sukenik-zapieradam.sukenik-zapierali.tycast-zapierali.tycast-zapierrobin.salimans-zapierrobin.salimans-zapierhari.nandanan-zapierhari.nandanan-zapiersjimenez.zapiersjimenez.zapieralfonso.riosalfonso.riosjoanna.lu-zapierjoanna.lu-zapiercolt.pini-zapiercolt.pini-zapierjeff.bertrand-zapierjeff.bertrand-zapierchristopher.knight-zapierchristopher.knight-zapiermaurice.williams-zapiermaurice.williams-zapierjay.li-zapierjay.li-zapiermatthew.kiernander-zapiermatthew.kiernander-zapiersangeeta.jadoonanan-zapiersangeeta.jadoonanan-zapier

Readme

@zapier/zapier-sdk

Table of Contents

Installation

# If starting a new project:
cd your-project-dir
npm init -y
npx tsc --init
# Also, set `"type": "module"` in your package.json for the code examples below.

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

Quick Start

# Authenticates through your browser, automatically handling token management
npx zapier-sdk login

# Generate TypeScript types for actions and fields of any apps you want to use.
npx zapier-sdk add slack google-sheets

# The names of apps are there slugs if available, otherwise internal keys. If
# you don't know the slug or key, just use `list-apps` search to find it.
zapier-sdk list-apps --search "google sheets"

# The output will show you the valid keys next to the app title like this:
# 1. Google Sheets (GoogleSheetsV2CLIAPI, google-sheets, google_sheets)

# By default, types will be generated inside your `src` or `lib` folder if you
# have one or otherwise the root folder. Make sure your `tsconfig.json` file
# includes the generated type files.

# Alternatively, you can specify a custom output directory.
npx zapier-sdk add slack google-sheets --types-output ./types
import { createZapierSdk } from "@zapier/zapier-sdk";

// ######## Initialize Zapier SDK ########
// Running `zapier-sdk login` authenticates through your browser, automatically handling token management
const zapier = createZapierSdk();

// Option 2: Manually provide a token
// const zapier = createZapierSdk({
//   token: "your_zapier_token_here", // or use ZAPIER_TOKEN env var
// });

// ######## Access Apps ########
// List methods return a promise for a page with {data, nextCursor}.
const { data: firstPageApps, nextCursor } = await zapier.listApps();
// Use the cursor to get the next page:
const { data: secondPageApps } = await zapier.listApps({ cursor: nextCursor });

console.log({
  firstPageApps,
  secondPageApps,
});

// List methods also return an iterator for all pages.
// Be careful with lots of pages, note the `search` to filter.
for await (const page of zapier.listApps({ search: "slack" })) {
  const { data: apps } = page;
  console.log({
    apps,
  });
}

// Use `.items()` to iterate over all items of all pages:
// Again, be careful with lots of items. Note the `maxItems` to limit the total items.
for await (const app of zapier.listApps({ maxItems: 100 }).items()) {
  console.log({
    app,
  });
}

// You can collect all results, but this could take a while for long lists!
const allApps = await Array.fromAsync(
  zapier.listApps({ maxItems: 100 }).items(),
);

console.log({
  allApps,
});

// The item methods return a promise for a single item, wrapped with {data}.
// This is just to give us room to add metadata in the future.
const { data: app } = await zapier.getApp({ appKey: "slack" });

console.log({
  app,
});

// ######## Authentication Usage ########
const { data: myAuths } = await zapier.listAuthentications({
  appKey: "slack",
  owner: "me",
});

console.log({
  myAuths,
});

// ######## Find Actions ########
// Option 1: List actions
// Remember, this is just the first page which may not include them all!
// See `.items()` usage above, which can be used to make sure you get all actions.
const { data: actions } = await zapier.listActions({ appKey: "slack" });

console.log({
  actions,
});

const singleAction = await zapier.getAction({
  appKey: "slack",
  actionType: actions[0].action_type,
  actionKey: actions[0].key,
});

console.log({
  singleAction,
});

// Option 2: Access actions via the `apps` proxy
// If you've generated TS types for an app using `zapier-sdk add`, you can access the app's actions like this:

// await zapier.apps.slack.read.channles({});
// await zapier.apps.slack.write.send_message({})

// ######## Run Actions ########
// Option 1:
const { data: channels } = await zapier.runAction({
  appKey: "slack",
  actionType: "read",
  actionKey: "channels",
  authenticationId: myAuths[0].id,
});

console.log({
  channels,
});

const { data: profile } = await zapier.getProfile();

// Option 2:
// Create an app binding to your authentication.
const mySlack = zapier.apps.slack({
  authenticationId: myAuths[0].id,
});

// Use your app binding to run the action.
const { data: users } = await mySlack.search.user_by_email({
  inputs: {
    email: profile.email,
  },
});

console.log({
  users,
});

// You can also skip the app binding and pass the auth into the action.
const { data: sameUsers } = await zapier.apps.slack.search.user_by_email({
  inputs: {
    email: profile.email,
  },
  authenticationId: myAuths[0].id,
});

console.log({
  sameUsers,
});

// If the slug for an app has dashes, you can also use a snake_cased app key.
// For example, either of the following are valid:
// zapier.apps["google-sheets"]
// zapier.apps.google_sheets

Available Functions

Accounts

getProfile

Get current user's profile information

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | --------- | -------- | -------- | ------- | --------------- | ----------- | | options | object | ❌ | — | — | |

Returns: Promise<ProfileItem>

Example:

const { data: profile } = await sdk.getProfile();

Actions

getAction

Get detailed information about a specific action

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | -------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------- | | options | object | ✅ | — | — | | | ↳ appKey | string | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') | | ↳ actionType | string | ✅ | — | read, read_bulk, write, run, search, search_or_write, search_and_write, filter | Action type that matches the action's defined type | | ↳ actionKey | string | ✅ | — | — | Action key to execute |

Returns: Promise<ActionItem>

Example:

const { data: action } = await sdk.getAction({
  appKey: "example-key",
  actionType: "read",
  actionKey: "example-key",
});

getInputFieldsSchema

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:

| Name | Type | Required | Default | Possible Values | Description | | -------------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | options | object | ✅ | — | — | | | ↳ appKey | string | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for | | ↳ actionType | string | ✅ | — | read, read_bulk, write, run, search, search_or_write, search_and_write, filter | Action type that matches the action's defined type | | ↳ actionKey | string | ✅ | — | — | Action key to get the input schema for | | ↳ authenticationId | string | ❌ | — | — | Authentication ID to use when fetching the schema. Required if the action needs authentication to determine available fields. | | ↳ inputs | object | ❌ | — | — | Current input values that may affect the schema (e.g., when fields depend on other field values) |

Returns: Promise<InputSchemaItem>

Example:

const { data: inputSchema } = await sdk.getInputFieldsSchema({
  appKey: "example-key",
  actionType: "read",
  actionKey: "example-key",
});

listActions

List all actions for a specific app

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | -------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | | options | object | ✅ | — | — | | | ↳ appKey | string | ✅ | — | — | App key of actions to list (e.g., 'SlackCLIAPI' or slug like 'github') | | ↳ actionType | string | ❌ | — | read, read_bulk, write, run, search, search_or_write, search_and_write, filter | Filter actions by type | | ↳ pageSize | number | ❌ | — | — | Number of actions per page | | ↳ maxItems | number | ❌ | — | — | Maximum total items to return across all pages | | ↳ cursor | string | ❌ | — | — | Cursor to start from |

Returns: Promise<PaginatedResult<ActionItem>>

Example:

// Get first page and a cursor for the second page
const { data: actions, nextCursor } = await sdk.listActions({
  appKey: "example-key",
});

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

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

listInputFieldChoices

Get the available choices for a dynamic dropdown input field

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | -------------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------ | | options | object | ✅ | — | — | | | ↳ appKey | string | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') | | ↳ actionType | string | ✅ | — | read, read_bulk, write, run, search, search_or_write, search_and_write, filter | Action type that matches the action's defined type | | ↳ actionKey | string | ✅ | — | — | Action key to execute | | ↳ inputFieldKey | string | ✅ | — | — | Input field key to get choices for. | | ↳ authenticationId | string | ❌ | — | — | Authentication ID to use for this action | | ↳ inputs | object | ❌ | — | — | Current input values that may affect available choices | | ↳ page | number | ❌ | — | — | Page number for paginated results | | ↳ pageSize | number | ❌ | — | — | Number of choices per page | | ↳ maxItems | number | ❌ | — | — | Maximum total items to return across all pages | | ↳ cursor | string | ❌ | — | — | Cursor to start from |

Returns: Promise<PaginatedResult<InputFieldChoiceItem>>

Example:

// Get first page and a cursor for the second page
const { data: inputFieldChoices, nextCursor } = await sdk.listInputFieldChoices(
  {
    appKey: "example-key",
    actionType: "read",
    actionKey: "example-key",
    inputFieldKey: "example-key",
  },
);

// Or iterate over all pages
for await (const page of sdk.listInputFieldChoices({
  appKey: "example-key",
  actionType: "read",
  actionKey: "example-key",
  inputFieldKey: "example-key",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const inputFieldChoice of sdk
  .listInputFieldChoices({
    appKey: "example-key",
    actionType: "read",
    actionKey: "example-key",
    inputFieldKey: "example-key",
  })
  .items()) {
  // Do something with each inputFieldChoice
}

listInputFields

Get the input fields required for a specific action

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | -------------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------- | | options | object | ✅ | — | — | | | ↳ appKey | string | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') | | ↳ actionType | string | ✅ | — | read, read_bulk, write, run, search, search_or_write, search_and_write, filter | Action type that matches the action's defined type | | ↳ actionKey | string | ✅ | — | — | Action key to execute | | ↳ authenticationId | string | ❌ | — | — | Authentication ID to use for this action | | ↳ inputs | object | ❌ | — | — | Current input values that may affect available fields | | ↳ pageSize | number | ❌ | — | — | Number of input fields per page | | ↳ maxItems | number | ❌ | — | — | Maximum total items to return across all pages | | ↳ cursor | string | ❌ | — | — | Cursor to start from |

Returns: Promise<PaginatedResult<RootFieldItemItem>>

Example:

// Get first page and a cursor for the second page
const { data: rootFieldItems, nextCursor } = await sdk.listInputFields({
  appKey: "example-key",
  actionType: "read",
  actionKey: "example-key",
});

// Or iterate over all pages
for await (const page of sdk.listInputFields({
  appKey: "example-key",
  actionType: "read",
  actionKey: "example-key",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const rootFieldItem of sdk
  .listInputFields({
    appKey: "example-key",
    actionType: "read",
    actionKey: "example-key",
  })
  .items()) {
  // Do something with each rootFieldItem
}

runAction

Execute an action with the given inputs

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | -------------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------- | | options | object | ✅ | — | — | | | ↳ appKey | string | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') | | ↳ actionType | string | ✅ | — | read, read_bulk, write, run, search, search_or_write, search_and_write, filter | Action type that matches the action's defined type | | ↳ actionKey | string | ✅ | — | — | Action key to execute | | ↳ authenticationId | string | ❌ | — | — | Authentication ID to use for this action | | ↳ inputs | object | ❌ | — | — | Input parameters for the action | | ↳ pageSize | number | ❌ | — | — | Number of results per page | | ↳ maxItems | number | ❌ | — | — | Maximum total items to return across all pages | | ↳ cursor | string | ❌ | — | — | Cursor to start from |

Returns: Promise<PaginatedResult<ActionResultItem>>

Example:

// Get first page and a cursor for the second page
const { data: actionResults, nextCursor } = await sdk.runAction({
  appKey: "example-key",
  actionType: "read",
  actionKey: "example-key",
});

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

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

Apps

apps.{appKey}

Bind an authentication ID to an app

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | -------------------- | -------- | -------- | ------- | --------------- | ----------- | | options | object | ✅ | — | — | | | ↳ authenticationId | number | ✅ | — | — | |

Returns: Promise<AppProxy>

Example:

const result = await sdk.apps.appKey({
  authenticationId: 12345,
});

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

Execute an action with the given inputs for the bound app, as an alternative to runAction

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | -------------------- | -------- | -------- | ------- | --------------- | ----------- | | options | object | ✅ | — | — | | | ↳ inputs | object | ❌ | — | — | | | ↳ authenticationId | number | ❌ | — | — | |

Returns: Promise<PaginatedResult<ActionResultItem>>

Example:

// Get first page and a cursor for the second page
const { data: actionResults, nextCursor } =
  await sdk.apps.appKey.actionType.actionKey();

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

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

getApp

Get detailed information about a specific app

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | ---------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------- | | options | object | ✅ | — | — | | | ↳ appKey | string | ✅ | — | — | App key of app to fetch (e.g., 'SlackCLIAPI' or slug like 'github') |

Returns: Promise<AppItem>

Example:

const { data: app } = await sdk.getApp({
  appKey: "example-key",
});

listApps

List all available apps with optional filtering

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | ------------ | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------- | | options | object | ✅ | — | — | | | ↳ appKeys | array | ❌ | — | — | Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github') | | ↳ search | string | ❌ | — | — | Search for apps by name | | ↳ pageSize | number | ❌ | — | — | Number of apps per page | | ↳ maxItems | number | ❌ | — | — | Maximum total items to return across all pages | | ↳ cursor | string | ❌ | — | — | Cursor to start from |

Returns: Promise<PaginatedResult<AppItem>>

Example:

// Get first page and a cursor for the second page
const { data: apps, nextCursor } = await sdk.listApps();

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

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

Authentications

findFirstAuthentication

Find the first authentication matching the criteria

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | ------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------- | | options | object | ✅ | — | — | | | ↳ appKey | string | ❌ | — | — | App key of authentication to find (e.g., 'SlackCLIAPI' or slug like 'github') | | ↳ search | string | ❌ | — | — | Search term to filter authentications by title | | ↳ title | string | ❌ | — | — | Filter authentications by exact title match | | ↳ accountId | string | ❌ | — | — | Filter by account ID | | ↳ owner | string | ❌ | — | — | Filter by owner |

Returns: Promise<AuthenticationItem>

Example:

const { data: authentication } = await sdk.findFirstAuthentication();

findUniqueAuthentication

Find a unique authentication matching the criteria

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | ------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------- | | options | object | ✅ | — | — | | | ↳ appKey | string | ❌ | — | — | App key of authentication to find (e.g., 'SlackCLIAPI' or slug like 'github') | | ↳ search | string | ❌ | — | — | Search term to filter authentications by title | | ↳ title | string | ❌ | — | — | Filter authentications by exact title match | | ↳ accountId | string | ❌ | — | — | Filter by account ID | | ↳ owner | string | ❌ | — | — | Filter by owner |

Returns: Promise<AuthenticationItem>

Example:

const { data: authentication } = await sdk.findUniqueAuthentication();

getAuthentication

Get a specific authentication by ID

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | -------------------- | -------- | -------- | ------- | --------------- | ----------------------------- | | options | object | ✅ | — | — | | | ↳ authenticationId | number | ✅ | — | — | Authentication ID to retrieve |

Returns: Promise<AuthenticationItem>

Example:

const { data: authentication } = await sdk.getAuthentication({
  authenticationId: 12345,
});

listAuthentications

List available authentications with optional filtering

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | --------------------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------ | | options | object | ✅ | — | — | | | ↳ appKey | string | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github') | | ↳ authenticationIds | array | ❌ | — | — | List of authentication IDs to filter by | | ↳ search | string | ❌ | — | — | Search term to filter authentications by title | | ↳ title | string | ❌ | — | — | Filter authentications by exact title match | | ↳ accountId | string | ❌ | — | — | Filter by account ID | | ↳ owner | string | ❌ | — | — | Filter by owner, 'me' for your own authentications or a specific user ID | | ↳ pageSize | number | ❌ | — | — | Number of authentications per page | | ↳ maxItems | number | ❌ | — | — | Maximum total items to return across all pages | | ↳ cursor | string | ❌ | — | — | Cursor to start from |

Returns: Promise<PaginatedResult<AuthenticationItem>>

Example:

// Get first page and a cursor for the second page
const { data: authentications, nextCursor } = await sdk.listAuthentications();

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

// Or iterate over individual items across all pages
for await (const authentication of sdk.listAuthentications().items()) {
  // Do something with each authentication
}

HTTP Requests

fetch

Execute fetch

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | -------------------------- | -------- | -------- | ------- | ---------------------------------------------------------- | -------------------------------------------------------------------- | | url | string | ✅ | — | — | The URL to fetch | | init | object | ❌ | — | — | Fetch options including authentication | | ↳ method | string | ❌ | — | GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS | | | ↳ headers | object | ❌ | — | — | | | ↳ body | string | ❌ | — | — | | | ↳ authenticationId | number | ❌ | — | — | Zapier authentication ID to use for the request | | ↳ callbackUrl | string | ❌ | — | — | URL to send async response to (makes request async) | | ↳ authenticationTemplate | string | ❌ | — | — | Optional JSON string authentication template to bypass Notary lookup |

Returns: Promise<Response>

Example:

const result = await sdk.fetch("https://example.com", { key: "value" });

request

Make authenticated HTTP requests through Zapier's Relay service

Parameters:

| Name | Type | Required | Default | Possible Values | Description | | -------------------------- | -------- | -------- | ------- | ---------------------------------------------------------- | -------------------------------------------------------------------- | | options | object | ✅ | — | — | | | ↳ url | string | ✅ | — | — | The URL to request (will be proxied through Relay) | | ↳ method | string | ❌ | — | GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS | HTTP method | | ↳ body | string | ❌ | — | — | Request body as a string | | ↳ authenticationId | number | ❌ | — | — | Zapier authentication ID to use for the request | | ↳ callbackUrl | string | ❌ | — | — | URL to send async response to (makes request async) | | ↳ authenticationTemplate | string | ❌ | — | — | Optional JSON string authentication template to bypass Notary lookup | | ↳ headers | string | ❌ | — | — | Request headers | | ↳ relayBaseUrl | string | ❌ | — | — | Base URL for Relay service |

Returns: Promise<Response>

Example:

const result = await sdk.request({
  url: "https://example.com",
});