# ClickFunnels + Referly Integrations: Connect with Zapier MCP
> zapier.com/apps/clickfunnels/integrations/referly
> Surface: zapier.com | Root map: zapier.com/llms.txt#integrations

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

## 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**: connect each app through mcp.zapier.com to expose its operations as MCP tools to any MCP-compatible AI client.
- **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**: ask your MCP client to call the tool for this operation's `type · key` — for example, `write · affiliate`.
- **SDK**:

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

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

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

- **CLI**:

```bash
npx zapier-sdk run-action referly write affiliate \
  --inputs '{}'
```

## ClickFunnels

### Identity
ClickFunnels gives you everything you need to market, sell, and deliver your products online.

- App slug: clickfunnels
- Operations published here: 15 (9 events, 5 functions, 1 query)

### Authentication
Zapier connects to ClickFunnels 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 clickfunnels
```

### Capabilities

#### Events (9)

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

##### Scheduled Appointment Event Created
Triggers when a scheduled appointment event is created.

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

##### Contact Enrollment Completed Course
Triggers when a contact's enrollment completes a course.

- Type: read · Key: `contact_completed_course`
- Requires: course_id
- Optional: alert
- SDK: `runAction({ app: "clickfunnels", actionType: "read", action: "contact_completed_course" })`
- CLI: `npx zapier-sdk run-action clickfunnels read contact_completed_course`

##### Course Enrollment Created for Contact
Triggers when a Contact is Enrolled in a Course.

- Type: read · Key: `contact_enrolled_in_course`
- Requires: course_id
- Optional: alert
- SDK: `runAction({ app: "clickfunnels", actionType: "read", action: "contact_enrolled_in_course" })`
- CLI: `npx zapier-sdk run-action clickfunnels read contact_enrolled_in_course`

##### Contact Identified
Triggers when a new Contact is identified by email address or phone number.

- Type: read · Key: `contact_identified`
- Requires: nothing
- Optional: funnel_ids, page_ids
- SDK: `runAction({ app: "clickfunnels", actionType: "read", action: "contact_identified" })`
- CLI: `npx zapier-sdk run-action clickfunnels read contact_identified`

##### Contact Submitted Form
Triggers each time a contact submits a form. This can be a simple opt-in form or an order form.

- Type: read · Key: `contact_submitted_form`
- Requires: nothing
- Optional: funnel_ids, page_ids
- SDK: `runAction({ app: "clickfunnels", actionType: "read", action: "contact_submitted_form" })`
- CLI: `npx zapier-sdk run-action clickfunnels read contact_submitted_form`

##### Contact Enrollment Suspended From Course
Triggers when a contact is suspended from a course.

- Type: read · Key: `contact_suspended_from_course`
- Requires: course_id
- Optional: alert
- SDK: `runAction({ app: "clickfunnels", actionType: "read", action: "contact_suspended_from_course" })`
- CLI: `npx zapier-sdk run-action clickfunnels read contact_suspended_from_course`

##### One-Time Order Paid
Triggers when a customer pays a one-time order.

- Type: read · Key: `one_time_order_paid`
- Requires: nothing
- Optional: funnel_ids, page_ids
- SDK: `runAction({ app: "clickfunnels", actionType: "read", action: "one_time_order_paid" })`
- CLI: `npx zapier-sdk run-action clickfunnels read one_time_order_paid`

##### Opportunity Moved Stages
Triggers when an Opportunity moves from one stage to another.

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

##### Subscription Invoice Paid
Triggers when a Subscription Invoice is paid.

- Type: read · Key: `subscription_invoice_paid`
- Requires: nothing
- Optional: funnel_ids, page_ids
- SDK: `runAction({ app: "clickfunnels", actionType: "read", action: "subscription_invoice_paid" })`
- CLI: `npx zapier-sdk run-action clickfunnels read subscription_invoice_paid`

#### Functions (5)

Functions change something in ClickFunnels.

##### Apply Tag to Contact
Applies a tag to a contact if it does not exist

- Type: write · Key: `apply_tag_to_contact`
- Requires: nothing
- Optional: email_address, contact_id, tag_id, tag_name
- SDK: `runAction({ app: "clickfunnels", actionType: "write", action: "apply_tag_to_contact" })`
- CLI: `npx zapier-sdk run-action clickfunnels write apply_tag_to_contact`

##### Create Opportunity
Creates a new opportunity for a contact

- Type: write · Key: `create_opportunity`
- Requires: pipeline_id, stage_id, email_address, name
- Optional: value, close_date
- SDK: `runAction({ app: "clickfunnels", actionType: "write", action: "create_opportunity" })`
- CLI: `npx zapier-sdk run-action clickfunnels write create_opportunity`

##### Enroll a Contact Into a Course
Creates an Enrollment for a Contact for particular a Course

- Type: write · Key: `enroll_contact_in_course`
- Requires: course_id
- Optional: email_address, contact_id
- SDK: `runAction({ app: "clickfunnels", actionType: "write", action: "enroll_contact_in_course" })`
- CLI: `npx zapier-sdk run-action clickfunnels write enroll_contact_in_course`

##### Remove Tag From Contact
Removes a specific tag from a contact if it exists on the contact.

- Type: write · Key: `remove_tag_from_contact`
- Requires: tag_id
- Optional: email_address, contact_id
- SDK: `runAction({ app: "clickfunnels", actionType: "write", action: "remove_tag_from_contact" })`
- CLI: `npx zapier-sdk run-action clickfunnels write remove_tag_from_contact`

##### Update or Create Contact (By Email Address)
Updates an existing Contact or Creates one by email address.
      For existing Contacts, it only updates present fields that have non-empty values so you won't
      empty existing data. If a contact with the provided email address doesn't exist, a new one
      will be created.

- Type: write · Key: `update_or_create_contact_by_email`
- Requires: email_address
- Optional: first_name, last_name, phone_number, time_zone, fb_url, instagram_url, twitter_url, linkedin_url, website_url, custom_attributes
- SDK: `runAction({ app: "clickfunnels", actionType: "write", action: "update_or_create_contact_by_email" })`
- CLI: `npx zapier-sdk run-action clickfunnels write update_or_create_contact_by_email`

#### Queries (1)

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

##### Search Contacts by Email or ID
Search for contacts using the Contact's ID or email address without creating a new contact if it doesn't exist yet.

- Type: search · Key: `search_contact_by_email_or_id`
- Requires: nothing
- Optional: search_type, search_value
- SDK: `runAction({ app: "clickfunnels", actionType: "search", action: "search_contact_by_email_or_id" })`
- CLI: `npx zapier-sdk run-action clickfunnels search search_contact_by_email_or_id`

## Referly

### Identity
Referly is a referral software that helps you create a referral program for your business in minutes.

- App slug: referly
- Operations published here: 21 (9 events, 9 functions, 3 queries)

### Authentication
Zapier connects to Referly 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 referly
```

### Capabilities

#### Events (9)

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

##### New Affiliate Created
Triggers when a new affiliate joins your affiliate program.

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

##### Affiliate Deleted
Triggers when an affiliate is deleted from your affiliate program.

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

##### Affiliate Updated
Triggers when an affiliate is updated in your affiliate program.

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

##### New Referral Created
Triggers when a new referral (customer) is created in your affiliate program.

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

##### Referral Deleted
Triggers when a referral (customer) is deleted from your affiliate program.

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

##### Referral Updated
Triggers when a referral (customer) is updated in your affiliate program.

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

##### New Sale Created
Triggers when a new sale is created in your affiliate program.

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

##### Sale Deleted
Triggers when a sale is deleted from your affiliate program.

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

##### Sale Updated
Triggers when a sale is updated in your affiliate program.

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

#### Functions (9)

Functions change something in Referly.

##### Create Affiliate
Creates a new affiliate in your affiliate program.

- Type: write · Key: `affiliate`
- Requires: firstName, lastName, email
- Optional: commissionRate, affiliateLink, affiliateStatus
- SDK: `runAction({ app: "referly", actionType: "write", action: "affiliate" })`
- CLI: `npx zapier-sdk run-action referly write affiliate`

##### Delete Affiliate
Deletes an affiliate from your affiliate program. This action is irreversible.

- Type: write · Key: `affiliateDelete`
- Requires: affiliateIdentifier, confirmDelete
- SDK: `runAction({ app: "referly", actionType: "write", action: "affiliateDelete" })`
- CLI: `npx zapier-sdk run-action referly write affiliateDelete`

##### Update Affiliate
Updates an existing affiliate in your affiliate program.

- Type: write · Key: `affiliateUpdate`
- Requires: affiliateIdentifier
- Optional: firstName, lastName, email, commissionRate, affiliateLink, affiliateStatus
- SDK: `runAction({ app: "referly", actionType: "write", action: "affiliateUpdate" })`
- CLI: `npx zapier-sdk run-action referly write affiliateUpdate`

##### Create Referral
Creates a new referral (customer) for an affiliate.

- Type: write · Key: `referral`
- Requires: name, email, referredUserExternalId
- Optional: affiliateId, affiliateEmail, plan, status
- SDK: `runAction({ app: "referly", actionType: "write", action: "referral" })`
- CLI: `npx zapier-sdk run-action referly write referral`

##### Delete Referral
Deletes a referral (customer). This action is irreversible.

- Type: write · Key: `referralDelete`
- Requires: referralId, confirmDelete
- SDK: `runAction({ app: "referly", actionType: "write", action: "referralDelete" })`
- CLI: `npx zapier-sdk run-action referly write referralDelete`

##### Update Referral
Updates an existing referral (customer).

- Type: write · Key: `referralUpdate`
- Requires: referralId
- Optional: name, email, referredUserExternalId, plan, status
- SDK: `runAction({ app: "referly", actionType: "write", action: "referralUpdate" })`
- CLI: `npx zapier-sdk run-action referly write referralUpdate`

##### Create Sale
Creates a new sale for a referral and automatically calculates commission.

- Type: write · Key: `sale`
- Requires: totalEarned, name, email
- Optional: referralId, externalInvoiceId, commissionRate
- SDK: `runAction({ app: "referly", actionType: "write", action: "sale" })`
- CLI: `npx zapier-sdk run-action referly write sale`

##### Delete Sale
Deletes a sale. This action is irreversible.

- Type: write · Key: `saleDelete`
- Requires: saleId, confirmDelete
- SDK: `runAction({ app: "referly", actionType: "write", action: "saleDelete" })`
- CLI: `npx zapier-sdk run-action referly write saleDelete`

##### Update Sale
Updates an existing sale and recalculates commission if needed.

- Type: write · Key: `saleUpdate`
- Requires: saleId
- Optional: name, email, totalEarned, externalInvoiceId, externalId, commissionRate, commissionEarned
- SDK: `runAction({ app: "referly", actionType: "write", action: "saleUpdate" })`
- CLI: `npx zapier-sdk run-action referly write saleUpdate`

#### Queries (3)

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

##### Find Affiliate
Finds an affiliate by ID, email, or affiliate link.

- Type: search · Key: `affiliateSearch`
- Requires: nothing
- Optional: id, email
- SDK: `runAction({ app: "referly", actionType: "search", action: "affiliateSearch" })`
- CLI: `npx zapier-sdk run-action referly search affiliateSearch`

##### Find Referral
Finds a referral by ID, affiliate email, affiliate ID, or external ID.

- Type: search · Key: `referralSearch`
- Requires: nothing
- Optional: id, affiliateEmail, affiliateId, externalId
- SDK: `runAction({ app: "referly", actionType: "search", action: "referralSearch" })`
- CLI: `npx zapier-sdk run-action referly search referralSearch`

##### Find Sale
Finds a sale by ID, affiliate email, affiliate ID, referral ID, or external sale ID.

- Type: search · Key: `saleSearch`
- Requires: nothing
- Optional: id, affiliateEmail, affiliateId, referralId, saleExternalId
- SDK: `runAction({ app: "referly", actionType: "search", action: "saleSearch" })`
- CLI: `npx zapier-sdk run-action referly search saleSearch`

## Links
- ClickFunnels integrations: zapier.com/apps/clickfunnels/integrations.md
- Referly integrations: zapier.com/apps/referly/integrations.md
- Full page: zapier.com/apps/clickfunnels/integrations/referly
- SDK: npmjs.com/package/@zapier/zapier-sdk