Search API Connector Documentation

Print

Import Trello Data to Google Sheets

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

We’ll first get an API key from Trello, and then set up a request to pull in project board details to your spreadsheet.

Contents

Before You Begin

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

Part 1: Get Your Trello API Key

  1. Log into your Trello account and navigate to https://trello.com/app-key. Click the Show API Key button.
    trello-img1
  2. Note your API Key and click the Token link.
    trello-img2
  3. You’ll be prompted to grant permissions. Click Allow.
    trello-img3
  4. You’ll now see a page with your API token. Copy this and keep it handy.
    trello-img4

Part 2: Create Your Trello API Request URL

We’ll first get the details of your boards.

  • API root: https://api.trello.com/1/
  • Endpoint: members/me/boards/
  • Parameters: ?key=YOUR_API_KEY&token=YOUR_API_TOKEN

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

https://api.trello.com/1/members/me/boards?key=e2d...&token=a1e...

Just substitute in your own API key and token.

Part 3: Pull Trello API Data into Sheets

Now let’s copy that URL into API Connector.

  1. Open up Google Sheets and click Extensions > API Connector > Open.
  2. In the Create screen, enter the Request URL we just created
    trello-img5
  3. We don’t need OAuth so just leave that set to None. We don’t need any headers for this request either, so just skip that section.
  4. Create a new tab and click Set current to use that tab as your data destination.
  5. Name your request and click Run. A moment later you’ll see a list of the boards you have access to populate the TrelloBoards tab in your Google Sheet:trello-img7

Part 4: Get More Data

  1. Experiment with endpoints and query strings as described in the documentation to see other types of Trello data. Pay particular attention to the board ID, as you will need this to construct many other requests. For example, you can see all the cards on a specific board by entering the following:
    https://api.trello.com/1/boards/YOUR_BOARD_ID/lists?cards=open&key=YOUR_API_KEY&token=YOUR_API_TOKEN

    Substitute in your own values so it looks like this:

    https://api.trello.com/1/boards/5d3dcb47192337747409bdd5/lists?cards=open&key=e2d...&token=a1e...

    trello-img8
    (Tip: When you run this query, note that the id field in the first query contains the board ID that you need to plug in here).

  2. You can also use the board ID to see all the members of a board:
    https://api.trello.com/1/boards/YOUR_BOARD_ID/members?key=YOUR_API_KEY&token=YOUR_API_TOKEN

    As before, you’ll need to substitute in your board ID, API key, and API token.

Part 5: Handle Pagination

Note Trello’s limits on the number of records returned on a response. By default, a maximum of 1000 records will be returned as described in their documentation.

To retrieve more than 1000 records, multiple requests must be made using the ‘since’ and ‘before’ parameters. In API Connector, you can page through automatically using pagination handling (paid feature).

  • URL: enter your URL, including &limit=1000
  • Pagination: cursor
  • Next token parameter: before
  • Next token path: id
  • Run until: choose when to stop fetching data
    trello-pagination-cursor

Part 6: API Documentation

Official API documentation: https://developers.trello.com/docs/api-introduction

Previous Import Torn API Data to Google Sheets
Next Import Twitter Data to Google Sheets

Leave a Comment

Table of Contents