For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to Import Trello Cards with Custom Fields

Coupler.io offers a ready-to-use Trello to Google Sheets integration to import data about board cards, card updates, and checklist items. Unfortunately, the exported card data does not contain information about Trello custom fields.

Nevertheless, you can easily get this data via the Trello API without any code using the JSON dataflow in coupler.io.


Prerequisites

Before we begin, let's prepare the following:

  1. API key

  2. Server token

  3. Board ID

How to get your Trello API Key?

1. Log in to your Trello account. 2. Open the Power-Ups Admin Portal by accessing the following link in the browser where you’re logged in to Trello: https://trello.com/power-ups/admin 3. Click New and fill in the form with information 4. Go to the API key section > Generate a new API key > Generate API key

How to get your server token?

If you just created an API key following the steps above, you can just click this quick link to see your server token:

Authorize / Allow the token access to your account:

If not, then you can still get the server tokens by doing these steps: 1. Log in to your Trello account. 2. Go to the Power-Ups admin portal: https://trello.com/power-ups/admin 3. Select the app you created. 4. Go to the API key section and click the same quick link to see your server token:

Authorize / Allow the token access to your account:

How to get your board ID?

1. Open the Trello board that contains the custom fields you want to import. 2. In the board URL, the 8-character code after /b/ is the Board ID. For example:

https://trello.com/b/AbC7xY2Q/sample-board In this example, AbC7xY2Q is the Board ID.


Sample Case

Suppose you have the following Trello card and want to retrieve its custom field values:

To accomplish this, we’ll use the following approach:

1

Import all custom field data for the Trello board

This request provides the custom field values but does not include the field names, so we’ll need an additional request in Step 2.

How to import all custom field values?
  1. Create a JSON source in your new or existing dataflow.

  2. Insert the following JSON URL:

This is Trello's Get Custom Fields for Board endpoint, which lists the custom field definitions that exist on the specified board.

  1. Replace the {board-id}, {API-token}, and {server-token} placeholders with the corresponding values you obtained in the Prerequisites section.

  2. Make sure that the HTTP method is set to GET

  3. It also makes sense to rename this source to prevent confusion later on. For example, you can use Custom fields of a board:

  4. Click the Finish and Proceed button.

2

Import custom fields by card, including field names

This request retrieves the custom field information associated with each card, including the corresponding field names.

How to retrieve the custom field information per card?
  1. Add another JSON source in the same dataflow where the source in Step 1 is added.

  2. Insert the following JSON URL:

This is Trello's Get Cards on a Board endpoint, which lists all open cards on the specified board, with customFieldItems set to true to include custom field items in the response, and the fields parameter with name specified, to return the card name.

  1. Replace the {board-id}, {API-token}, and {server-token} placeholders with the corresponding values you obtained in the Prerequisites section.

  2. Make sure that the HTTP method is set to GET

  3. Rename this source. You can use Custom fields by card :

  4. Click the Finish and Proceed button.

  5. Proceed to the Data Sets section to load the data preview.

3

Join the two datasets

This will give us a complete dataset with both the custom field values and their field names.

How to join these two sources together?

First dataset (Custom fields without list)

  1. Click the Create Dataset button in the upper-left corner and select Create Join.

  2. Select the following:

Left dataset
Right dataset

Source:

Custom fields by cards

Source:

Custom fields of a board

Column:

customFieldItems.idCustomField

Column:

id

  1. Click Join data

  2. Apply a filter: type - is not - list

  3. Rename this dataset to Custom fields without list

Second dataset (Custom fields - list)

  1. Create another dataset by duplicating the first dataset.

  2. Update the joins:

Left dataset
Right dataset

Source:

Custom fields by cards

Source:

Custom fields of a board

Columns:

customFieldItems.idCustomField and customFieldItems.idValue

Columns:

id and options.id

  1. Update the filter: type - is - list

  1. Rename this dataset to Custom fields - list

Final dataset (Board cards with custom fields)

  1. Create the last dataset by clicking the Create Dataset button and selecting Append Data.

  2. Select the two joined datasets:

  3. Click Append data

4

Refine the Imported Data (Optional)

You can transform the data further by:
  1. Hiding unnecessary columns In our example, we've hidden the following columns:

    1. From the Custom fields by card

      1. id

      2. customFieldItems.id

      3. customFieldItems.idModel

      4. customFieldItems.idValue

      5. customFieldItems.modelType

      6. customFieldItems.value

    2. From the Custom fields of a board

      1. idModel

      2. modelType

      3. fieldGroup

      4. display.cardFront

      5. pos

      6. options.idCustomField

      7. options.color

      8. options.pos

      9. isSuggestedField

  2. Renaming the fields to make them more human-readable

    1. From the Custom fields by card

      1. name - Card name

      2. customFieldItems.value.text - Text value

      3. customFieldItems.value.number - Number value

      4. customFieldItems.value.date - Date value

      5. customFieldItems.value.checked - Checklist value

    2. From the Custom fields of a board

      1. name - Custom field name

      2. type - Custom field type

      3. options.value.text - Dropdown value

  3. Filtering and sorting the data as needed

Final dataset:

Last updated

Was this helpful?