# Zapier — Meftah Integrations
> zapier.com/apps/meftah/integrations
> Surface: zapier.com | Root map: zapier.com/llms.txt#integrations

## 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).
- Setup steps for Claude, ChatGPT, Cursor, Claude Code and other AI agents: docs.zapier.com/mcp/get-started/quickstart.md

## Identity
Meftah is an invoice management tool for small businesses to create and manage invoices, track payments, integrate with other systems, and optimize cash flow.

- App slug: meftah
- Operations published here: 14 (2 events, 6 functions, 4 queries, 2 search-or-write actions)

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

- Auth type: oauth
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.112.6 and @zapier/zapier-sdk-cli v0.84.6; 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 meftah
```

## Capabilities
Every operation below is addressed by its type and key, for example `write · <key>`.

Zap editor: every operation below is also configurable without code at zapier.com/apps/meftah/integrations — useful for a human in the loop, not usually for an agent calling the SDK or MCP directly.

### Getting Started
- **MCP**: connect Meftah through mcp.zapier.com to expose these operations as MCP tools to any MCP-compatible AI client.
- **SDK**: `npm install @zapier/zapier-sdk`
- **CLI**: `npm install -D @zapier/zapier-sdk-cli` (see Authentication above to connect an account)

### Example
- **MCP**: ask your MCP client to call the tool for this operation's `type · key` — for example, `write · create_customer`.
- **SDK**:

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

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

const { data } = await zapier.runAction({
  app: "meftah",
  actionType: "write",
  action: "create_customer",
  connection: conn.id,
  inputs: { /* ... */ },
});
```

- **CLI**:

```bash
npx zapier-sdk run-action meftah write create_customer \
  --inputs '{}'
```

Paginating results: some calls return more than fits in one response — for example, listing Meftah's actions, or a search action's matches. In TypeScript, iterate with `.pages()` or `.items()` rather than assuming a single page:

```typescript
for await (const action of zapier.listActions({ app: "meftah" }).items()) {
  console.log(action.key);
}
```

From the shell, the same `--cursor`/`--max-items`/`--page-size` flags work on `list-actions` and directly on `run-action`. Add `--json` for output a script can parse instead of formatted text:

```bash
npx zapier-sdk list-actions meftah --page-size 50 --max-items 200 --json
```

### Events (2)

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

#### New Customer
Triggers when a new customer is created.

- Type: read · Key: `new_customer`
- Requires: nothing
- SDK: `runAction({ app: "meftah", actionType: "read", action: "new_customer" })`
- CLI: `npx zapier-sdk run-action meftah read new_customer`

#### New Invoice
Triggers when a new invoice is created.

- Type: read · Key: `new_invoice`
- Requires: nothing
- SDK: `runAction({ app: "meftah", actionType: "read", action: "new_invoice" })`
- CLI: `npx zapier-sdk run-action meftah read new_invoice`

### Functions (6)

Functions change something in Meftah.

#### Create Customer
Creates a customer.

- Type: write · Key: `create_customer`
- Requires: customerName, contactName, contactEmail, contactPhone
- Optional: addressLine1, addressLine2, city, postCode, accountNumber, taxIdentificationNumber, fax, mobile, website, internalNotes, customerType
- SDK: `runAction({ app: "meftah", actionType: "write", action: "create_customer" })`
- CLI: `npx zapier-sdk run-action meftah write create_customer`

#### Create Invoice
Creates an invoice.

- Type: write · Key: `create_invoice`
- Requires: customerId, date, dueDate, totalAmount, subtotalAmount, currencyId
- Optional: title, invoiceNumber, paymentTerms, taxAmount, discountAmount, note, footer, summary, status, reason, description, quantity, unitPrice, totalPrice, productId, taxId, discountId, accountId, zatcaInvoiceType
- SDK: `runAction({ app: "meftah", actionType: "write", action: "create_invoice" })`
- CLI: `npx zapier-sdk run-action meftah write create_invoice`

#### Create Product or Service
Creates a product or service.

- Type: write · Key: `create_product`
- Requires: name, price
- Optional: description, unitOfMeasurement, code, sellThis, buyThis
- SDK: `runAction({ app: "meftah", actionType: "write", action: "create_product" })`
- CLI: `npx zapier-sdk run-action meftah write create_product`

#### Send Invoice to Customer
Sends an invoice to the customer's email address. Updates the last-sent date and transitions the invoice status from Draft to Pending.

- Type: write · Key: `send_invoice_to_customer`
- Requires: invoiceId
- Optional: invoiceLink
- SDK: `runAction({ app: "meftah", actionType: "write", action: "send_invoice_to_customer" })`
- CLI: `npx zapier-sdk run-action meftah write send_invoice_to_customer`

#### Send Invoice to ZATCA
Submits an invoice to ZATCA (Saudi Tax Authority). Once submitted the invoice is locked — use a credit/debit note to reverse or adjust it.

- Type: write · Key: `send_invoice_to_zatca`
- Requires: invoiceId
- SDK: `runAction({ app: "meftah", actionType: "write", action: "send_invoice_to_zatca" })`
- CLI: `npx zapier-sdk run-action meftah write send_invoice_to_zatca`

#### Update Invoice
Partially updates an existing invoice. Only supplied fields are changed; omitted fields keep their current values. Content edits (amounts, items, dates) require Draft status.

- Type: write · Key: `update_invoice`
- Requires: invoiceId
- Optional: status, date, dueDate, paymentTerms, currencyId, totalAmount, subtotalAmount, taxAmount, discountAmount, note, summary, footer, reason, description, quantity, unitPrice, totalPrice, productId, taxId, discountId, accountId
- SDK: `runAction({ app: "meftah", actionType: "write", action: "update_invoice" })`
- CLI: `npx zapier-sdk run-action meftah write update_invoice`

### Queries (4)

Queries read from Meftah and return data. They change nothing.

#### Find Customer
Finds a customer by name.

- Type: search · Key: `find_customer`
- Requires: Filter
- SDK: `runAction({ app: "meftah", actionType: "search", action: "find_customer" })`
- CLI: `npx zapier-sdk run-action meftah search find_customer`

#### Find Invoice
Finds invoices by invoice number or keyword. Leave filter blank to list all invoices.

- Type: search · Key: `find_invoice`
- Requires: nothing
- Optional: Filter
- SDK: `runAction({ app: "meftah", actionType: "search", action: "find_invoice" })`
- CLI: `npx zapier-sdk run-action meftah search find_invoice`

#### Find Product or Service
Finds a product or service by name.

- Type: search · Key: `find_product`
- Requires: Filter
- SDK: `runAction({ app: "meftah", actionType: "search", action: "find_product" })`
- CLI: `npx zapier-sdk run-action meftah search find_product`

#### Find Tax
Finds a tax by name. Leave filter blank to list all taxes.

- Type: search · Key: `find_tax`
- Requires: nothing
- Optional: Filter
- SDK: `runAction({ app: "meftah", actionType: "search", action: "find_tax" })`
- CLI: `npx zapier-sdk run-action meftah search find_tax`

### Search or Write Actions (2)

These operations search for a match first, and create one only if nothing is found.

#### Find or Create Customer
Finds a customer, or creates one if it doesn't exist.

- Type: search_or_write · Key: `find_customer`
- Requires: Filter, customerName, contactName, contactEmail, contactPhone
- Optional: addressLine1, addressLine2, city, postCode, accountNumber, taxIdentificationNumber, fax, mobile, website, internalNotes, customerType
- SDK: `runAction({ app: "meftah", actionType: "search_or_write", action: "find_customer" })`
- CLI: `npx zapier-sdk run-action meftah search_or_write find_customer`

#### Find or Create Product or Service
Finds a product or service, or creates one if it doesn't exist.

- Type: search_or_write · Key: `find_product`
- Requires: Filter, name, price
- Optional: description, unitOfMeasurement, code, sellThis, buyThis
- SDK: `runAction({ app: "meftah", actionType: "search_or_write", action: "find_product" })`
- CLI: `npx zapier-sdk run-action meftah search_or_write find_product`

## Links
- Full app page: zapier.com/apps/meftah/integrations
- MCP: zapier.com/mcp/meftah
- SDK: npmjs.com/package/@zapier/zapier-sdk