### get_quickstart_steps Source: https://docs.zapier.com/integrations/news Retrieves the Zapier SDK quickstart guide as structured steps, including prerequisites and essential CLI commands. ```APIDOC ## get_quickstart_steps ### Description Returns the Zapier SDK quickstart process as a list of steps, including prerequisites and specific commands for installation and authentication. ### Response - **prerequisites** (array) - List of required environment setups. - **steps** (array) - List of objects containing step number, title, and optional command. - **docs_url** (string) - URL to the quickstart guide. - **docs_md_url** (string) - URL to the raw markdown version of the quickstart guide. ``` -------------------------------- ### Environment and Dependency Setup Source: https://docs.zapier.com/sdk/quickstart Commands to verify the Node.js version and install the required SDK packages. ```bash node -v ``` ```bash npm install @zapier/zapier-sdk ``` ```bash npm install -D @zapier/zapier-sdk-cli @types/node typescript tsx ``` -------------------------------- ### Session Authentication Configuration Source: https://platform.zapier.com/reference/cli-docs Example of defining session authentication fields and the session configuration object. ```javascript helpText: "Your login password.", }, // For Session Auth we store `sessionKey` automatically in `bundle.authData` // for future use. If you need to save/use something that the user shouldn't // need to type/choose, add a "computed" field, like: // {key: 'something': type: 'string', required: false, computed: true} // And remember to return it in sessionConfig.perform ], sessionConfig: { perform: getSessionKey }; const includeSessionKeyHeader = (request, ``` -------------------------------- ### Integration Configuration Structure Source: https://platform.zapier.com/reference/cli-docs Example of an integration configuration object defining output fields and sample data. ```javascript outputFields: [{ key: "id", type: "string" }], sample: { id: "12345" }, ``` -------------------------------- ### Authentication Configuration and Session Retrieval Source: https://platform.zapier.com/reference/cli-docs Example showing how to define an authentication object and extract a session key from a response. ```javascript return { sessionKey: response.data.sessionKey }; const authentication = { type: "session", // "test" could also be a function test: { url: ``` -------------------------------- ### Zapier CLI Configuration Structure Source: https://platform.zapier.com/reference/cli-docs Example of a field configuration object within a Zapier integration. ```json { "key": "username", "type": "string", "required": true, "helpText": "Your login username." }, { "key": "password", "type": "string", "required": true } ``` -------------------------------- ### Implementing Authentication and Request Headers Source: https://platform.zapier.com/reference/cli-docs Example of setting up basic authentication headers within a request object in a Zapier integration. ```javascript bundle.authData.api_key}:x`).toString("base64" ); request.headers.Authorization = `Basic ${basicHash}`; return request; }; ``` -------------------------------- ### Zapier CLI Platform Configuration Structure Source: https://platform.zapier.com/reference/cli-docs Example of a Zapier platform configuration file defining versioning, hydrators, and triggers. ```javascript "./package.json").version, platformVersion: require("zapier-platform-core").version, // don't forget to register hydrators here! // it can be imported from any module hydrators: { getMovieDetails, }, triggers: { new_movie: { noun: "Movie", display: { ``` -------------------------------- ### Defining a Zapier Integration Module Source: https://platform.zapier.com/reference/cli-docs Example of exporting a module with key, noun, and display properties for a Zapier integration. ```javascript module.exports = { key: "add_rows", noun: "Rows", display: { label: "Add Rows" ``` -------------------------------- ### Session Authentication Configuration Source: https://platform.zapier.com/reference/cli-docs Example of defining an authentication object with a beforeRequest hook for session key inclusion. ```javascript const App = { // ... authentication, beforeRequest: [includeSessionKeyHeader], // ... }; ``` -------------------------------- ### Set Session Key Header Source: https://platform.zapier.com/reference/cli-docs Example of checking for a session key in the bundle and applying it to the request headers. ```javascript z, bundle) => {\n if (bundle.authData.sessionKey) {\n request.headers = request.headers || {};\n request.headers["X-Session-Key"] = bundle.authData.sessionKey;\n ``` -------------------------------- ### Stashing and Processing Files Source: https://platform.zapier.com/reference/cli-docs Example demonstrating how to stash a file using z.stashFile and define an asynchronous function for processing a list of files. ```javascript url: bundle.inputData.downloadUrl, raw: true }); // and swap it for a stashed URL return z.stashFile(filePromise); }; const pdfList = async (z, bundle) => { ``` -------------------------------- ### Define a Zapier Resource Module Source: https://platform.zapier.com/reference/cli-docs Example of exporting a resource configuration object with key, noun, and display properties. ```javascript module.exports = { key: "paging", noun: "Paging", display: { label: "Get Paging", description: "Triggers on a new paging.", } ``` -------------------------------- ### Zapier CLI Integration Configuration Source: https://platform.zapier.com/reference/cli-docs Example of configuring an integration using dehydrateFile and setting the application version. ```javascript dehydrateFile(stashPDFfunction, { downloadUrl: pdf.secret_download_url, }); delete pdf.secret_download_url; return pdf; }); }; const App = { version: require("./package.json"). ``` -------------------------------- ### Example Trigger Definition Source: https://platform.zapier.com/reference/cli-docs This structure defines a trigger for reading data into Zapier, such as watching for new recipes. ```javascript url: "https://example.com/recipes", body: { name: "Baked Falafel", style: "mediterranean", }, }, }, }, }, }; ``` -------------------------------- ### Define Authentication Configuration Source: https://platform.zapier.com/reference/cli-docs Example of an authentication configuration object defining a test URL and required input fields for a Zapier integration. ```javascript test: { url: "https://{{bundle.authData.subdomain}}.example.com/me", }, // If you need any fields upfront, put them here fields: [ { key: "subdomain", type: "string", required: true, default: "app" }, ], // For OAuth1 we store `oauth_token` and `oauth_token_secret` automatically // in `bundle.authData` for future use. ``` -------------------------------- ### Define Integration Operations Source: https://platform.zapier.com/reference/cli-docs Example structure for defining operations like triggers or searches within a Zapier integration. ```javascript , }, // `operation` implements the API call used to fetch the data operation: { perform: { url: "https://example.com/recipes", }, }, another_trigger: { // Another trigger definition... }, }; ``` -------------------------------- ### Zapier Integration Operation Configuration Source: https://platform.zapier.com/reference/cli-docs Example configuration for a Zapier integration operation, including buffering settings and input field definitions. ```javascript description: "Add rows to a worksheet.", }, operation: { buffer: { groupedBy: ["spreadsheet", "worksheet"], limit: 3 }, performBuffer inputFields: [ { key: "spreadsheet", type: ``` -------------------------------- ### Zapier Integration Definition Structure Source: https://platform.zapier.com/reference/cli-docs Example structure for defining operations like triggers or searches within a Zapier integration. ```javascript , }, }, // `operation` implements the API call used to fetch the data operation: { perform: { url: "https://example.com/recipes", }, }, }, another_trigger: { // Another trigger definition... }, }; ``` -------------------------------- ### Define Output Fields in Zapier CLI Source: https://platform.zapier.com/reference/cli-docs Example of defining output fields for a recipe object, including nested and line item fields. ```javascript const recipeOutputFields = [ {key: 'id', label: 'ID'}, {key: 'title', label: 'Title'}, {key: 'author__name', label: 'Author Name'}, {key: 'ingredients[]name', label: 'Ingredient Name'} ]; ``` -------------------------------- ### Define Session Key Retrieval Function Source: https://platform.zapier.com/reference/cli-docs Example of an asynchronous function used to retrieve a session key within a Zapier integration. ```javascript const getSessionKey = async (z, bundle) => { ``` -------------------------------- ### Modify Request Headers for Authentication Source: https://platform.zapier.com/reference/cli-docs Example of setting the Authorization header using a basic hash in a Zapier CLI integration. ```javascript bundle.authData.api_key:x).toString("base64" ); request.headers.Authorization = `Basic ${basicHash}`; return request; }; ``` -------------------------------- ### Define IDE Deep Link Tool Source: https://platform.zapier.com/reference/cli-docs Defines a tool that generates deep links for various IDEs based on a setup prompt. ```javascript Omit to get links for all.',\n enum: ['claude-code', 'cursor', 'vscode', 'codex'],\n },\n },\n },\n readOnly: true,\n execute: function (input) {\n var encoded = encodeURIComponent(SETUP_PROMPT);\n var links = {};\n Object.keys(IDE_DEEP_LINKS).forEach(function (ide) {\n links[ide] = IDE_DEEP_LINKS[ide] + encoded;\n });\n var requested = input && typeof input.ide === 'string' ? input.ide : null;\n if (requested && links[requested]) {\n return { ide: requested, url: links[requested] };\n }\n // Unknown ide: return all links, but signal the request wasn't matched\n // so the agent doesn't assume its value was honored.\n if (requested) {\n return { requested_unavailable: requested, links: links };\n }\n return { links: links };\n },\n },\n ];\n } ``` -------------------------------- ### Get Actions Request Examples Source: https://docs.zapier.com/powered-by-zapier/api-reference/actions/get-actions Examples of how to perform a GET request to the actions endpoint across various programming languages. ```bash curl --request GET \ --url https://api.zapier.com/v2/actions \ --header 'Authorization: Bearer ' ``` ```python import requests url = "https://api.zapier.com/v2/actions" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) ``` ```javascript const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.zapier.com/v2/actions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); ``` ```php "https://api.zapier.com/v2/actions", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.zapier.com/v2/actions" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` ```java HttpResponse response = Unirest.get("https://api.zapier.com/v2/actions") .header("Authorization", "Bearer ") .asString(); ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.zapier.com/v2/actions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` -------------------------------- ### Initialize Integration Project Source: https://docs.zapier.com/integrations/quickstart/cli-tutorial Creates a new directory with the required file structure and installs necessary dependencies. ```bash # Create a directory with the minimum required files and choose a template zapier init example-app --template minimal # Move into the new directory cd example-app ``` ```bash npm install ``` -------------------------------- ### Get Input Fields API Request Examples Source: https://docs.zapier.com/powered-by-zapier/api-reference/actions/get-input-fields Examples of how to call the Get Input Fields endpoint across various programming languages. ```curl curl --request POST \ --url https://api.zapier.com/v2/actions/{action_id}/inputs \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "data": { "authentication": "928117", "inputs": { "spreadsheet": "my_sheet" } } } ' ``` ```python import requests url = "https://api.zapier.com/v2/actions/{action_id}/inputs" payload = { "data": { "authentication": "928117", "inputs": { "spreadsheet": "my_sheet" } } } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) ``` ```javascript const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({data: {authentication: '928117', inputs: {spreadsheet: 'my_sheet'}}})}; fetch('https://api.zapier.com/v2/actions/{action_id}/inputs', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); ``` ```php "https://api.zapier.com/v2/actions/{action_id}/inputs", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'data' => [ 'authentication' => '928117', 'inputs' => [ 'spreadsheet' => 'my_sheet' ] ] ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer ", "Content-Type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.zapier.com/v2/actions/{action_id}/inputs" payload := strings.NewReader("{\n \"data\": {\n \"authentication\": \"928117\",\n \"inputs\": {\n \"spreadsheet\": \"my_sheet\"\n }\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` ```java HttpResponse response = Unirest.post("https://api.zapier.com/v2/actions/{action_id}/inputs") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"data\": {\n \"authentication\": \"928117\",\n \"inputs\": {\n \"spreadsheet\": \"my_sheet\"\n }\n }\n}") .asString(); ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.zapier.com/v2/actions/{action_id}/inputs") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"data\": {\n \"authentication\": \"928117\",\n \"inputs\": {\n \"spreadsheet\": \"my_sheet\"\n }\n }\n}" response = http.request(request) puts response.read_body ``` -------------------------------- ### API Endpoint Example Source: https://docs.zapier.com/integrations/reference/cli-docs Example of a GET request path used in API polling scenarios. ```http GET /id.json ``` -------------------------------- ### Initialize new project Source: https://docs.zapier.com/llms-full.txt Creates a new Zapier SDK project directory with starter files. ```bash npx zapier-sdk init [--non-interactive] ``` -------------------------------- ### Get Actions Request Source: https://docs.zapier.com/powered-by-zapier/api-reference/actions/get-actions Examples of how to perform a GET request to the actions endpoint using Java and Ruby. ```Java HttpResponse response = Unirest.get("https://api.zapier.com/v2/actions") .header("Authorization", "Bearer ") .asString(); ``` ```Ruby require 'uri'require 'net/http'url = URI("https://api.zapier.com/v2/actions")http = Net::HTTP.new(url.host, url.port)http.use_ssl = truerequest = Net::HTTP::Get.new(url)request["Authorization"] = 'Bearer 'response = http.request(request)puts response.read_body ``` -------------------------------- ### Initialize Project and Install SDK Source: https://docs.zapier.com/sdk/quickstart Commands to create a new directory, initialize a Node.js project, set the module type, and install the Zapier SDK. ```shellscript # 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 ``` -------------------------------- ### Initialize Project Source: https://docs.zapier.com/sdk/quickstart Create a new package.json file if one does not already exist in the current directory. ```bash npm init -y ``` -------------------------------- ### Get Promotion Enrollment API Request Source: https://docs.zapier.com/powered-by-zapier/api-reference/promotions/get-enrollment Examples of how to perform a GET request to retrieve promotion enrollment details. ```go package mainimport ( "fmt" "net/http" "io")func main() { url := "https://api.zapier.com/v2/promotions/{enrollment_id}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body))} ``` ```java HttpResponse response = Unirest.get("https://api.zapier.com/v2/promotions/{enrollment_id}") .header("Authorization", "Bearer ") .asString(); ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.zapier.com/v2/promotions/{enrollment_id}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` -------------------------------- ### Get Authentications API Requests Source: https://docs.zapier.com/powered-by-zapier/api-reference/authentications/get-authentications Examples of how to call the GET /authentications endpoint using various programming languages. ```curl curl --request GET \ --url https://api.zapier.com/v2/authentications \ --header 'Authorization: Bearer ' ``` ```python import requestsurl = "https://api.zapier.com/v2/authentications"headers = {"Authorization": "Bearer "}response = requests.get(url, headers=headers)print(response.text) ``` ```javascript const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.zapier.com/v2/authentications', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); ``` ```php "https://api.zapier.com/v2/authentications", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer " ],]);$response = curl_exec($curl);$err = curl_error($curl);curl_close($curl);if ($err) { echo "cURL Error #:" . $err;} else { echo $response;} ``` ```go package mainimport ( "fmt" "net/http" "io")func main() { url := "https://api.zapier.com/v2/authentications" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body))} ``` ```java HttpResponse response = Unirest.get("https://api.zapier.com/v2/authentications") .header("Authorization", "Bearer ") .asString(); ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.zapier.com/v2/authentications") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ```