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

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 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.) Get your Harvest Access Token and Account ID

1. After logging in to your Harvest account, go to the developers page here: https://id.getharvest.com/developers

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: https://help.getharvest.com/api-v2/

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:

https://api.harvestapp.com/v2
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:

https://api.harvestapp.com/v2/projects

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:

https://api.harvestapp.com/v2/users

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

Key 1:
Harvest-Account-Id
Value 1:
account_id
Key 2:
Authorization
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”.

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.


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?