Import Trello Data to Google Sheets

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 free API Connector add-on. We’ll first get an API key from Trello, and then set up a request to pull in project board details to your spreadsheet.

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 API REQUEST URL


We’ll follow the Trello API documentation to access the details of your boards.

  • API root: https://api.trello.com/1/
  • Endpoint: members/me/boards/
  • Parameters: ?key={API Key}&token={API token}
    Parameters Example:?key=e2d688bf5d14d55df24440cd989c9fae&token=a1e5f071e91191c67ee2117af49c6e23f569c05d539c99321624cdd6782cb257

Putting it all together, we get the full API Request URL:
https://api.trello.com/1/members/me/boards?key=e2d688bf5d14d55df24440cd989c9fae&token=a1e5f071e91191c67ee2117af49c6e23f569c05d539c99321624cdd6782cb257
(Of course, you’ll need to substitute in your own API key and token. The ones in the example have already been deleted).

PART 3: ENTER YOUR VALUES INTO API CONNECTOR


We can now enter all our values into API Connector and start importing Trello data into Google Sheets.

  1. Open up Google Sheets and click Add-ons > API Connector > Create New API Request.
  2. In the Create Request interface, enter the Request URL we just created
    trello-img5

  3. Leave the headers section blank as we don’t need any headers for this request.
  4. Create a new tab. You can call it whatever you like, but here we’ll call it ‘Trello Boards’. While still in that tab, click ‘Set’ to use that tab as your data destination.
  5. Name your request. Again we’ll call it ‘Trello Boards’
  6. Click Run and 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: NOTES AND EXPANSIONS

  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 https://api.trello.com/1/boards/{board ID}/lists?cards=open&key={API key}&token={API token}. Substitute in your own values so it looks like this: https://api.trello.com/1/boards/5d3dcb47192337747409bdd5/lists?cards=open&key=e2d688bf5d14d55dv24440cd999c9fae&token=a1e5f071e91191c67ee2117af49c6e23f5d8c05d539c99321624cdd6782cb257
    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. Enter https://api.trello.com/1/boards/{board ID}/members?key={API key}&token={API token}. As before, you’ll need to substitute in your board ID, API key, and API token.
  3. 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

Comments:0

Leave a Reply

Your email address will not be published.