Print

Import Constant Contact Data to Google Sheets

In this guide, we’ll walk through how to pull data from the Constant Contact API directly into Google Sheets, using the API Connector add-on for Google Sheets.

Constant Contact's newest v3 API only supports OAuth, so we'll set up this connection with a custom OAuth connector.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get Your Constant Contact OAuth Credentials

  1. Navigate to https://v3.developer.constantcontact.com/ and click My Applications.
  2. Click Log in and log in with your regular Constant Contact user name and password.
  3. Click New Application.
    constantcontact3-newapplication
  4. You'll be prompted to give your application a name (can be anything), select OAuth flow (select "Authorization Code Flow and Implicit Flow"), choose a refresh token type (can be either), and click Create.
    constantcontact3-create
  5. You should now see your new app. Click Edit
    constantcontact3-edit
  6. We'll do 2 things on the Edit page: Click Generate Client Secret, and enter API Connector's redirect URL (provided here).
    constantcontact3-appdetails
  7. The Client Secret will only be shown once, so copy it down and keep it safe. We'll also need the Client Id (they call it the API key). Keep both handy as we'll need them shortly.
  8. Click Save before you go! Your app configuration won't be saved automatically.
    constantcontact3-save

Part 2: Connect the Constant Contact API to API Connector

  1. Open up Google Sheets and click Extensions > API Connector > Manage Connections
  2. Scroll to the bottom of the sidebar and click Add Custom OAuth
  3. Fill in the Custom OAuth modal as follows:
    • OAuth Grant TypeAuthorization Code
    • NameCustom CC
    • Authorization Base URLhttps://authz.constantcontact.com/oauth2/default/v1/authorize?scope=account_read account_update contact_data offline_access campaign_data
    • Token URLhttps://authz.constantcontact.com/oauth2/default/v1/token
    • Client IDprovided by Constant Contact
    • Client Secretprovided by Constant Contact
  4. Click Save
    constantcontact3-customoauth
  5. Click Manage Connections to return to the list of connections
  6. Scroll down until you find your new custom connection. Click Connect
    constantcontact3-customconnect
  7. You'll be prompted to give access to the new app you created above. Click Allow Access
    constantcontact3-allowaccess
  8. You'll be returned to your sheet and can verify that the new connection is now active.

Part 3: Pull Constant Contact API Data into Sheets

You can fetch any of the data points shown in the API documentation. For this example, we'll pull in the contents of a contact list. For this we'll need your list ID, which you can get by checking the URL while logged into Constant Contact (or through an API request to the contact_list endpoint).
constantcontact3-listId

Once you have your list ID, configure your API request like this:

  1. Open up Google Sheets and click Extensions > API Connector > Open > Create request.
  2. In the request form enter the following:
    • ApplicationCustom
    • MethodGET
    • Request URLhttps://api.cc.email/v3/contacts?lists=your_list_id
    • OAuthCustom CC
  3. Create a new tab and click Set current to use that tab as your data destination.
  4. Name your request and click Run. A moment later you’ll see Constant Contact data populate your sheet.
    constantcontact3-response

Part 4: API Documentation

v2 Official API documentation: https://v2.developer.constantcontact.com/docs/developer-guides/api-documentation-index.html

v3 Official API documentation: https://developer.constantcontact.com/api_guide/v3_technical_overview.html

2 thoughts on “Import Constant Contact Data to Google Sheets”

  1. I'm a total novice when it comes to accessing APIs. I have successfully connected ConstantContact API to a Google Sheet per the above instructions and can pull direct data successfully. However, how can I loop through API calls that require a parameter (ie contactid or campaignid)?

    Reply

Leave a Comment

Jump To