> For the complete documentation index, see [llms.txt](https://docs.coupler.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coupler.io/sources/category/project-management/trello/how-to-import-trello-cards-with-custom-fields.md).

# 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.&#x20;

***

### Prerequisites

Before we begin, let's prepare the following:

1. **API key**
2. **Server token**
3. **Board ID**

{% embed url="<https://app.arcade.software/share/ZLJ6UiofaUKRtRiKkBJC>" %}

<details>

<summary>How to get your Trello API Key?</summary>

1\. Log in to your [Trello account](https://id.atlassian.com/login).\
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

</details>

<details>

<summary>How to get your server token?</summary>

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

<figure><img src="https://1055512216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOFxU2LUkJMCfvbE2re5C%2Fuploads%2FFGH8oCwiHUSd4gVd2r2J%2Fimage.png?alt=media&amp;token=c3d589e1-b3a2-4eae-bc4b-d75b8d671806" alt="" width="375"><figcaption></figcaption></figure>

\
Authorize / Allow the token access to your account:

<figure><img src="https://1055512216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOFxU2LUkJMCfvbE2re5C%2Fuploads%2Fr3CdaRX9z2ZJHbyFoWOP%2Fimage.png?alt=media&amp;token=bdf454f3-d3b7-40fc-a620-6dd4e526cb80" alt="" width="320"><figcaption></figcaption></figure>

\
If not, then you can still get the server tokens by doing these steps:\
1\. Log in to your [Trello account](https://id.atlassian.com/login).\
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:<br>

<figure><img src="https://1055512216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOFxU2LUkJMCfvbE2re5C%2Fuploads%2FFGH8oCwiHUSd4gVd2r2J%2Fimage.png?alt=media&amp;token=c3d589e1-b3a2-4eae-bc4b-d75b8d671806" alt="" width="375"><figcaption></figcaption></figure>

\
Authorize / Allow the token access to your account:

<figure><img src="https://1055512216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOFxU2LUkJMCfvbE2re5C%2Fuploads%2Fr3CdaRX9z2ZJHbyFoWOP%2Fimage.png?alt=media&amp;token=bdf454f3-d3b7-40fc-a620-6dd4e526cb80" alt="" width="160"><figcaption></figcaption></figure>

</details>

<details>

<summary>How to get your board ID?</summary>

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. \
&#x20;   For example:

&#x20;         `https://trello.com/b/AbC7xY2Q/sample-board` \
&#x20;         In this example, **AbC7xY2Q** is the Board ID.

</details>

***

### Sample Case

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

<figure><img src="https://1055512216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOFxU2LUkJMCfvbE2re5C%2Fuploads%2F1t57bSWNf7TPkqnePzjs%2Fimage.png?alt=media&amp;token=68914818-8177-4199-9380-ec5d3ef999e4" alt=""><figcaption></figcaption></figure>

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

{% stepper %}
{% step %}

#### **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](https://app.gitbook.com/o/K71iVAnJAOivgUrrCfiL/s/OFxU2LUkJMCfvbE2re5C/~/edit/~/changes/131/category/project-management/trello/common-issues/how-to-import-custom-fields#import-custom-fields-by-card-including-field-names).

<details>

<summary>How to import all custom field values?</summary>

1. Create a JSON source in your new or existing dataflow.
2. Insert the following JSON URL:

{% code overflow="wrap" %}

```
https://api.trello.com/1/boards/{board-id}/customFields?key={API-token}&token={server-token}
```

{% endcode %}

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

3. Replace the `{board-id}`, `{API-token}`, and `{server-token}` placeholders with the corresponding values you obtained in the [Prerequisites](https://app.gitbook.com/o/K71iVAnJAOivgUrrCfiL/s/OFxU2LUkJMCfvbE2re5C/~/edit/~/changes/131/category/project-management/trello/common-issues/how-to-import-custom-fields#prerequisites) section.
4. Make sure that the HTTP method is set to `GET`
5. It also makes sense to rename this source to prevent confusion later on. For example, you can use `Custom fields of a board`:<br>

   <figure><img src="https://1055512216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOFxU2LUkJMCfvbE2re5C%2Fuploads%2FcDjYabBBqkCyN2b1Sg2O%2Fimage.png?alt=media&amp;token=7f5d0bd2-d9f3-423f-a99b-b7d36478da3c" alt=""><figcaption></figcaption></figure>
6. Click the `Finish and Proceed` button.

</details>
{% endstep %}

{% step %}

#### **Import custom fields by card, including field names**

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

<details>

<summary>How to retrieve the custom field information per card?</summary>

1. Add another JSON source in the same dataflow where the source in [Step 1](https://app.gitbook.com/o/K71iVAnJAOivgUrrCfiL/s/OFxU2LUkJMCfvbE2re5C/~/edit/~/changes/131/category/project-management/trello/common-issues/how-to-import-custom-fields#import-all-custom-field-data-for-the-trello-board) is added.
2. Insert the following JSON URL:

{% code overflow="wrap" %}

```
https://api.trello.com/1/boards/{board-id}/cards?fields=name&customFieldItems=true&key={API-token}&token={server-token}
```

{% endcode %}

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.

3. Replace the `{board-id}`, `{API-token}`, and `{server-token}` placeholders with the corresponding values you obtained in the [Prerequisites](https://app.gitbook.com/o/K71iVAnJAOivgUrrCfiL/s/OFxU2LUkJMCfvbE2re5C/~/edit/~/changes/131/category/project-management/trello/common-issues/how-to-import-custom-fields#prerequisites) section.
4. Make sure that the HTTP method is set to `GET`
5. Rename this source. You can use `Custom fields by card` :

   <figure><img src="https://1055512216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOFxU2LUkJMCfvbE2re5C%2Fuploads%2FloQHZZF221EKImkWccNM%2Fimage.png?alt=media&amp;token=27ba95e3-de74-4b29-bb46-ab6be18b614d" alt=""><figcaption></figcaption></figure>
6. Click the `Finish and Proceed` button.
7. Proceed to the `Data Sets` section to load the data preview.

</details>
{% endstep %}

{% step %}

#### Join the two datasets

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

<details>

<summary>How to join these two sources together?</summary>

{% embed url="<https://app.arcade.software/share/6lKN2Vdg3YpoMXrxKTsw>" %}

\
**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:

<table><thead><tr><th width="281.4453125">Left dataset</th><th>Right dataset</th></tr></thead><tbody><tr><td><p>Source:</p><p><code>Custom fields by cards</code></p></td><td><p>Source:</p><p><code>Custom fields of a board</code></p></td></tr><tr><td><p>Column:</p><p><code>customFieldItems.idCustomField</code></p></td><td><p>Column:</p><p><code>id</code></p></td></tr></tbody></table>

3. Click `Join data`
4. Apply a filter:\
   type - is not - list<br>

   <figure><img src="https://1055512216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOFxU2LUkJMCfvbE2re5C%2Fuploads%2FMrGkzR9YTFj5n9ibiPFl%2Fimage.png?alt=media&amp;token=cea2b12d-6f32-4e4f-bcbd-29f57fe0546f" alt=""><figcaption></figcaption></figure>
5. Rename this dataset to `Custom fields without list`&#x20;

**Second dataset (`Custom fields - list`)**

1. Create another dataset by duplicating the first dataset.
2. Update the joins:

<table><thead><tr><th width="281.4453125">Left dataset</th><th>Right dataset</th></tr></thead><tbody><tr><td><p>Source:</p><p><code>Custom fields by cards</code></p></td><td><p>Source:</p><p><code>Custom fields of a board</code></p></td></tr><tr><td><p>Columns:</p><p><code>customFieldItems.idCustomField</code><br> and <code>customFieldItems.idValue</code></p></td><td><p>Columns:</p><p><code>id</code> and <code>options.id</code></p></td></tr></tbody></table>

3. Update the filter:\
   type - is - list

<figure><img src="https://1055512216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOFxU2LUkJMCfvbE2re5C%2Fuploads%2F92O8kWgO8eZF0AQnkzZ8%2Fimage.png?alt=media&amp;token=6391f8bb-9ccd-4d1d-83fb-32647d42d92d" alt=""><figcaption></figcaption></figure>

4. Rename this dataset to `Custom fields - list`&#x20;

**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:<br>

   <figure><img src="https://1055512216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOFxU2LUkJMCfvbE2re5C%2Fuploads%2FdxZpbUEIFIs4lbB7gUGJ%2Fimage.png?alt=media&amp;token=b84bae48-a568-4046-be30-64bfd6d50762" alt=""><figcaption></figcaption></figure>
3. Click `Append data`

</details>
{% endstep %}

{% step %}

### Refine the Imported Data (Optional)

<details>

<summary>You can transform the data further by:</summary>

1. Hiding unnecessary columns\
   In our example, we've hidden the following columns:
   1. From the `Custom fields by card`&#x20;
      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`&#x20;
      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

{% embed url="<https://app.arcade.software/share/m6FLiNGX9uCrFbd0DM9s>" %}

</details>
{% endstep %}
{% endstepper %}

Final dataset:

<figure><img src="https://1055512216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOFxU2LUkJMCfvbE2re5C%2Fuploads%2FYjwOl46jnesmsHjrOfrD%2Fimage.png?alt=media&amp;token=cf5da04e-8a32-4bbb-9632-9c8251fc6641" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.coupler.io/sources/category/project-management/trello/how-to-import-trello-cards-with-custom-fields.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
