Search API Connector Documentation
Import ActiveCampaign Data to Google Sheets
In this guide, we’ll walk through how to pull data from the ActiveCampaign API directly into Google Sheets, using the API Connector add-on for Sheets.
We’ll first get an API key from ActiveCampaign, and then set up a request to pull in email campaign data from ActiveCampaign to your spreadsheet.
- Before You Begin
- Part 1: Get ActiveCampaign API Key
- Part 2: Create your API Request URL
- Part 3: Pull ActiveCampaign API Data into Sheets
- Part 4: Handle Pagination
- Part 5: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Get Your ActiveCampaign API Key
- Log in to ActiveCampaign and click Settings in the left side navigation menu.
- The Account Settings menu will appear. Click Developer.
- You should now see a page containing your API URL and Key. Keep the key handy as you’ll need it in a moment. Congrats! You’re now ready to use the ActiveCampaign API.
Part 2: Create Your API Request URL
We’ll first set up a pull to view your contact list.
- Base URL: https://YOUR_DOMAIN.api-us1.com/api/3/
- Endpoint: /contacts
Putting it all together, we get the full API Request URL:
Part 3: Pull ActiveCampaign API Data into Sheets
We can now enter that URL into API Connector.
- Open up Google Sheets and click Extensions > API Connector > Open.
- In the Create Request tab, enter the Request URL we just created
- We don’t need extra authentication so just leave OAuth as None.
- Under Headers, enter a key-value pair like this:
Replace YOUR_API_KEY with the API key provided above in the first part.
- Create a new tab and click Set current to use that tab as your data destination.
- Name your request and click Run. A moment later you’ll see ActiveCampaign data populate the AC_contacts tab in your Google Sheet:
- If your contacts utilize custom fields, these custom field values can be retrieved using the
/fieldValuesendpoint. As the fieldValues endpoint will only produce their ID, you can also use the
/fieldsendpoint to get their name. Once you have all the values in Sheets, you can merge them together as desired using queries and other functions native to Sheets.
- Change the endpoints as described in the documentation to retrieve different data. For example, changing it from
/campaignswill produce a list of all your ActiveCampaign campaigns.
Part 4: Handle Pagination
- Note Active Campaign’s limits on the number of records returned on a response. By default, only 20 records will be returned unless you use the ‘limit’ and ‘offset’ parameters as described in their documentation.
- With API Connector you can either add those parameters manually or loop through them automatically with offset-limit pagination handling (paid feature), like this:
- API URL: enter your request URL as usual, including limit=100
- Pagination type:
- Offset parameter:
- Limit parameter:
- Limit value:
- Run until: choose when the request should stop running.
Part 5: API Documentation
Official API documentation: https://developers.activecampaign.com/reference