In this tutorial, you’ll learn how to connect the Harvest REST API to Google Sheets in 5 steps:

  1. Install the Apipheny Add-on
  2. Get a Harvest Access Token and Account ID
  3. Choose a Harvest API Endpoint
  4. Enter the Harvest API request into Apipheny
  5. Run the Harvest API request in Google Sheets

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

Harvest is a popular time tracking, invoicing, and reporting software for employee timesheets and billing.

To pull data from the Harvest API into 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 Harvest 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.

Install Apipheny
Install Apipheny

2. After you’ve installed Apipheny, open a Google Sheet and then click on Add-Ons in the menu at the top. When you click “Add-ons”, you should see Apipheny in the menu.

Just click Apipheny > Import API to open the Apipheny sidebar in your Google Sheets:

Open Apipheny
Open Apipheny

Step 2.) Get your Harvest Access Token and Account ID

1. After logging in to your Harvest account, go to the developers page here:

Next, click the Create New Personal Access Token button:

Create new Harvest personal access token
Create new Harvest personal access token

2.  Choose a name for your Harvest API token and click the Create Personal Access Token button:

Enter a name then click "Create Personal Access Token"
Enter a name then click “Create Personal Access Token”

3. Now, your token has been created and displayed. Copy and paste your token and your Account ID to a safe location because you will need it in the next steps:

Harvest Personal Access Token and Account ID
Harvest Personal Access Token and Account ID

Step 3.) Choose a Harvest API Endpoint

In this section, we’ll show you how to browse the Harvest API documentation and choose an API Endpoint URL that retrieves the information you need from your Harvest account.

And endpoint is the part of the API request that tells Harvest which data you’re trying to pull.

If you already know your endpoint, or you want to use the same example endpoint as us, just skip to Step 4.

To choose a Harvest endpoint, first open the Harvest API documentation page here:

Harvest API Documentation
Harvest API Documentation

The various sections of the documentation appear as cards on the page.

In the API Introduction section, click on the Overview link. On the Overview page, you will find information about API requests and their authentication methods.

The other cards on the API documentation page are API groups linking to individual APIs, with each API page linking to a list of its endpoints.

Harvest API Overview
Harvest API Overview

Click on the OAuth2 or Personal Access Tokens link and a page with the authentication descriptions and examples will be displayed.

Here you can also find the root URL for all API endpoints:
Personal Access Tokens - Harvest API
Personal Access Tokens – Harvest API

As an example, let’s see how the Projects API reveals its description and a summary listing of its endpoints:

Harvest Projects API documentation
Harvest Projects API documentation

This is the endpoint for the Projects API:

The documentation contains a short description for each endpoint, as well as the HTTP method used (eg. GET) and the link you should append to the root API URL for querying this endpoint (eg. /v2/projects):

For endpoints that accept parameters, this documentation page is where you would find them listed and explained, along with example inputs and responses.

Step 4.) Enter the Harvest API URL into Apipheny

Now, open your Google Sheet again, with the Apipheny sidebar open (screenshot below).

With the Import tab open, enter these details into the Apipheny add-on:

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

API URL: In Step 3 we explained how you can find the Harvest REST API endpoint that you need. Now that you have an endpoint, copy the complete 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 Users API Endpoint, to get a list of users, and this is the URL we are using:

Headers: In the Headers section in Apipheny, add two rows with the following keys and values:

Key 1:
Value 1:
Key 2:
Value 2:
Bearer <your_access_token>

<your-access-token> and <account_id> are the values you generated previously, in Step 2. Note that there should be a space between “Bearer” and “<your_access_token>”. Do not include the carrots “<>” when entering your access token and account ID.

The Harvest-Account-Id and Authorization keys and values are required, so you should add them to the Apipheny add-on like this:

Harvest API request entered in Apipheny
Harvest API request entered in Apipheny

Step 5.) Run the Harvest API Request in your Google Sheet

Lastly, click the Run button at the bottom of the Apipheny add-on and then your Harvest data will automatically be imported into your Google Sheets, and it should look like this:

Harvest API data imported into Google Sheets
Harvest API data imported into Google Sheets

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

  • Save and schedule your API request
  • Make a POST request (if available)
  • Use the custom =APIPHENY() function to call the API request inside your spreadsheet
  • Create an API request by referencing the value of a cell in the API URL with three curly braces eg. {{{Sheet1!A1}}}

Related articles:

Related Posts