How to connect the ActiveCampaign API to Google Sheets

ActiveCampaign gives you the email marketing, marketing automation, and CRM tools you need to create incredible customer experiences. We can use the ActiveCampaign API to import data from ActiveCampaign into Google Sheets. In this tutorial, we’ll show you how to connect the ActiveCampaign REST API to Google Sheets in 5 steps:

  1. Install the Apipheny add-on
  2. Obtain an API key
  3. Choose a ActiveCampaign API endpoint
  4. Enter the ActiveCampaign API request into the Apipheny add-on
  5. Run the ActiveCampaign API request in your Google Sheet

Step 1.) Install and open the Apipheny add-on in Google Sheets

To pull data from the ActiveCampaign API to Google Sheets, first install and open the Apipheny Google Sheets add-on.

Apipheny is a no-code API integrator for Google Sheets that you can use to make unlimited API requests, connect to unlimited APIs, save API requests, schedule API requests, and more. 

1. Install Apipheny by opening the following link on desktop and then clicking the Install button on the page: https://apipheny.io/install

2. After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions option in the top menu. In this menu, you should see Apipheny.

Click Apipheny > Import API to open the Apipheny sidebar in your Google Sheets.

open apipheny

Step 2.) Obtain an API key

After logging into your ActiveCampaign account, go to Settings, then click Developer and you’ll find your URL and API Key:

API Access section
API Access section

Copy the value of your URL and API key in a safe location because you’ll need them later.

Step 3.) Choose an ActiveCampaign API endpoint

In this section, we’ll show you how to browse the ActiveCampaign API documentation to find an API endpoint that retrieves the specific information you need from your account. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 4.

First, open the ActiveCampaign API documentation page: https://developers.activecampaign.com/reference#overview

The menu on the left contains general information about the ActiveCampaign API and a list of grouped endpoints:

ActiveCampaign API documentation page
ActiveCampaign API documentation page

For example, if we click the Accounts group, its endpoints will be displayed: Create an account, Update an account, Retrieve an account, Delete an account, List all accounts, Create an account note, Update an account note and Bulk delete accounts.

Accounts group documentation
Accounts group documentation

In this case, we will describe the List all accounts endpoint, which lists all accounts. The URL for this endpoint is:

https://youraccountname.api-us1.com/api/3/accounts

If you use this URL, don’t forget to replace youraccountname with a real account name.

The documentation for this endpoint contains its HTTP method and URL path, the cURL command, the expected response body and a list of accepted query parameters:

The List all accounts endpoint
The List all accounts endpoint

Step 4.) Enter the ActiveCampaign API request into the Apipheny add-on

Okay, we’re in the home stretch. Now go back to your Google Sheet and make sure that the Apipheny add-on is open on the Import tab. With the Import tab open, enter these details into the add-on:

Method: At the top of the Apipheny sidebar, select the HTTP method (GET or POST) as required by your ActiveCampaign API endpoint. For this example, we are using the GET method.

API URL: In Step 3, I explained how you can find the ActiveCampaign API endpoint that you need. Now copy the complete API URL into the Apipheny add-on, where it says API URL Path, followed by any GET parameters required for your query.

For this example, we are using the List all addresses endpoint, that lists all addresses. The corresponding URL for this endpoint is:

https://your-account.api-us1.com/api/3/addresses

If you use this URL, don’t forget to replace your-account with your account name.

In the Headers section of the Apipheny add-on, add one row with the following key and value:

Header
Key:
Api-Token
Value:
YOUR_TOKEN

When entering the header value, don’t forget to replace YOUR_TOKEN with the key you previously obtained in Step 2.

ActiveCampaign API request entered into Apipheny
ActiveCampaign API request entered into Apipheny

Step 5.) Run the ActiveCampaign API request in your Google Sheet

The last step is to click the Run button at the bottom of the Apipheny add-on and then your ActiveCampaign data will be imported into your Google Sheet:

ActiveCampaign data imported into Google Sheets
ActiveCampaign data imported into Google Sheets

After making a successful request to the ActiveCampaign API, try querying a different ActiveCampaign API endpoint, or try using one of the more advanced features in the Apipheny add-on.


API Tutorials



Related Posts