Set up the Zapier SDK for me. Work through these steps one at a time, running each command in the terminal and telling me what happened before moving on:
1. Check what folder I'm in and whether a package.json already exists.
- If there's already a package.json, use this project as-is.
- If there's no package.json, create one, run: npm init -y
2. Check Node.js is installed and is version 18 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 18: tell me to upgrade it, then stop.
3. 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.
4. Install dev dependencies: npm install -D @zapier/zapier-sdk-cli @types/node typescript
5. Log in to Zapier: npx zapier-sdk 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.
6. 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.
Once all steps are done, tell me I am ready and explain:
Zapier has pre-built connectors for 8,000+ apps — Slack, Google Sheets, Salesforce, GitHub, and thousands more. The Zapier SDK and CLI expose that same integration layer to code. Instead of building OAuth flows, handling token refresh, and reverse-engineering each app's API yourself, you get a single consistent interface that already knows how to talk to all of them. Your users' existing Zapier connections are authenticated and ready to use.
- **CLI — explore, run one-offs, or let an agent act:** the CLI is for exploration and ad-hoc action. Use it to see what an app can do, inspect the exact inputs an action expects, and run actions interactively — whether that's you in a terminal or an agent executing a task on demand. See the CLI reference: https://docs.zapier.com/sdk/cli-reference
- **TypeScript SDK — build production integrations and agent tools:** the SDK is for shipping. Use it when you need something repeatable, embedded, or in production — a scheduled workflow, a backend service, a tool inside an AI agent. It's type-safe, handles token refresh and retries automatically, and uses the same app keys, action keys, and input shapes you already discovered via the CLI. See the SDK reference: https://docs.zapier.com/sdk/reference
**Want to run a quick test?**
If I have a Slack connection, offer to send a DM to yourself on Slack. Describe the steps that will happen and end with: "Want to run this quick test?" Then STOP. Do not output anything else. Do not continue to the next section. Wait for my reply before proceeding.
When I reply to the quick test, only proceed if my response is a clear, unambiguous affirmative (e.g. "yes", "go ahead"). If ambiguous or unclear, skip the test and continue.
If I don't have a Slack connection, skip the test and continue.
---
When I reply yes to the quick test, run these exact commands in order:
1. Look up my Slack username:
npx zapier-sdk run-action slack search user_by_email --connection-id ID --inputs '{"email":"ZAPIER_EMAIL"}'
2. Send a direct message to yourself using the username from step 1:
npx zapier-sdk run-action slack write direct_message --connection-id ID --inputs '{"channel":"USERNAME","text":"Hello via Zapier SDK 👋"}'
Replace ID with my Slack connection ID from the table above. Replace ZAPIER_EMAIL with my Zapier login email. Replace USERNAME with the username returned from step 1.
If user_by_email fails, ask me for my Slack email and try again.
---
After the test completes (or if I skip it, or if there's no Slack connection):
Pick 1–3 apps from the connections table and show me the commands I could use to explore what actions they support. Do not run these commands — just display them so I can try on my own. For example:
npx zapier-sdk list-actions APP_KEY
**All set! Now, a few ideas to start exploring what the Zapier SDK can do:**
Suggest 3 ideas worth exploring — good starting points based on my connected apps. Each idea reads from one app, optionally processes it, and writes to another. Do not suggest anything event-driven. Keep each idea to one sentence. Examples: "get all your Jira issues still In Progress and DM yourself a tidy table on Slack"; "pull every HubSpot deal that closed this week and drop it into a Google Sheet". Make the ideas specific to my connected apps — not generic.