Search API Connector Documentation

Print

Import KoBoToolbox Data to Google Sheets

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

We’ll first get an API key from Kobo, and then set up a request to pull in 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 Kobo API Key

  1. While logged in to your Kobo account, check the domain in the address bar. For most people, this will be either kf.kobotoolbox.org or kobo.humanitarianresponse.info (this article describes the difference).
    kobo-img1
  2. Now navigate to https://YOUR_DOMAIN/token, i.e. https://kf.kobotoolbox.org/token/ or http://kobo.humanitarianresponse.info/token. Copy the token that you see there. That’s it, you can now access Kobo’s API.
    kobo-img2

Part 2: Fetch Data from Kobo

The easiest way to get started with the Kobo API is through API Connector’s built-in integration.

  1. Select KoboToolBox from the drop-down list of applications
    kobotoolbox-application
  2. Under Authorization, enter your API key with the word Token in front of it.
    kobotoolbox-authorization
  3. Choose an endpoint. We’ll start with /assets.json which is the endpoint to get a list of your assets.
    kobotoolbox-endpoints
  4. Under kpi-url, select your hostname (kf.kobotoolbox.org or kobo.humanitarianresponse.info)
  5. Choose a destination sheet, name your request, and hit Run to see the response data in your sheet.
    kobotoolbox-response
  6. Note the ID in the results.uid field, as you can plug that into the asset_uid input box for subsequent requests.
    kobotoolbox-response2

Part 3: Create a Custom Request

Alternatively, you can run your own custom requests instead of using API Connector’s pre-built integration. When you create a custom request, you add your complete URL into the request URL field. You also need to add two headers:

  1. Key = Authorization, Value = Token your_api_token
  2. Key = Accept, Value = application/json

kobo-img4

Part 4: API Documentation & Information

Kobo hasn’t provided much documentation, but here are a few links for more information:

Previous Import Klaviyo Data to Google Sheets
Next Import Kraken Data to Google Sheets

14 thoughts on “Import KoBoToolbox Data to Google Sheets”

  1. Hello,
    I have two questions:
    1. Is there any free way to have the document updated at regular intervals?
    2. How do I import the data labels, and not the names?
    Thanks, this is a really helpful page!

    Reply
    • Sorry, scheduling is a paid feature (if you’re working for a nonprofit, we can offer a discount). I’m not sure what you mean by data labels though. What is the data label?

      Reply
      • Thanks so much for your reply Ana. Ok, that’s fair – thanks. It is for a non-profit but manual is ok for now and I checked the pricing, it is fair so will upgrade if necessary.

        By labels, I mean the label within Kobo. So let’s say I have a question: Where do you live, and it has multiple answer options. The label is what the enumerator sees in the Kobo form “Lives in a house” but what is imported is the name “lives_house”, which is how the data is stored. I might not be using the right terms sorry, but hopefully I’m explaining that clearly. The connector is excellent but it’s pulling over “lives_house” which doesn’t read well when used in Data Studio – I would like it to pull over “Lives in a house”. Does that make sense? Is there a way to do that?

      • That does make sense, but we already return everything that gets sent back by their API. So unfortunately if you don’t see the label in the response, that means the API doesn’t send that data back, and we have no way to include it. If you’re familiar with Sheets functions, you could do something a little clever, like manually create a mapping table where column A contains the name and column B contains the label, and then use VLOOKUP to pull in the label to your sheet before importing it into Data Studio.

Leave a Reply to Paul Cancel reply

Table of Contents