# Zapier — Afleet Integrations
> zapier.com/apps/afleet/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
Afleet helps you grow your business through your existing customers.

- App slug: afleet
- Operations published here: 13 (6 events, 7 functions)

## Authentication
Zapier connects to Afleet 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.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 afleet
```

## 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/afleet/integrations — useful for a human in the loop, not usually for an agent calling the SDK or MCP directly.

### Getting Started
- **MCP**: connect Afleet 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 · ambassadorEnrolled`.
- **SDK**:

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

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

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

- **CLI**:

```bash
npx zapier-sdk run-action afleet write ambassadorEnrolled \
  --inputs '{}'
```

Paginating results: some calls return more than fits in one response — for example, listing Afleet'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: "afleet" }).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 afleet --page-size 50 --max-items 200 --json
```

### Events (6)

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

#### Triggers When There Is a New Reward.
Triggers when a new reward is created inside the Afleet portal.

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

#### New Campaign
Triggers when a new Campaign is created on afleet portal.

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

#### Distribute Reward
Triggers when a reward is accepted or rejected

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

#### Enroll Ambassador
Triggers when a new ambassador is enrolled

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

#### Submission Rejected of an Ambassador
Triggers when a submission is rejected

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

#### Successful Submission of an Ambassador
Triggers When an ambassador makes a successful submission

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

### Functions (7)

Functions change something in Afleet.

#### Ambassador Enrolled
Action to enroll the ambassadors in a program

- Type: write · Key: `ambassadorEnrolled`
- Requires: program_id, first_name, last_name, email, country, contact, industry
- SDK: `runAction({ app: "afleet", actionType: "write", action: "ambassadorEnrolled" })`
- CLI: `npx zapier-sdk run-action afleet write ambassadorEnrolled`

#### Delete Campaign
Action to delete a campaign

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

#### Create Custom Campaign
Action to create a new custom campaign on afleet portal

- Type: write · Key: `createCampaign`
- Requires: title, campaignLink, completionStyle, startDate, endDate, rewardPoints, programId
- Optional: summary, guidelines
- SDK: `runAction({ app: "afleet", actionType: "write", action: "createCampaign" })`
- CLI: `npx zapier-sdk run-action afleet write createCampaign`

#### Create UGC Campaign
Action to create a UGC campaign on afleet portal

- Type: write · Key: `createUGCCampaign`
- Requires: title, campaignPlatform, completionStyle, startDate, endDate, rewardPoints, programId
- Optional: summary, guidelines
- SDK: `runAction({ app: "afleet", actionType: "write", action: "createUGCCampaign" })`
- CLI: `npx zapier-sdk run-action afleet write createUGCCampaign`

#### Delete Reward
Action to delete the reward

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

#### Distribute Reward
Action to distribute the reward

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

#### Create Reward
Reward will be automatically gets created

- Type: write · Key: `rewardCreation`
- Requires: title, description, points, program_id, expiry_date
- SDK: `runAction({ app: "afleet", actionType: "write", action: "rewardCreation" })`
- CLI: `npx zapier-sdk run-action afleet write rewardCreation`

## Popular integrations
- [Afleet + Google Sheets](zapier.com/apps/afleet/integrations/google-sheets.md)

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