How to import data from Printful into Google Sheets

Printful is an on-demand printing and fulfillment company. We can use the Printful API to import data from Printful into Google Sheets. In this tutorial, we’ll show you how to connect the Printful REST API to Google Sheets in 5 steps:

  1. Install the Apipheny add-on
  2. Generate an access token
  3. Choose a Printful endpoint
  4. Enter your Printful API request into Apipheny
  5. Run the Printful API request

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

Apipheny is an API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to unlimited API data sources, make unlimited API requests, and more. There is a 30 day free trial included.

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

2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.

In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.

open apipheny

Tip: you can open a new Google Sheet by entering this URL in your browser: sheet.new

Step 2.) Generate an access token

After logging into your Printful Developers account (https://developers.printful.com/), in the Private Token section, click the Create a Token button:

Get started section
Get started section

Complete all the fields required in the Add new token section:

Add new token section
Add new token section
Add new token section
Add new token section

Click the Create new token button to generate the access token:

Create new token section
Create new token section

Your token is now created:

Tokens section
Tokens section

Copy your token to a safe location, because you’ll need it later.

Step 3.) Choose a Printful endpoint

In this section, we’ll show you how to browse the Printful API documentation to find the endpoint that retrieves the data that you need from Prinful. 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 Printful API documentation page: https://developers.printful.com/docs/

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

Printful API documentation page
Printful API documentation page

If we click the Catalog API category, a list of its endpoints will be displayed:

Catalog API section
Catalog API section

An example endpoint is Get Products, which returns list of Products available in the Printful account:

https://api.printful.com/products

The endpoint’s documentation contains a short description of the endpoint’s purpose, its HTTP method (GET), the URI, the query parameters, the cURL command and example responses:

Get Products endpoint
Get Products endpoint

All API calls to the Printful API should be made to this base URL: https://api.printful.com/

Step 4.) Enter your Printful API request into Apipheny

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, POST, PUT, etc) required by your API endpoint. For this example, we are using the GET method.

API URL: In Step 4, we explained how you can find the Printful REST API endpoint that you need. Now copy and paste your complete Printful API URL into the Apipheny add-on, where it says API URL Path, followed by any parameters required for your query (if applicable).

For this example, we are using the Get a list of countries for tax calculation endpoint, which retrieves a list of states that require sales tax calculation. This is what the whole URL looks like:

https://api.printful.com/tax/countries

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

Header Key:
Authorization

Header Value:
Bearer your_token

In the Header value, make sure to replace your_token with the API key you obtained previously, in Step 3. There should be a literal space between Bearer and your_token.

Printful API request entered into Apipheny
Printful API request entered into Apipheny

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

Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the Printful API data to be imported into your Google Sheet. Here’s what our request looked like when completed:

Printful data imported into Google Sheets
Printful data imported into Google Sheets

After successfully calling the Printful API, try calling a different endpoint, or try one of Apipheny’s other features to enhance your API calls.



Crypto API tutorials and more:


API Tutorials



API Knowledge

What is an API?
What is an API URL?
What are parameters?
What is an endpoint?
What is an API key/token?
What is basic authentication?
What are headers?
What is a GET request?
What is a POST request?