BambooHR is one of the most popular HR softwares. It’s an all-in-one HR software that makes it easy to organize and analyze employee data, hiring and onboarding, managing employee wages, and more.

In this tutorial, I’ll show you how to connect the BambooHR API to Google Sheets in 7 steps:

  1. Install the Apipheny add-on
  2. Create a new access level in BambooHR
  3. Set up a non-employee user in BambooHR
  4. Create a BambooHR API Key
  5. Choose a BambooHR API endpoint
  6. Enter your BambooHR API request into Apipheny
  7. Run the BambooHR API request in your Google Sheet

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.) Create a new access level

Your next step is to make sure you’re logged in to your BambooHR account, so you can create a new access level.

To create the new access level, in your BambooHR account, go to Settings > Access Levels > access the drop-down menu next to Levels > then click Custom Access Level:

Creating a new access level in BambooHR
Creating a new access level in BambooHR


Then, on the next page, enter a name for the custom access level and write a description, then click the Next Step button:

Entering a name and description for the new custom access level in BambooHR
Entering a name and description for the new custom access level in BambooHR

On the next page, choose the actions this access level can perform, then click the Next Step button:

Choosing the permissions for the new access level in BambooHR
Choosing the permissions for the new access level in BambooHR

Then choose what information users with this access level can see, then click the Save & Finish button:

Choosing the permissions for the new access level in BambooHR
Choosing the permissions for the new access level in BambooHR

Step 3.) Set up a non-employee user

For the next step, go to Access Levels > choose your newly created access level > select “Add a Non-Employee BambooHR User” in the actions’ menu:

Setting up a non-employee user in BambooHR
Setting up a non-employee user in BambooHR
Select the "Add a Non-Employee BambooHR User" button
Select the “Add a Non-Employee BambooHR User” button

On the next page, enter a first name, a last name, and an email address for the new user.

Then select the same access level that you previously created and click the Save button:

Enter the details for the new non-employee user in BambooHR then click "Save"
Enter the details for the new non-employee user in BambooHR then click “Save”

Step 4.) Create an API Key for the new account

To access the BambooHR API in your Google Sheet, your next step is to get your API Key.

Login to your newly created user account, click on the profile icon, and choose the API Keys option:

Log in to the new user account and  choose "API Keys" in the settings menu
Log in to the new user account and choose “API Keys” in the settings menu

Click the +Add New Key button:

Click “Add New Key” in BambooHR

Enter a name for the new API key and click the Generate Key button:

Enter a name and then click "Generate Key" to get your BambooHR API key
Enter a name and then click “Generate Key” to get your BambooHR API key

Your BambooHR API Key will then be displayed on the screen.

Copy and paste your BambooHR API key to safe location, because you’ll need it in the next steps. Then click the Done button.

Click "Done" once your finished copying and pasting your BambooHR API key to a safe location
Click “Done” once your finished copying and pasting your BambooHR API key to a safe location

Step 5.) Choose a BambooHR API Endpoint

In this section, we’ll show you how to browse the BambooHR API documentation to find an API endpoint URL that retrieves the information you need from BambooHR.

If you already know your BambooHR API URL and endpoint, or you want to use the same example URL as us, just skip to Step 6.

To get your endpoint, first open the BambooHR API documentation page: https://documentation.bamboohr.com/reference

The menu on the left contains a list of categories for the available BambooHR API endpoints:

BambooHR API Documentation
BambooHR API Documentation

An example endpoint is the Get Employee endpoint, which returns the employee data:

https://api.bamboohr.com/api/gateway.php/companyDomain/v1/employees/0/?fields=firstName%2ClastName

The documentation for this endpoint contains a paragraph describing the endpoint’s purpose, the endpoint’s HTTP method (GET) and URL, a section detailing the cURL command you can use to call the API endpoint, and a table describing the accepted parameters and headers:

BambooHR API "Get Employee" endpoint documentation
BambooHR API “Get Employee” endpoint documentation

All API calls to the BambooHR API should be made to this base/root domain:

https://api.bamboohr.com/api/gateway.php

Step 6.) Enter your BambooHR API request into Apipheny

Now we’re on the last step. 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 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 5, we explained how you can find the BambooHR API endpoint that you need to retrieve the exact data you want from your BambooHR account. Now copy your complete BambooHR 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 Employee Directory endpoint, which gets the list of all employees from our BambooHR account. The whole API URL for this endpoint is:

https://api.bamboohr.com/api/gateway.php/companyName/v1/employees/directory

If you’re using the same example as us, just copy and paste this URL into the Apipheny add-on, but switch out companyName with your company name.

Headers: In the “Headers” section of the Apipheny add-on, add two rows of headers with the following keys and values:

Header 1
Key:
Accept
Value:
application/json
Header 2
Key:
Authorization
Value:
Basic your_coded_key

your_coded_key is obtained by encoding your API key, followed by the 😡 suffix, as a Base64 string. You can use this website to encode your key: https://www.base64encode.org/. So to encode your API key on that website, just enter your API key followed by a colon “:” and an “x” like so: ExampleAPIkey:x then click Encode. Then enter the value you get back as the “value” of the second header, with a space between “Basic” and the encoded API key.

Here’s what your BambooHR API request should look like once entered into the Apipheny add-on:

BambooHR API request entered into Apipheny
BambooHR API request entered into Apipheny

Step 7.) Run the BambooHR API Request in your Google Sheet

The last step to get your BambooHR account data in your Google Sheet is to click the Run button at the bottom of the Apipheny add-on, and then your BambooHR data will be imported into your Google Sheet.

BambooHR API data imported into Google Sheets using the Apipheny add-on
BambooHR API data imported into Google Sheets using the Apipheny add-on

After making a successful request to the BambooHR API, try querying a different BambooHR API 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?