### Resource Method Get Schema Example Source: https://docs.zapier.com/integrations/reference/schema An example of how to define a 'get' method for a resource, including display properties and the operation to perform. The 'sample' key is required unless a sample is defined elsewhere. ```json { "display": { "label": "Get Tag by ID", "description": "Grab a specific Tag by ID." }, "operation": { "perform": { "url": "$func$0$f$" }, "sample": { "id": 385, "name": "proactive enable ROI" } } } ``` ```json { "display": { "label": "Get Tag by ID", "description": "Grab a specific Tag by ID.", "hidden": true }, "operation": { "perform": { "url": "$func$0$f$" } } } ``` ```json { "display": { "label": "Get Tag by ID", "description": "Grab a specific Tag by ID." }, "operation": { "perform": { "url": "$func$0$f$" } } } ``` -------------------------------- ### Get Promotion Details Example Source: https://docs.zapier.com/powered-by-zapier/api-reference/promotions/get-enrollment This example demonstrates the expected JSON response when successfully retrieving promotion enrollment details. It includes details such as promotion ID, enrollment and expiration dates, task limits, and current status. ```json { "promotion_id": "test_promo", "enrollment_date": "2026-04-28T00:00:00Z", "expiration_date": "2026-07-26T23:59:59Z", "task_limit_per_month": 5, "tasks_used_this_month": 0, "status": "enrolled" } ``` -------------------------------- ### Set Up Zapier SDK Project Source: https://docs.zapier.com/sdk/index This script automates the setup of the Zapier SDK in your project. It detects your package manager, initializes a Node.js project if necessary, checks Node.js version, installs SDK and development dependencies, optionally adds the Zapier SDK skill, logs you into Zapier, and lists your connected apps. ```text Set up the Zapier SDK for me. Before installing anything: - Tell me what folder we're currently in (run `pwd` and report the path). - Ask me whether to install here or in a different directory. End with: "Should I set up here, or do you want to point me at a different directory?" Then STOP and wait for my reply. If I name a different directory, `cd` to it (creating it with `mkdir -p` if it doesn't exist) first. If my reply is ambiguous, default to the current directory. Once I've confirmed the directory, work through these steps one at a time, running each command in the terminal and telling me what happened before moving on: 1. Detect the package manager. Check for pnpm-lock.yaml, yarn.lock, bun.lockb, or package-lock.json. If one exists, use that manager instead of npm for every install command below. If none exist, default to npm. 2. Ensure a project exists. - If there's already a package.json, this is an existing project — use it as-is. Remember this for step 9. - If there's no package.json, create one: npm init -y 3. Check Node.js is installed at version 20 or higher: node -v - If Node is not found: tell me to install it from https://nodejs.org or run brew install node, then stop. - If Node is older than 20: tell me to upgrade it, then stop. 4. Install the SDK: npm install @zapier/zapier-sdk - An EPERM error on ~/.npm/_cacache usually means the command sandbox is blocking npm's cache writes, not a file permissions issue. 5. Install dev dependencies: npm install -D @zapier/zapier-sdk-cli @types/node typescript tsx 6. (Optional) Install the Zapier SDK skill for agent context: npx skills add zapier/sdk -y This gives you richer context about the SDK — it is not the SDK itself. If it fails for any reason, skip it and continue. 7. Log in to Zapier: npx zapier-sdk login --non-interactive - The --non-interactive flag tells the CLI not to ask interactive questions, so login won't stall waiting on you. Always pass it when running login. - This opens a browser window. A permissions or sandbox error here typically means the command sandbox is preventing credentials from being written to disk. - If login fails for another reason, try again. - After login succeeds, confirm: "You are authenticated as ." 8. List my connected apps: npx zapier-sdk list-connections --owner me --json 2>/dev/null | head -n 1000 - Read the output and show only the first 10 results as a markdown table with columns: ID, App Key, Expired. Do not show Title. Always tell me how many total connections there are, and if there are more than 10, note that you are only showing the first 10. - The page size is 100. If the output contains exactly 100 connections, there may be additional connections beyond this first page. Just note that and move on — do not fetch additional pages. - If the list is empty: tell me to connect at least one app at https://zapier.com/app/assets/connections and come back. 9. If this is an existing project (from step 2): suggest how to integrate the SDK. ``` -------------------------------- ### Wait for New Connection Example (TypeScript) Source: https://docs.zapier.com/sdk/reference An example demonstrating how to use `waitForNewConnection` with specific app and timestamp options. Ensure the `startedAt` timestamp is captured before presenting the connection start URL to avoid missing fast completions. ```typescript const { data: connection } = await zapier.waitForNewConnection({ app: "example-app", startedAt: 100, }); ``` -------------------------------- ### Resource Schema Example Source: https://docs.zapier.com/integrations/reference/schema Defines a resource with a 'get' operation, including display information, operation details, and a sample response. ```json { tag: { key: 'tag', noun: 'Tag', get: { display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.' }, operation: { perform: { url: 'https://fake-crm.getsandbox.com/tags/{{inputData.id}}' }, sample: { id: 385, name: 'proactive enable ROI' } } } } } ``` -------------------------------- ### Run First Action - List Slack Channels Source: https://docs.zapier.com/sdk/quickstart Execute a 'read' action to list Slack channels. This example demonstrates using `findFirstConnection` to get a connection ID and then running the action. ```typescript // Get Slack connection // Option 1: Use listConnections when you need to filter or // work with multiple connections. const { data: allSlackConnections } = await zapier.listConnections({ appKey: "slack", owner: "me", isExpired: false, }); const acmeSlackConnection = allSlackConnections.find(c => c?.title?.toLowerCase().includes("acme")) if (!acmeSlackConnection) { console.log( "Slack connection matching filter not found. Connect Slack at https://zapier.com/app/assets/connections" ); } // Option 2: Use findFirstConnection when you just need the first // available connection and let any errors bubble up const { data: firstSlackConnection } = await zapier.findFirstConnection({ appKey: "slack", owner: "me", }); // List Slack channels using your connection const { data: channels } = await zapier.runAction({ appKey: "slack", actionType: "read", actionKey: "channels", connectionId: firstSlackConnection.id, }); console.log("Your Slack channels:", channels); ``` -------------------------------- ### Install Zapier CLI and Set Up Authentication Source: https://docs.zapier.com/integrations/build-cli/download-source-code Install the Zapier CLI globally and log in to your Zapier platform account using a deploy key. Ensure you have Node.js installed and meet the Platform CLI requirements. ```bash # install the CLI globally npm install -g zapier-platform-cli # setup auth to Zapier's platform with a deploy key zapier-platform login ``` -------------------------------- ### Buffer Configuration Example Source: https://docs.zapier.com/integrations/reference/schema Example of a buffer configuration specifying grouping and limit. ```json { groupedBy: ['input_field_key'], limit: 100 } ``` -------------------------------- ### Missing Required Key Example Source: https://docs.zapier.com/integrations/reference/schema This example demonstrates a throttle configuration missing the required 'window' key. ```json { limit: 10 } ``` -------------------------------- ### Install Integration Dependencies Source: https://docs.zapier.com/integrations/build-cli/overview Navigates into the newly created integration directory and installs all necessary Node.js libraries for the project. ```bash cd example-app npm install ``` -------------------------------- ### Valid GET Request Example Source: https://docs.zapier.com/integrations/reference/schema This is an example of a valid GET request to Zapier.com. ```json { method: 'GET', url: 'https://zapier.com' } ``` -------------------------------- ### Start local server with specific authentication details and stage Source: https://docs.zapier.com/integrations/reference/cli Configure the local development server with both authentication details and a specific stage for testing. ```bash zapier local start --auth=my-connection-id --stage=staging ``` -------------------------------- ### Start local server with specific authentication details and port Source: https://docs.zapier.com/integrations/reference/cli Configure the local development server with authentication details and specify the listening port. ```bash zapier local start --auth=another-connection --port=3000 ``` -------------------------------- ### Start local server with specific authentication details, stage, and port Source: https://docs.zapier.com/integrations/reference/cli Configure the local development server with authentication details, stage, and specify the listening port for comprehensive testing. ```bash zapier local start --auth=connection-xyz --stage=dev --port=8000 ``` -------------------------------- ### Request URL Example Source: https://docs.zapier.com/integrations/reference/schema Example of a GET request to a URL. The querystring will be parsed and merged with params. ```json { method: 'GET', url: 'https://google.com' } ``` -------------------------------- ### Perform Initial Setup and Return Config Source: https://community.zapier.com/ Executes various initialization steps for New Relic, including setting beacon configurations and returning the main configuration object. This is a comprehensive setup function. ```javascript function l(){return function(){let e=c();const t=e.info||{};e.info={beacon:a.beacon,errorBeacon:a.errorBeacon,...t}}(),function(){let e=c();const t=e.init||{};e.init={...t}}(),u(),function(){let e=c();const t=e.loader_config||{};e.loader_config={...t}}(),c()}} ``` -------------------------------- ### Install Zapier SDK and CLI Source: https://docs.zapier.com/sdk/quickstart Installs the Zapier SDK and CLI packages for Node.js projects. Initializes TypeScript if starting a new project. ```bash # Create a new project (optional) mkdir my-zapier-project && cd my-zapier-project npm init -y && npm pkg set type=module # Install the SDK and CLI npm install @zapier/zapier-sdk npm install -D @zapier/zapier-sdk-cli @types/node typescript # Initialize TypeScript (if starting fresh) npx tsc --init ``` -------------------------------- ### Initialize Project and Install SDK Source: https://docs.zapier.com/sdk/quickstart This snippet shows the commands to initialize a new Node.js project if one doesn't exist and then install the Zapier SDK and its development dependencies. It also includes commands for different package managers (npm, pnpm, yarn, bun). ```bash npm init -y npm install @zapier/zapier-sdk npm install -D @zapier/zapier-sdk-cli @types/node typescript tsx ``` ```bash pnpm init -y pnpm install @zapier/zapier-sdk pnpm install -D @zapier/zapier-sdk-cli @types/node typescript tsx ``` ```bash yarn init -y yarn add @zapier/zapier-sdk yarn add -D @zapier/zapier-sdk-cli @types/node typescript tsx ``` ```bash bun init -y bun add @zapier/zapier-sdk bun add -D @zapier/zapier-sdk-cli @types/node typescript tsx ``` -------------------------------- ### Get Connection Start URL CLI Usage Source: https://docs.zapier.com/sdk/cli-reference Command-line interface command to generate a URL that starts an SDK-initiated connection flow for a specified app. ```bash npx zapier-sdk get-connection-start-url ``` -------------------------------- ### Incorrect Setup for Search Connector Source: https://docs.zapier.com/integrations/publish/integration-checks-reference This example shows an incorrect setup where 'list' is used with a search connector, which is not allowed. The type must be string, number, or integer. ```javascript { "key": "update_thing", "list": true, "search": "thing.id" } ``` -------------------------------- ### Basic Configuration Example Source: https://docs.zapier.com/integrations/reference/schema Example of defining a perform function with a sample for an operation. The 'sample' key is required unless 'display.hidden' is true or the resource has a top-level sample. ```json { "perform": { "require": "some/path/to/file.js" }, "sample": { "id": 42, "name": "Hooli" } } ``` -------------------------------- ### Get help for a specific Zapier CLI command Source: https://docs.zapier.com/integrations/reference/cli To get detailed information about a specific command, use `zapier help `. For example, `zapier help init`. ```bash zapier help ``` -------------------------------- ### Example with Basic Authentication Source: https://docs.zapier.com/powered-by-zapier/managing-app-authentication/adding-app-authentications Use this example to add a Basic Authentication to your app. Ensure you supply the required username and password fields. ```javascript // POST /authentications "data": { "app": "{MY_APP_ID}", "title": "{AUTHENTICATION_NAME}", "authentication_fields": { "username": "{MY_USERS_USERNAME}", "password": "{MY_USERS_PASSWORD}" } } ``` -------------------------------- ### Get help for a specific command Source: https://docs.zapier.com/integrations/reference/cli To get detailed information about a specific command, append `--help`. For example, `zapier push --help` provides details on the push command. ```bash zapier push --help ``` -------------------------------- ### Initialize a New Zapier SDK Project Source: https://docs.zapier.com/sdk/cli-reference Creates a new Zapier SDK project in a specified directory with starter files. Use `--non-interactive` to accept all default settings without prompts. ```bash npx zapier-sdk init [--non-interactive] ``` -------------------------------- ### Invalid Key Example Source: https://docs.zapier.com/integrations/reference/schema Illustrates an invalid key format for schema definitions, which must start with a letter. ```json { '12th': { require: 'some/path/to/file.js' } } ``` -------------------------------- ### Example: List Slack Actions Source: https://docs.zapier.com/sdk/using-the-cli An example command to list actions for the Slack app, showing the first few results. This demonstrates how to explore an app's capabilities. ```bash zapier-sdk list-actions slack --json | head ``` -------------------------------- ### Perform Function Example Source: https://docs.zapier.com/integrations/reference/schema Defines how Zapier will get data. This can be a function that returns an array of objects or a request object. ```javascript (z) => [{id: 123}] ``` ```javascript {url: 'http...'} ``` -------------------------------- ### Start a local development server Source: https://docs.zapier.com/integrations/reference/cli Run `zapier local start` to launch a local server that simulates the Zapier environment. This allows for real-time testing of your integration's triggers and actions. ```bash zapier local start ``` -------------------------------- ### Making a GET Request to Zapier Zaps Endpoint Source: https://docs.zapier.com/powered-by-zapier/api-reference/common-types/requests This example demonstrates how to use curl to make a GET request to the Zapier zaps endpoint. Ensure the 'Accept' header is set to 'application/vnd.api+json' as per the JSON API spec. ```bash curl --request GET \ --url https://stoplight.io/mocks/zapier/public-api/181772442/zaps \ --header 'Accept: application/vnd.api+json' ``` -------------------------------- ### Start local server with a specific app Source: https://docs.zapier.com/integrations/reference/cli When working with multiple integrations, you can specify which app to start with the local server using the `--app` flag. ```bash zapier local start --app=my-integration ``` -------------------------------- ### Example Convert Command Source: https://docs.zapier.com/integrations/manage/export-cli An example of the `zapier convert` command, using a sample integration ID and version number to create the project in the current directory. ```bash zapier convert 1234 . --version=1.0.0 ``` -------------------------------- ### Resource Method Create Schema Example Source: https://docs.zapier.com/integrations/reference/schema An example of how to define a 'create' method for a resource, including display properties and the operation to perform. The 'sample' key is required unless a sample is defined elsewhere. ```json { "display": { "label": "Create Tag", "description": "Create a new Tag in your account." }, "operation": { "perform": "$func$2$f$", "sample": { "id": 1 } } } ``` ```json { "display": { "label": "Create Tag", "description": "Create a new Tag in your account.", "hidden": true }, "operation": { "perform": "$func$2$f$" } } ``` ```json { "display": { "label": "Create Tag", "description": "Create a new Tag in your account." }, "operation": { "perform": "$func$2$f$" } } ``` -------------------------------- ### Initialize New Integration Source: https://docs.zapier.com/integrations/build-cli/overview Creates a new integration project directory with the minimum required files. You can choose from various templates or a 'minimal' setup. ```bash zapier-platform init example-app ``` -------------------------------- ### Invalid HTTP Method Example Source: https://docs.zapier.com/integrations/reference/schema Illustrates an invalid request where the 'method' is set to 'POST' instead of the required 'GET'. This will result in an error. ```json { "method": "POST", "url": "https://google.com" } ``` -------------------------------- ### Trigger Description Requirements Source: https://docs.zapier.com/integrations/publish/integration-checks-reference Validates that trigger descriptions start with 'Triggers when ' and end with a period. Provides examples of incorrect and correct formats. ```text Whenever there's a new contact, this goes? ``` ```text Triggers whenever there's a new contact. ``` ```text Triggers when there's a new contact. ``` -------------------------------- ### Create a new Zapier integration from a local directory with multiple template options Source: https://docs.zapier.com/integrations/reference/cli Initialize a new Zapier integration from a local directory and apply multiple template options to customize its setup. ```bash zapier init --dir=/path/to/integration --template-option=auth_type=basic --template-option=api_version=v2 ``` -------------------------------- ### Request Schema Example Source: https://docs.zapier.com/integrations/reference/schema Specifies how Zapier will fetch a single record using a request. Consider using resource-specific get methods if available. ```javascript performGet ``` -------------------------------- ### Scaffold a Create Action with Entry Point Source: https://docs.zapier.com/integrations/reference/cli Scaffold a create action for your integration and specify the entry point file. Overwrites existing files if --force is used. ```bash zapier-platform scaffold create contact --entry=src/index.js ``` -------------------------------- ### PerformGet Function Example Source: https://docs.zapier.com/integrations/reference/schema Defines how Zapier will retrieve a single record. Consider using resources and their built-in get methods if you find yourself using this frequently. ```javascript /RequestSchema ``` ```javascript /FunctionSchema ``` -------------------------------- ### Example Request: Enroll in a Promotion Source: https://docs.zapier.com/powered-by-zapier/api-reference/promotions/create-enrollment This example demonstrates how to structure a JSON request to enroll in a promotion. It requires the `promotion_id` of the promotion to enroll into. ```json { "promotion_id": "promo_12345" } ``` -------------------------------- ### Get help for Zapier CLI completion command Source: https://docs.zapier.com/integrations/reference/cli Display detailed help information for the `zapier completion` command, used for shell autocompletion setup. ```bash zapier completion --help ``` -------------------------------- ### Start Zapier local development server with verbose logging Source: https://docs.zapier.com/integrations/reference/cli Run the 'zapier dev' command with verbose logging enabled to get more detailed output during development. ```bash zapier dev --verbose ``` -------------------------------- ### Initialize a New Zapier Integration Project Source: https://docs.zapier.com/integrations/build-cli/overview Use these commands to create a new local integration folder and install its dependencies. ```bash mkdir zapier-example cd zapier-example zapier-platform init . --template minimal npm install ``` -------------------------------- ### RefResourceSchema Examples Source: https://docs.zapier.com/integrations/reference/schema Examples demonstrating how to reference resources using a specific string format, including nested keys and human-readable labels. ```string 'contact.id' ``` ```string 'contact.id.name' ``` ```string 'contact.id.firstName,lastName' ``` ```string 'contact.id.first_name,last_name,email' ``` ```string 'contact.Contact Id.Full Name' ``` ```string 'contact.data[]id.data[]First Name,data[]Last Name' ``` -------------------------------- ### Travis CI Configuration for Zapier CLI Tests Source: https://docs.zapier.com/integrations/build-cli/testing-and-debugging Example .travis.yml file to set up Node.js environment, install Zapier CLI, and run integration tests with environment variables. ```yaml language: node_js node_js: - "v22" before_script: npm install -g zapier-platform-cli script: CLIENT_ID=1234 CLIENT_SECRET=abcd zapier-platform test ``` -------------------------------- ### Fetch Available Actions for an App Source: https://docs.zapier.com/powered-by-zapier/zap-creation/selecting-an-action Use the `/actions` endpoint to get a list of available actions for a specific app. The `action_type` parameter can filter actions, for example, by 'READ' or 'WRITE'. ```javascript // GET /actions?app=4b3920d6-1d5a-4071-b837-9383dc511b80&action_type=READ { "data": [ { "type": "action", "id": "core:853266", "action_type": "READ", "title": "New Lead", "description": "Triggers when a new lead is added to SuperExampleCRM", "is_instant": true }, { "type": "action", "id": "uag:1f188536-6dd0-4172-8414-2b90914ddee9", "action_type": "READ", "title": "New Deal", "description": "Triggers when a new deal is added to SuperExampleCRM", "is_instant": false } ] } ``` -------------------------------- ### View Zapier CLI help for init command Source: https://docs.zapier.com/integrations/reference/cli Get specific help for the `zapier init` command and its options by running `zapier help init`. ```bash zapier help init ``` -------------------------------- ### Action Chaining Example Source: https://docs.zapier.com/mcp/quickstart Use this to have the LLM perform multiple actions in sequence. This example finds emails, summarizes them, and creates follow-up tasks. ```text "Find all emails from clients today, summarize them, and create tasks for any that need follow-up" ``` -------------------------------- ### Start a local Zapier development server with JSON output Source: https://docs.zapier.com/integrations/reference/cli Get the output from `zapier local` in JSON format by using the `--output json` flag. This is useful for programmatic parsing. ```bash zapier local --output json ``` -------------------------------- ### Install Zapier SDK and CLI Source: https://docs.zapier.com/install Install the Zapier SDK for code projects and the CLI for development. Includes logging in to your Zapier account. ```bash npm install @zapier/zapier-sdk npm install -D @zapier/zapier-sdk-cli npx zapier-sdk login ``` -------------------------------- ### Example with API Key Authentication Source: https://docs.zapier.com/powered-by-zapier/managing-app-authentication/adding-app-authentications Use this example to add an API Key Authentication to your app. Ensure you supply the required api_key field. ```javascript // POST /authentications "data": { "app": "{MY_APP_ID}", "title": "{AUTHENTICATION_NAME}", "authentication_fields": { "api_key": "{MY_USERS_API_KEY}" } } ``` -------------------------------- ### Request to Get Output Fields Source: https://docs.zapier.com/powered-by-zapier/zap-creation/fields-and-fieldsets This snippet shows the structure of a POST request to the /actions/{action_id}/outputs endpoint to retrieve available output fields. It includes example authentication and input data. ```javascript // POST /actions/core:853266/outputs { "data": { "authentication": "762331", "inputs": { "worksheet": "ABC123", "spreadsheet": "EFGH456" } } } ``` -------------------------------- ### Get Authentications for an App Source: https://docs.zapier.com/powered-by-zapier/managing-app-authentication/get-authentications This JSON response shows an example of the data returned when fetching authentications for a specific app. It includes links for pagination, metadata about the results, and a list of owned authentications with their details. ```json // GET /authentications?app=81f613aa-c98a-4383-a5fc-195e68647217 { "links": { "next": null, "prev": null }, "meta": { "count": 1, "limit": 10, "offset": 0 }, "data": [ { "type": "authentication", "id": "example_akLLd8kB", "app": "81f613aa-c98a-4383-a5fc-195e68647217", "is_expired": false, "title": "Google Sheets some.user@mycompany.example" } ] } ``` -------------------------------- ### Zap Suggestion API Response Example Source: https://docs.zapier.com/powered-by-zapier/ai-workflows/zap-guesser The API response provides a title for the suggested Zap, a breakdown of recommended steps with potential alternatives, and a prefilled_url to guide users directly into the Zapier editor. ```json { "title": "Save Facebook Lead Ads leads to Google Sheets and send an email", "steps": [ { "step": { "title": "Trigger when a new lead is created in Facebook Lead Ads", "app": "Facebook Lead Ads", "api": "FacebookLeadsAPI" }, "alternatives": [ { "title": null, "app": "LinkedIn Ads", "api": "LinkedInLeadGenFormsCLIAPI@2.7.1" } ] }, { "step": { "title": "Save the lead information to a Google Sheet", "app": "Google Sheets", "api": "GoogleSheetsV2API" }, "alternatives": [] } ], "prefilled_url": "https://api.zapier.com/v1/embed/my-app/create?steps%5B0%5D%5Bapp%5D=FacebookLeadsAPI&steps%5B0%5D%5Baction%5D=lead&steps%5B0%5D%5Btype%5D=read&steps%5B1%5D%5Bapp%5D=GoogleSheetsV2API&steps%5B1%5D%5Baction%5D=add_row&steps%5B1%5D%5Btype%5D=write&utm_campaign=partner_zap_guesser&copilot_prompt=Save+new+leads+from+Facebook+Lead+Ads+to+Google+Sheets%2C+and+email+me+the+lead+in+Gmail&partner_zap_guesser_attempt_id=22f44602-db8f-4a2a-8b09-420b0d277b5f" } ``` -------------------------------- ### Get Connection Start URL and Wait for New Connection (JavaScript) Source: https://docs.zapier.com/sdk/cli-reference Initiates an SDK-driven connection flow by minting a short-lived URL. This URL is then used to wait for a new connection to be established. Pair with `wait-for-new-connection` to detect completion. ```javascript 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 }); ``` -------------------------------- ### Initialize Zapier integration with template Source: https://docs.zapier.com/integrations/reference/cli Create a new integration using a specific template. ```bash zapier init my-integration --template hello-world ``` -------------------------------- ### POST Request to Create Action Run Source: https://docs.zapier.com/powered-by-zapier/running-actions/create-action-run This example demonstrates the structure of a POST request to the /v2/action-runs/ endpoint to trigger an action. Ensure you replace placeholders like YOUR_ACCESS_TOKEN and use a unique action ID obtained from the Get Actions endpoint. ```http POST https://api.zapier.com/v2/action-runs/ Authorization: Bearer YOUR_ACCESS_TOKEN Content-Type: application/json { "data": { "action": "core:89sg4uhs5g85gh53hso59hs399hgs59", "authentication": "UHsi8e6K", "input": { "email": "user@example.com", "message": "Hello from Powered by Zapier!" }, "callback_url": "https://example.com/post_callback" } } ``` -------------------------------- ### Example Throttling Configurations Source: https://docs.zapier.com/integrations/reference/schema Illustrates different ways to configure throttling. These examples show how to set the time window, invocation limit, and filter for specific account types, with and without automatic retries. ```json { window: 60, limit: 100, filter: 'free' } ``` ```json { window: 60, limit: 100, filter: 'paid', retry: false } ``` ```json { window: 60, limit: 100, filter: 'trial', retry: true } ``` -------------------------------- ### Get Connection Start URL Source: https://docs.zapier.com/sdk/reference Mints a short-lived URL to begin an SDK-initiated connection flow. The URL is signed and bound to the current user/account. This is useful when you want to control the connection flow manually, such as emailing the URL or rendering it as a QR code. ```typescript const result = await zapier.getConnectionStartUrl({ app: "example-app", }); ``` -------------------------------- ### REST Hook Subscription and Unsubscription Source: https://docs.zapier.com/integrations/reference/legacy-scripting Set up REST hook subscriptions by defining pre-subscribe, post-subscribe, and pre-unsubscribe methods. This example demonstrates how to configure the request, parse the response to get a webhook ID, and construct the unsubscribe URL. This code is for the v2 platform only. ```javascript var Zap = { pre_subscribe: function(bundle) { bundle.request.method = 'POST'; bundle.request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; bundle.request.data = ".param({ url: bundle.target_url, list_id: bundle.trigger_fields.list_id, // from trigger field append_data: 1 }); return bundle.request; }, post_subscribe: function(bundle) { // must return a json serializable object for use in pre_unsubscribe var data = z.JSON.parse(bundle.response.content); // Zapier need this in order to build the {% templatetag openvariable %}webhook_id{% templatetag closevariable %} // in the rest hook unsubscribe url return {webhook_id: data.id}; }, pre_unsubscribe: function(bundle) { bundle.request.method = 'DELETE'; // bundle.subscribe_data is from return data in post_subscribe method bundle.request.url = 'https://example.com/x.php?id=' + bundle.subscribe_data.webhook_id; bundle.request.data = null; return bundle.request; }, }; ``` -------------------------------- ### List All Integrations with Raw Output Source: https://docs.zapier.com/integrations/reference/cli Lists all integrations associated with your account and formats the output as raw. Use the `--format` flag to change output to JSON or raw for piping to other tools. ```bash zapier-platform integrations -f raw ```