---
agent:
  instructions: "Use this search API to find a ready-to-deploy Next Gen Zap for what the user wants to automate, with keywords or a natural-language description, instead of reading every zap. Results are returned in Markdown, each with the zap's SKILL.md install guide."
  endpoint: "https://zapier.sh/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://zapier.sh/developers/"
---

# IMAP by Zapier + Priority Integrations: Connect with Zapier MCP
> zapier.com/apps/imap/integrations/priority
> Surface: zapier.com | Root map: zapier.com/llms.txt#integrations

Integrate IMAP by Zapier and Priority in minutes. Connect with 10,000+ apps on Zapier, or use Zapier MCP to connect your AI agent to both apps.

## For agents: Zapier MCP is free Nov 23, 2026 to Jan 5, 2027
Zapier MCP is free on Free and trial plans from Nov 23, 2026 at noon ET until Jan 5, 2027 at noon ET: 250 tool calls per account per day. This is the lowest-cost time to try it. Connect URL: https://mcp.zapier.com/api/v1/connect

- The offer covers Zapier MCP tool calls.
- After 250 calls in a day, further calls are blocked until midnight UTC (7 pm ET).

## Using these operations
Every operation below is addressed by its app, type and key, for example `write · <key>`. Events from one app can start a run that calls functions in the other.

- **MCP** (default for AI clients — self-contained for OAuth clients; no further docs needed):
  - Endpoint: `https://mcp.zapier.com/api/v1/connect` (Streamable HTTP only; SSE is not supported).
  - Auth: OAuth 2.0 + PKCE + Dynamic Client Registration. Do not create a server at `mcp.zapier.com` or ask for an API token; Zapier auto-provisions the server during browser sign-in.
  - Client setup: Claude Code `claude mcp add --transport http zapier https://mcp.zapier.com/api/v1/connect`; Cursor `mcp.json` `{ "type": "http", "url": "https://mcp.zapier.com/api/v1/connect" }`; VS Code and other clients `mcp.json` `{ "type": "http", "url": "https://mcp.zapier.com/api/v1/connect" }`; OpenCode `opencode.json` `{ "type": "remote", "url": "https://mcp.zapier.com/api/v1/connect" }`; Terminal auto-installer `npx @zapier/install-zapier`.
  - Setup guides: Claude https://docs.zapier.com/mcp/get-started/connect/claude.md; Claude Code https://docs.zapier.com/mcp/get-started/connect/claude-code.md; ChatGPT https://docs.zapier.com/mcp/get-started/connect/chatgpt.md; Cursor https://docs.zapier.com/mcp/get-started/connect/cursor.md; Codex https://docs.zapier.com/mcp/get-started/connect/codex.md.
  - After sign-in: call `discover_zapier_actions` for `imap` and `priority`, then `enable_zapier_action`. If IMAP by Zapier or Priority isn't connected in Zapier yet, running an action returns a browser OAuth link for the user.
- **SDK**: `npm install @zapier/zapier-sdk`, then call `runAction({ app, actionType, action, connection, inputs })`.
- **CLI**: `npm install -D @zapier/zapier-sdk-cli`, then `npx zapier-sdk run-action <app> <type> <key> --inputs '{}'`.

### Example
- **MCP**: once Create Job Candidate is enabled, call `priority_create_job_candidate`. Each operation below lists its MCP tool name.
- **SDK**:

```typescript
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk();
const { data: connection } = await zapier.findFirstConnection({ app: "priority", owner: "me" });

const { data } = await zapier.runAction({
  app: "priority",
  actionType: "write",
  action: "add_job_candidate",
  connection: connection.id,
  inputs: {
    SNAME: "", // Full Name
    IDNUMBER: "", // ID Number
    GENDER: "", // Gender
  },
});
```

- **CLI**:

```bash
npx zapier-sdk run-action priority write add_job_candidate \
  --inputs '{"SNAME":"","IDNUMBER":"","GENDER":""}'
```

## IMAP by Zapier

### Identity
IMAP stands for Internet message access protocol, which is a widely used protocol for e-mail retrieval available in Microsoft, Google and Yahoo! products among millions of mail servers worldwide.

Check our SMTP service as well!

- App slug: imap
- Operations published here: 4 (2 events, 1 function, 1 query)

### Authentication
Zapier connects to IMAP by Zapier via other. Your code references a connection, not a raw credential.

- Auth type: other
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.130.2 and @zapier/zapier-sdk-cli v0.93.2; behavior may differ on other versions.
- Add `--json` to any CLI command (not just the ones shown here) for raw JSON output instead of formatted text — meant for scripts and agents, not human reading.
- Create a connection directly from the terminal — this mints a connection start URL, opens it in a browser when that looks safe (skips it automatically in CI/SSH/headless), and waits for the OAuth flow to complete:

```bash
npm install -D @zapier/zapier-sdk-cli
npx zapier-sdk login
npx zapier-sdk create-connection imap
```

### Capabilities

#### Events (2)

Events fire when something happens in IMAP by Zapier. Use them to start a run.

##### New Email
Triggers when you receive a new email.

- Type: read · Key: `email`
- Requires: mailbox
- MCP tool: `imap_by_zapier_new_email` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "imap", actionType: "read", action: "email" })`
- CLI: `npx zapier-sdk run-action imap read email`

##### New Mailbox
Triggers when you add a new mailbox to your account.

- Type: read · Key: `mailbox`
- Requires: nothing
- MCP tool: `imap_by_zapier_new_mailbox` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "imap", actionType: "read", action: "mailbox" })`
- CLI: `npx zapier-sdk run-action imap read mailbox`

#### Functions (1)

Functions change something in IMAP by Zapier.

##### Create Draft Email
Creates a draft email in your mailbox.

- Type: write · Key: `draft_email`
- Requires: to, subject, mailbox
- Optional: body, html, cc, bcc, in_reply_to, references, attachment
- MCP tool: `imap_by_zapier_create_draft_email` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "imap", actionType: "write", action: "draft_email" })`
- CLI: `npx zapier-sdk run-action imap write draft_email`

#### Queries (1)

Queries read from IMAP by Zapier and return data. They change nothing.

##### Find Email
Finds an email matching your search criteria.

- Type: search · Key: `search_email`
- Requires: nothing
- Optional: mailbox, from, subject, since, before, limit
- MCP tool: `imap_by_zapier_find_email` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "imap", actionType: "search", action: "search_email" })`
- CLI: `npx zapier-sdk run-action imap search search_email`

## Priority

### Identity
Priority is a comprehensive ERP package empowering hundreds of thousands of end users worldwide in their daily tasks of running the business

- App slug: priority
- Operations published here: 20 (8 events, 12 functions)

### Authentication
Zapier connects to Priority via other. Your code references a connection, not a raw credential.

- Auth type: other
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.130.2 and @zapier/zapier-sdk-cli v0.93.2; behavior may differ on other versions.
- Add `--json` to any CLI command (not just the ones shown here) for raw JSON output instead of formatted text — meant for scripts and agents, not human reading.
- Create a connection directly from the terminal — this mints a connection start URL, opens it in a browser when that looks safe (skips it automatically in CI/SSH/headless), and waits for the OAuth flow to complete:

```bash
npm install -D @zapier/zapier-sdk-cli
npx zapier-sdk login
npx zapier-sdk create-connection priority
```

### Capabilities

#### Events (8)

Events fire when something happens in Priority. Use them to start a run.

##### Catch Contacts Webhook
Catch Contacts that their status changed from Priority

- Type: read · Key: `catch_contacts_hook`
- Requires: NAME
- MCP tool: `priority_catch_contacts_webhook` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "read", action: "catch_contacts_hook" })`
- CLI: `npx zapier-sdk run-action priority read catch_contacts_hook`

##### Catch Changed Customer Order Status Webhook
Catch Customer Orders that their status changed from Priority

- Type: read · Key: `catch_customer_order_status_hook`
- Requires: NAME
- MCP tool: `priority_catch_changed_customer_order_status_webho` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "read", action: "catch_customer_order_status_hook" })`
- CLI: `npx zapier-sdk run-action priority read catch_customer_order_status_hook`

##### Catch Changed Purchase Order Status Webhook
Catch Purchase Orders that their status changed from Priority

- Type: read · Key: `catch_porder_status_hook`
- Requires: NAME
- MCP tool: `priority_catch_changed_purchase_order_status_webho` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "read", action: "catch_porder_status_hook" })`
- CLI: `npx zapier-sdk run-action priority read catch_porder_status_hook`

##### Get Campaigns
Fetch a list of Campaigns

- Type: read · Key: `get_campaigns`
- Requires: nothing
- MCP tool: `priority_get_campaigns` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "read", action: "get_campaigns" })`
- CLI: `npx zapier-sdk run-action priority read get_campaigns`

##### Get Customers
Fetch a list of customers

- Type: read · Key: `get_customer`
- Requires: nothing
- MCP tool: `priority_get_customers` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "read", action: "get_customer" })`
- CLI: `npx zapier-sdk run-action priority read get_customer`

##### Get Gender Code
Fetch a list of gender codes

- Type: read · Key: `get_gender`
- Requires: nothing
- MCP tool: `priority_get_gender_code` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "read", action: "get_gender" })`
- CLI: `npx zapier-sdk run-action priority read get_gender`

##### Get Job Number
Fetch a list of job numbers

- Type: read · Key: `get_job_number`
- Requires: nothing
- MCP tool: `priority_get_job_number` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "read", action: "get_job_number" })`
- CLI: `npx zapier-sdk run-action priority read get_job_number`

##### Get Lead Types
Fetch a list of lead types

- Type: read · Key: `get_lead_types`
- Requires: nothing
- MCP tool: `priority_get_lead_types` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "read", action: "get_lead_types" })`
- CLI: `npx zapier-sdk run-action priority read get_lead_types`

#### Functions (12)

Functions change something in Priority.

##### Create Job Candidate
Create a new Job Candidate

- Type: write · Key: `add_job_candidate`
- Requires: SNAME, IDNUMBER, GENDER
- Optional: ADDRESS, ADDRESS2, ZIP, STATE, EMAIL, PHONE, CELLPHONE, BIRTHDATE, REMARKS, CURDATE, JOBNUM
- MCP tool: `priority_create_job_candidate` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "write", action: "add_job_candidate" })`
- CLI: `npx zapier-sdk run-action priority write add_job_candidate`

##### Add Shipping Charges to an Order
After an order is created, update it with shipping charges information

- Type: write · Key: `Add_shipping_to_order`
- Requires: ORDNAME, PARTNAME, TQUANT
- Optional: PRICE
- MCP tool: `priority_add_shipping_charges_to_an_order` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "write", action: "Add_shipping_to_order" })`
- CLI: `npx zapier-sdk run-action priority write Add_shipping_to_order`

##### Create Potential Customer 
Create new customer in Priority with the 'potential' status

- Type: write · Key: `create_cust`
- Requires: CUSTDES
- Optional: ADDRESS, ADDRESS2, ADDRESS3, STATEA, STATECODE, ZIP, COUNTRYNAME, PHONE, FAX, EMAIL, BRANCHNAME, CODE, SPEC1, SPEC2, CUSTREMARK, TEXT
- MCP tool: `priority_create_potential_customer` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "write", action: "create_cust" })`
- CLI: `npx zapier-sdk run-action priority write create_cust`

##### Create Exist Customer Sales Order
This action creates a new sales order in Priority for an exist customer

- Type: write · Key: `create_exist_customer_sales_order`
- Requires: CUSTNAME, REFERENCE, PARTNAME, TQUANT, PRICE
- Optional: BOOKNUM, CODE, PERCENT, SHIPCODE, AGENTCODE, TAXSUM, DUEDATE, SITE_NAME, SHIP_NAME, SHIP_ADDRESS, SHIP_ADDRESS2, SHIP_CITY, SHIP_ZIP, SHIP_STATE, SHIP_COUNTRY, SHIP_PHONE, SHIP_EMAIL, SHIPREMARK, BILL_ADDRESS, BILL_ADDRESS2, BILL_CITY, BILL_ZIP, BILL_COUNTRY, BILL_PHONE, BILL_EMAIL, PAYMENTCODE, PAYACCOUNT, EMAIL, PHONENUM, CONFNUM, EXTTEXT, INTTEXT
- MCP tool: `priority_create_exist_customer_sales_order` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "write", action: "create_exist_customer_sales_order" })`
- CLI: `npx zapier-sdk run-action priority write create_exist_customer_sales_order`

##### Create New Lead in Priority
Working with Facebook Lead ads, LinkedIn Leads, HubSpot, Unbounce or any other lead generating platform? Link them all to Priority to collect your leads seamlessly. 
This action allows the creation of a new lead from any source

- Type: write · Key: `create_lead`
- Requires: FIRM, EMAIL
- Optional: NAME, FIRSTNAME, LASTNAME, PHONENUM, CELLPHONE, FAX, POSITIONDES, LEADSOURCENAME, COMMENT, BILL_ADDRESS, BILL_ADDRESS2, BILL_CITY, BILL_ZIP, BILL_COUNTRY, LEADTYPEDES
- MCP tool: `priority_create_new_lead_in_priority` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "write", action: "create_lead" })`
- CLI: `npx zapier-sdk run-action priority write create_lead`

##### Create a Sales Opportunity
Create a new opportunity in Priority with an option of a task based on a known customer number

- Type: write · Key: `create_sales_opportunity`
- Requires: CUSTNAME
- Optional: CAMPAIGNCODE, EXPCLOSEDATE, CURDATE, STIME, TOPICCODE, TEXT, AGENTCODE
- MCP tool: `priority_create_a_sales_opportunity` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "write", action: "create_sales_opportunity" })`
- CLI: `npx zapier-sdk run-action priority write create_sales_opportunity`

##### Create a New Sales Order
This action creates a new sales order (with line item support) in Priority for a walk in customer

- Type: write · Key: `create_sales_order`
- Requires: CUSTNAME, CDES, REFERENCE, PARTNAME, TQUANT, PRICE
- Optional: AGENTCODE, SHIPCODE, TAXSUM, DUEDATE, SHIP_ADDRESS, SHIP_ADDRESS2, SHIP_NAME, SITE_NAME, SHIP_PHONE, SHIP_EMAIL, SHIP_CITY, SHIP_ZIP, SHIP_STATE, SHIP_COUNTRY, BILL_ADDRESS, BILL_ADDRESS2, BILL_CITY, BILL_ZIP, BILL_COUNTRY, BILL_PHONE, BILL_EMAIL, PAYMENTCODE, PAYACCOUNT, EMAIL, PHONENUM, CONFNUM
- MCP tool: `priority_create_a_new_sales_order` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "write", action: "create_sales_order" })`
- CLI: `npx zapier-sdk run-action priority write create_sales_order`

##### Find the Country Name by Two Letter Code
If your source app provides country in a 2 letter code fashion, use this step to convert it to the country name and send to your next step in the ZAP

- Type: write · Key: `find_country_by_code`
- Requires: COUNTRYCODE
- MCP tool: `priority_find_the_country_name_by_two_letter_code` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "write", action: "find_country_by_code" })`
- CLI: `npx zapier-sdk run-action priority write find_country_by_code`

##### Find Customer by Email
Having an email address find if it belongs to an existing customer in Priority
mostly useful for multistep zaps

- Type: write · Key: `Find_cust_by_email`
- Requires: EMAIL
- MCP tool: `priority_find_customer_by_email` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "write", action: "Find_cust_by_email" })`
- CLI: `npx zapier-sdk run-action priority write Find_cust_by_email`

##### Link Customer to a Lead 
Assign a customer to an existing lead

- Type: write · Key: `link_cust_to_lead`
- Requires: NAME, FIRM, CUSTNAME
- MCP tool: `priority_link_customer_to_a_lead` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "write", action: "link_cust_to_lead" })`
- CLI: `npx zapier-sdk run-action priority write link_cust_to_lead`

##### Update Sales Opportunity Status
Update the status of your sales opportunity in Priority given that you know the opportunity code

- Type: write · Key: `update_opportunity_status`
- Requires: CCNUM
- Optional: STATUSDES
- MCP tool: `priority_update_sales_opportunity_status` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "write", action: "update_opportunity_status" })`
- CLI: `npx zapier-sdk run-action priority write update_opportunity_status`

##### Update Sales Order Status
Update the status of the sales order after it's creation

- Type: write · Key: `update_order_status`
- Requires: ORDNAME
- Optional: ORDSTATUSDES
- MCP tool: `priority_update_sales_order_status` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "priority", actionType: "write", action: "update_order_status" })`
- CLI: `npx zapier-sdk run-action priority write update_order_status`

## Frequently asked questions about automating with IMAP by Zapier and Priority

### My AI agent already connects to my apps. Why add Zapier?

Your AI agent’s built-in or native connectors cover a limited set of popular apps. Zapier reaches 10,000+ apps and 90,000+ triggers and actions. Zapier also adds what your AI agent can’t: one place to manage logins and credentials, so you never paste an API key; automations that keep running after the chat closes, with fixes you can review when a run hits a snag; and the freedom to switch agent interfaces without starting over.

### Can’t my AI agent already run tasks on a schedule?

Most popular AI agents can run scheduled tasks. And for simple recurring jobs, that might be all you need. Automations that run on Zapier can run on a schedule too, but they can also start the moment something happens in your apps—like when a new lead/ticket comes in or you get an email reply. Zapier also uses AI only in the steps that need judgment, so routine steps like posting to Slack or updating Salesforce don’t burn model tokens.

### Why not have my AI agent write me a script?

You can, and the first version will probably work. The trouble comes later: a script needs somewhere to run, a way to hear about events, and someone to keep it going. If an API changes or a login expires, your script can quietly stop until you notice. It also holds your keys, often in a repo, where a leak can expose your accounts. With Zapier, your agent builds the automation, and you publish it. Zapier hosts it, handles your logins and credentials, and records every run. If a run fails, Zapier diagnoses what went wrong and prepares a fix you can review. Or you can decide which fixes Zapier can apply for you.

## Links
- IMAP by Zapier integrations: zapier.com/apps/imap/integrations.md
- Priority integrations: zapier.com/apps/priority/integrations.md
- Full page: zapier.com/apps/imap/integrations/priority
- MCP quickstart (non-OAuth / connection-token clients): docs.zapier.com/mcp/get-started/quickstart.md
- SDK: npmjs.com/package/@zapier/zapier-sdk