Search API Connector Documentation

Print

Import BambooHR Data to Google Sheets

In this guide, we’ll walk through how to pull data from the BambooHR API directly into Google Sheets, using the API Connector add-on for Sheets.

We’ll first get an API key from BambooHR, and then set up a request to pull in human resources data to your spreadsheet.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get Your BambooHR API Key

  1. While logged into your BambooHR account, click your Profile icon > API keys from the header bar.
    bamboohr-img1
  2. Click the Add New Key button
    bamboohr-img2
  3. Give your API key a name and click Generate Key.
    bamboohr-img3
  4. One last step: Because the BambooHR API requires Basic Authentication, we need to encode our authentication info to base 64. You can do this by entering your your credentials in the format YOUR_API_KEY:x into this form (i.e. your API key, then a colon, and then an ‘x’).

    The encoding script runs in your browser, and none of your credentials are seen or stored by this site.
 

 

 

(If you have any problems with the above, please check this post for some alternate methods of encoding your credentials).

Part 2: Create Your BambooHR API Request URL

We’ll first access a list of employees.

  • API root: https://api.bamboohr.com/api/gateway.php/
  • Endpoint: /YOUR_DOMAIN/v1/employees/directory

Just substitute in your own domain name. You can get your domain name from the URL when you’re logged into BambooHR.
bamboohr-img0

Putting it together, we get the full API Request URL:

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

Part 3: Pull BambooHR API Data into Sheets

We can now enter our values into API Connector and grab that data.

  1. Open up Google Sheets and click Extensions > API Connector > Open.
  2. In the Create tab, enter the Request URL we just created
    bamboohr-img5
  3. Leave OAuth set to None.
  4. Enter 2 headers:
    • Authorization : Basic YOUR_BASE64_ENCODED_STRING
    • Accept : application/json
      bamboohr-img6
  5. Create a new tab. Name it and click Set current to use that tab as your data destination.
  6. Under Output Options, click “grid” report style. This will speed up the request and make the output easier to read.
    bamboohr-img4
  7. Name your request and click Run. A moment later you’ll see a list of your BambooHR employees in your sheet.
    bamboohr-img7
  8. (Optional) BambooHR returns some “extra” columns in the beginning of the response. To select just the fields you want, just click Edit Fields to enter the visual field editor, where you can select, re-arrange, and rename fields.

Part 4: More Example API URLs

You can check the documentation for the full list of available API requests,  but if you just want to jump in, you can play around with the URLs you enter in the API URL path field. Try the following (one at a time), substituting in your own domain name:

  • https://api.bamboohr.com/api/gateway.php/YOUR_DOMAIN/v1/applicant_tracking/jobs
  • https://api.bamboohr.com/api/gateway.php/YOUR_DOMAIN/v1/meta/fields/
  • https://api.bamboohr.com/api/gateway.php/YOUR_DOMAIN/v1/meta/users/
  • https://api.bamboohr.com/api/gateway.php/YOUR_DOMAIN/v1/time_off/whos_out/
  • https://api.bamboohr.com/api/gateway.php/YOUR_DOMAIN/v1/benefits/settings/deduction_types/all
  • https://api.bamboohr.com/api/gateway.php/YOUR_DOMAIN/v1/benefitplans

Part 5: API Documentation

Official documentation: https://documentation.bamboohr.com/reference

Previous Import Asana Data to Google Sheets
Next Import BigQuery Data to Google Sheets

Leave a Comment

Table of Contents