Klaviyo is a popular all-in-one email marketing, SMS marketing, web, and push notifications platform.
To pull data from the Klaviyo API to Google Sheets easily and without writing any code, 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 (including the Klaviyo API), save API requests, schedule API requests, and more. Click here if you want to learn more about Apipheny.
1. Install Apipheny by clicking the Install button on this page.
2. After you’ve installed Apipheny, open a Google Sheet and then click on the Add-Ons option in the top menu. In the add-ons menu, you should see Apipheny.
Click Apipheny > Import API to open the Apipheny add-on in your Google Sheet:
First, log in to your Kalviyo account.
In the Dashboard section, click on your company name. Then, in the drop-down menu, click Account:
In the Account page, click the Settings menu, then click the API Keys option:
In the API Keys section, you will find your public API key and the private keys, if you have any.
To create a private API key, click the Create API Key button:
After your API key has been created, rename it by clicking the pencil button next to the No label text:
Complete the label field and then click the Save API Key button:
Your API Key should now be labeled:
Now the important part of the step: copy and paste your Klaviyo API key somewhere safe, because you’ll need it in the next steps.
If you already know your Klaviyo API URL, or you want to use the same example URL as us, just skip to Step 4.
First, open the Klaviyo API documentation page: https://www.klaviyo.com/docs
In the menu on the left, in the API References section, you’ll see a list of available APIs:
For example, if you click the Profiles API, you’ll see a page containing the API authentication method and endpoints for that specific API:
An example endpoint for the Profiles API is the Retrieving a Person’s Attributes endpoint, which retrieves all the data attributes for a person (based on their Klaviyo Person ID). The corresponding API URL for this endpoint is:
where <PERSON_ID> is the Klaviyo Person ID.
Each endpoint’s documentation contains a descriptive title, a paragraph describing the endpoint’s purpose, the list of arguments it takes and a description of the expected response.
On a separate panel on the right, you should see the HTTP method (GET) and the URL, followed by an example request and its response:
Okay, now we’re in the home stretch. Now we need to enter the Klaviyo API request into the Apipheny add-on.
To do this, 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:
API URL: In Step 3, I explained how you can find the Klaviyo API endpoint that you need. Now copy the complete API URL into the Apipheny add-on, where it says API URL Path (JSON / CSV), followed by any GET parameters required for your query.
For this example, we are using the Get Lists endpoint that displays a listing of all of the lists in an account. The corresponding URL for this endpoint is:
If you’re following the same example as us, just copy and paste the URL into the Apipheny add-on. But don’t forget to replace<your_api_key> with the same API key you previously obtained in Step 2. Do not include the carrots “<>”.
Headers are not required for this API request, so you can leave those fields blank in Apipheny.
Here’s what your API request will look like in Apipheny if you’re following the same example as us:
The last step to get data from Klaviyo into Google Sheets is to click the Run button at the bottom of the Apipheny add-on, and then wait for your Klaviyo API data to be imported into your Google Sheet:
After making a successful request to the Klaviyo API, try querying a different Klaviyo API endpoint, or try using one of the more advanced features in the Apipheny add-on, such as: