Zapier for AffiliateWP Installation and Usage

This pro add-on has support for both Zapier Actions and Triggers. You can notify Zapier when the desired AffiliateWP activity occurs on your site (such as a new referral being created), as well as create, update, or delete any number of affiliates, referrals, visits, creatives, and payouts!

  1. Installing the Zapier add-on
  2. How does the Zapier add-on work?
  3. Setup and Configuration
  4. Troubleshooting Zapier Connection Errors

1. Installing the Zapier add-on

Before we get started, be sure to install and activate AffiliateWP on your WordPress site.

Once you’ve got AffiliateWP installed and your license is verified, you’ll be able to quickly install and activate the Zapier add-on.

2. How does the Zapier add-on work?

This article explains the primary concepts and terms used regarding the Zapier for AffiliateWP pro add-on.

This article is divided into the following sections:

What is Zapier?

Zapier is the name of a business. Their website is On this site, they provide a service for which anyone can sign up. Zapier offers both free and paid plans.

The service Zapier provides enables the communication and sharing of data between two different, unconnected things.

Say you have one person that speaks French, and another person that only speaks Japanese. They’re sitting in a room, and need to communicate with one another. Now, imagine a third person walks into this same room; one that speaks both French and Japanese. This third person can receive information from the French speaker, translate it into Japanese, and tell it to the Japanese speaker (and vice versa). That way, information can flow between the French speaker and the Japanese speaker.

The way Zapier does this is through their own ecosystem of “apps”. Sort of like apps on a smartphone, but they only work on Just like how your bank, your gym, or your favorite coffee shop might have an app for your smartphone, many websites, services, and companies have an app on In fact, over 700 do.

Ultimately, Zapier either receives data from one of these apps, or sends data to one of these apps. When Zapier receives data from one of these apps, such as the AffiliateWP Zapier app, Zapier calls that a trigger.

When Zapier sends data to one of these apps, Zapier calls that an action. Triggers cause actions to happen.

What is a “trigger”?

Triggers are incoming data that Zapier receives from an outside source. You can then use that data to do things somewhere else. When Zapier receives data from one of the Zapier apps, such as your website on which AffiliateWP is installed, Zapier calls that a trigger.

What is an “action”?

Actions are things Zapier can do on your behalf, to a variety of external services and websites (such as a WordPress site with AffiliateWP!). When Zapier sends data to something (perhaps creating an affiliate on your site, or updating a referral), Zapier calls that an action.

How does Zapier connect with AffiliateWP?

Zapier connects with your AffiliateWP installation securely using the REST API introduced in AffiliateWP 2.0.

What information can Zapier receive?

Pretty much anything that happens in AffiliateWP can be used as a trigger in Zapier.

Zapier receives only the data you’ve enabled in the AffiliateWP Zapier pro add-on. For more information on how to enable or disable data that Zapier can receive, see the Triggers section of the AffiliateWP Zapier pro add-on set up and configuration guide.

What can I do with this add-on?

There are virtually infinite combinations of zaps that can be created. See the following for a few examples of what you can do. Most importantly, you can create zaps using any of Zapier’s listed apps – not just those we’ve used as examples!

3. Setup and Configuration

Zapier is a service which connects over 700 different apps to allow for useful integrations between them. You’ll need a couple of things to get started with this add-on:

  • A familiarity with how Zapier works, as well as a free Zapier account.
  • The Zapier for AffiliateWP pro add-on has two parts: the plugin you install on your site and a Zapier app we’ve made in the Zapier app marketplace. While the AffiliateWP Zapier app is in Beta, you’ll need to use our invite code to add the AffiliateWP Zapier app to your Zapier account. Click here to accept an invite for the AffiliateWP Zapier app.

Basic set up

After installing and activating the Zapier for AffiliateWP pro add-on, visit the AffiliateWP » Settings screen, and click on the Zapier tab. Enable the add-on by checking the Enable Zapier checkbox:

AffiliateWP enable Zapier

Triggers or Actions?

Triggers are incoming data that Zapier receives from an outside source. You can then use that data to do things somewhere else. When Zapier receives data from something, such as your website on which AffiliateWP is installed, Zapier calls that a trigger.

Actions are things Zapier can do on your behalf, to a variety of external services and websites (such as a WordPress site with AffiliateWP!). When Zapier sends data to something (perhaps creating an affiliate on your site, or updating a referral), Zapier calls that an action.

Read more about how the Zapier for AffiliateWP pro add-on works, what it can do, and more in our guide How does the Zapier for AffiliateWP add-on work?

Below, examples are provided for both triggers and actions.


Let’s start with a trigger to get things going. Follow the guide below to set up your first AffiliateWP Zapier trigger.

1. Select the checkboxes next to the triggers you’d like to enable for use within Zapier by navigating to AffiliateWP » Zapier . The options available are:

  • Affiliates
  • Referrals
  • Creatives
  • Visits
  • Payouts
AffiliateWP Zapier triggers

For each of the items above which you enable, you can create Zapier triggers for any of the following events:

  • Any item is created (such as “New Affiliate”)
  • Any item is updated (except Payouts, since they can’t be edited)
  • Any item is deleted

For example, if you enable Affiliate triggers, you’ll be able to trigger a Zapier event on any of the following conditions:

  • Whenever an affiliate account is created on the site, whether added by an administrator manually, or via an affiliate registration, Zapier is notified, which can then be used to trigger something else in Zapier.
  • Whenever an affiliate’s account information is updated in any way on the site*.
  • Whenever an affiliate is deleted on the site.

The same can be done for referrals, visits, creatives, and payouts! However, payouts cannot be edited, so the payout updated option is not available for payouts.

Connecting your WordPress site with your Zapier account

AffiliateWP will only authenticate with the API keys method defined in this setup guide below. Despite there being a Zapier App called WordPress on, which allows for various generic functionalities on a WordPress site, it does not authenticate with AffiliateWP, nor does it provide any functionality for AffiliateWP.

First, let’s get the rest of the set up completed, then we’ll create an example zap!

After creating your account on using the AffiliateWP Zapier app invite, go to the Create A Zap editor. Search for AffiliateWP, and add it as the first step.

Searching for AffiliateWP within Zapier

Now, select the desired AffiliateWP event (or action if you happen to be creating an action). There are numerous options, but authentication is the same for both triggers and actions.

Available events are:

  • New Affiliate
  • Affiliate Deleted
  • Affiliate Updated
  • New Referral
  • Referral Deleted
  • Referral Updated
  • New Visit
  • Visit Deleted
  • Visit Updated
  • New Creative
  • Creative Deleted
  • Creative Updated
  • New Payout
  • Payout Deleted
Select AffiliateWP event

Once you’ve selected the desired event, click Continue at the bottom of the screen. 

Connecting Zapier to AffiliateWP

Click Connect A New Account, and a pop-up window from Zapier will open.

Zapier connect account

To get the information Zapier is requesting, we’ll need to head back to your site where AffiliateWP and the Zapier add-on are installed. Keep this Zapier window open – we’ll get back to it in just a moment.

On your site, navigate to AffiliateWP » Tools, and click on the API Keys tab.

In the input field at the top, enter the username of an admin user on your site you’d like to use for authenticating with Zapier. Once the correct username pops up, click the Generate New API Keys button.

You’ll receive something that looks like this, but the values in each key will be unique.

AffiliateWP API Keys

Copy the public key and head back to that Zapier pop-up window. Paste it in the field labeled Public Key.

Now do the same for the Token field.

Lastly, add your site url. If you’re not sure of the site url, this can be found on the main WordPress settings page, Settings » Site Address.

Once everything is filled out, click on the Yes, Continue button at the bottom of the pop-up window.

You should now see your site selected, similar to the screenshot below.

Zapier choose AffiliateWP site

Click Continue. Now, let’s test to make sure things are working before we create the zap. 

Click the Test Trigger button.

Zapier test trigger

Now we’ll create the action, where we can choose what to do when Zapier receives AffiliateWP data from your site. Because of the virtually infinite combinations in which you can integrate apps on Zapier, you’ll possibly see things that look a little different from what you’re seeing within this guide. However, the same principle applies for all Zapier triggers: you’d now like to do something with the information AffiliateWP is providing to your Zapier account.

When successful, you’ll receive a message that an affiliate account was located with information on the affiliate account.

Zapier new affiliate found

In this case, the action is to create a Google Doc. In this example, a new Google Doc will be created when a new Affiliate is added to the site.

Zapier add Google Doc

Next you will make sure that your Google account is connected and then click Continue.

Zapier connect Google account

The AffiliateWP fields are available within a drop-down menu of trigger fields. Below is an example of how to create a new Google Doc that includes the Affiliate email, First, and Last name.

Zapier add affiliate data to test action

You’ll have the option to test this step as well.

Zapier test action

Once the step has completed (or if you prefer to skip the test), you’re given the option to name the zap, and turn it on. This zap will now trigger on any valid AffiliateWP event.

All finished!


Zapier actions allow things in AffiliateWP to be created, updated, or deleted on your site; they’re the opposite of triggers. You can learn more about Zapier actions and how they work within the AffiliateWP Zapier add-on by reading our guide How does the AffiliateWP Zapier add-on work?.

For actions to work, you’ll need to install one more add-on on your site, AffiliateWP REST API Extended. For each action, make sure to enable the corresponding endpoint in the REST API tab, located in the AffiliateWP » Settings screen.

For example, if you’d like to be able to create affiliates, enable the Create endpoint under Affiliate Endpoints:

Affiliate endpoints

Actions, Example One: Creating an Affiliate

Now, let’s create an action in Zapier. For this example, you’ll need a free Google Drive account. We’ll be using Google Sheets to create a spreadsheet. When data is added to that spreadsheet, Zapier will pick it up, and create an affiliate on your site using that data.

Create a spreadsheet containing affiliate data you’d like to be entered into AffiliateWP. For this example, you can copy the one we’re using here at this link, or use it as a starter template to create your own.

Make sure to specify, at a minimum, the affiliate payment email, which is required to create an affiliate. The username of the WordPress user can be provided, with the username field. If no username field is provided, the username will be generated using the payment email.

Here’s what our example spreadsheet looks like:

A screenshot of example spreadsheet containing affiliate data to be consumed by a Zapier action, then sent to AffiliateWP.

Now that we’ve got that spreadsheet loaded up, let’s go to Zapier and log in, and create a Zap.

This time, the first step, the trigger, will be Google Sheets. Start typing it in the trigger input area:

Selecting Google Sheets as the trigger in Zapier.

Select New Spreadsheet, click Continue.

Zapier new spreadsheet row

Connect your Google account, and click Continue again.

Zapier Google Sheets account selection

Now let’s tell Zapier which spreadsheet to use and then click Continue.

Zapier spreadsheet/worksheet selection

6. Just like the AffiliateWP trigger we set up in the Triggers section of this guide, Zapier will ask if you’d like to perform a test.

Zapier spreadsheet test trigger

Perform the test and when successful, Zapier will show you that a spreadsheet row was found.

Zapier spreadsheet row found when testing

Click Continue and then we’ll add the action.

Just like Zapier triggers, there are many options here. For this example, we’re going to use Create Affiliate, because we want to create an affiliate on your site any time a spreadsheet row is created in the previously-selected Google Sheets spreadsheet.

Zapier spreadsheet create affiliate

Available actions are:

  • Create Payout – Creates a payout in AffiliateWP.
  • Update Visit – Updates a visit in AffiliateWP.
  • Create Visit – Creates a visit in AffiliateWP.
  • Create Affiliate – Creates an affiliate in AffiliateWP. This also creates the required WordPress user account. Payment email is required.
  • Delete Creative – Deletes the specified creative in AffiliateWP.
  • Create Referral From User ID – Creates a referral in AffiliateWP.
  • Create Referral From Username – Creates a referral in AffiliateWP.
  • Create Affiliate From User ID – Creates an affiliate from an existing WordPress User ID. An existing WordPress User ID must be specified.
  • Delete Visit – Deletes the specified visit in AffiliateWP.
  • Create Referral From Affiliate ID – Creates a referral in AffiliateWP.
  • Create Creative – Creates a creative in AffiliateWP.
  • Update Referral – Updates a referral with the specified data.
  • Update Affiliate – Updates an affiliate account with the specified data.
  • Delete Referral – Deletes a referral.
  • Update Payout – Updates a payout with the specified data.
  • Delete Payout – Deletes a payout.
  • Delete Affiliate – Deletes an affiliate.
  • Update Creative – Updates a creative in AffiliateWP.

Select the Create Affiliate trigger, click Continue, and connect your AffiliateWP account using the same method noted above.

Now we’ll need to map fields from the Google spreadsheet to the matching AffiliateWP fields. Select each field you’d like to be sent to AffiliateWP, to be used when creating an affiliate.

Zapier map fields to spreadsheet

Here, you can specify the username, if you like. If not, the payment email will be used to generate the username. Please note that the payment email field is required:

Now Zapier will again ask if you’d like to test this step.

Zapier create affiliate from spreadsheet test

Test things out, if you like, then the zap is ready to Publish.

Screenshot of a Zapier zap being Published

After clicking Publish Zap, you will see a confirmation stating that your Zap is “on”.

Zapier Zap being turned on

That’s it!

Actions, Example Two: Updating an Affiliate when a Subscriber is Updated in MailChimp

If you’ve followed the first actions example above, now affiliates can be created from any Zapier trigger. That’s great, but what if data for an affiliate changes? How will AffiliateWP have accurate information? By using another zap to update the affiliate, that’s what we review below.

In this example, we’ll create a MailChimp trigger, and then use a different AffiliateWP action the Update Affiliate action.

Create an account (or log in to an existing account) at

Select MailChimp as the trigger source, and select Updated Subscriber as the trigger:

Zapier Mailchimp selecting Updated Subscriber as Trigger

Click Continue, then connect your Zapier account to your MailChimp account:

Connecting your Mailchimp account to your Zapier account, step 2.

Click Continue, then select your desired list/audience:

Selecting a Mailchimp list within Zapier.


An important note about custom fields

Before going further, let’s take a moment to explore what information is required by AffiliateWP for the Update Affiliate action, what fields are available in your MailChimp list already, and discover how to add some new custom fields within MailChimp.

By default, any subscribers imported into MailChimp will only have fields which are already defined in MailChimp imported. These are usually first name, last name, and email address.

AffiliateWP requires either the Affiliate ID or the associated WordPress user ID in order to update an affiliate. Make sure to define this field in MailChimp.

If, for example, you wished to import the affiliate rate, or status, or other information into MailChimp, you’ll get a notice indicating that the fields must be skipped, since there’s no MailChimp field in which to place it:

Importing a list with unmapped fields in Mailchimp. Context: AffiliateWP Zapier trigger and action creation.

However, you can create as many custom fields as you like, by going to Settings » Audience fields and *MERGE* tags in the selected lists menu:

At a minimum, create the Affiliate ID field (or a field to provide the associated WordPress user ID of the affiliate):

Ensuring that the Affiliate ID is provided in Mailchimp.

With the exception of the Affiliate ID (or associated WordPress user ID), which is a required field for the Update Affiliate action (noted above), you don’t need to create any additional custom fields in MailChimp in order to use it with AffiliateWP, but it sure makes it a lost more powerful.

We use this very zap here at AffiliateWP every day, which helps us keep affiliate information updated in multiple places, automatically. Here’s an example of fields you may choose to include – which are all listed when creating a zap in Zapier:

When importing subscribers, the newly-created fields will now be available to map. You can also create new field columns here as well, if you like:

Custom field usage in Mailchimp.

Once you have the list how you’d like it, if it’s a new list, you’ll need to import subscribers.

Import a single subscriber:

Importing a single subscriber in Mailchimp while creating a zap for use with AffiliateWP Zapier.

Import multiple subscribers:

You’ll get something like the screenshot below once you’re done. Click Finish when you’re ready to import the list.

Column data matched in Mailchimp.

Now let’s connect the MailChimp data to AffiliateWP. Zapier will again ask if you’d like to test your step before continuing.

Notice that for any custom MailChimp fields you’ve created, they’ll be prepended with merges__, which is followed by your custom field name:

Testing a Mailchimp trigger in Zapier.

Make sure that the Affiliate ID (or associated WordPress user ID for the affiliate) is being seen by Zapier:

Affiliate ID showing correctly in Zapier.

Click Continue, then select AffiliateWP as the Action App:

Selecting AffiliateWP as the action in a zap creation step.

Choose Update Affiliate as the action, and connect your AffiliateWP account as noted above.

Map the Affiliate ID field you set up in MailChimp to the corresponding AffiliateWP required field, and click Continue.

Zapier will ask if you’d like to test this step as well. Test if you like, then create the zap! Like the other examples, this can be triggered either every five minutes, or every fifteen minutes, depending on your account plan.

That’s it!

4. Troubleshooting Zapier Connection Errors

If you’re receiving an error like this when attempting to connect your site to Zapier, see below for tips on how to solve:

Zapier error adding new account

First, check that the Zapier for AffiliateWP add-on is installed and activated. You will receive this error if, for example, the plugin is installed but not activated.  The name of the plugin will show as AffiliateWP – Zapier – Automated Tasks.

Next, verify that your Public Key and Token values were entered correctly. These can be found in AffiliateWP » Tools, and click on the API Keys tab.

Also check that your Site URL was entered correctly. If not, you might see error messages such as these:

Zapier error URL not found
Zapier authentication error

You may run into the following error which means you need to install and activate the REST API Extended pro add-on:

Zapier error sending test

Other Tips to Investigate

  • An IP is being blocked possibly by a conflict from another plugin.
  • Your host is blocking the IP Zapier is wanting to use.
  • Or, your host might be disabling remote authentication.  To find out, can you ask your host if remote HTTP authentication is disabled in any way on your site, such as $_SERVER['PHP_AUTH']?
  • Zapier has a troubleshooting document that can assist from their side of things:
RewriteCond %{HTTP:Authorization} ^(.) 
RewriteRule ^(.) - [E=HTTP_AUTHORIZATION:%1] 

If you are not able to resolve the error after trying the above steps, please get in touch with our support team for additional help!