How to get the value of a dropdown list in Trello custom fields

Hi everyone!
I’m trying to create a scenario to automatically update a Google spreadsheet with Trello custom fields values. It all works perfectly except for the dropdown lists. I can find the “idvalue” of the selected option in the dropdown thanks to a “set multiple variables”. I can also find all the text values of the dropdown options. But how to I get the text value for the specific option that I find in the “set variable” tool?



the whole scenario looks like this:

It creates a new row if the subject is new and it updates the row if the subject has already been created. It perfectly works with number and text but I can’t find the value of a selected dropdown.

Thank you all for your help!!

That looks like a Search module, that outputs one bundle for every result.

You can use an Array Aggregator.

Every result (item/record) from a search/match module will output a bundle. To “combine” them into a single structure, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module.

Then, once you have an array, you can use the built-in functions map and first to get the name of the selected option using the ID.

If you need further assistance, please provide the following:

Please provide the output bundles of module [39] by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.
Screenshot_2023-10-06_141025

A.

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading them here will look like this:

module-1-output-bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

This will allow others to better assist you. Thanks!

4 Likes

Hey @Barbara_Carrolaggi so what you would have to do is the following:

  1. Use the “Trello - Get custom field options” module somewhere in the beginning
  2. Add an array aggregator after the options module and map the ID and Value
  3. In the set variable you have to use the map() function to retrieve the ID you need

The map() function would look something like
map(4.array; value.text; ID; 6748938574584)

This basically means; map the array, retrieve the value.text object, where ID == 6748938574584. This function will return an array so you would have to either first() or get() the array to convert it to a string.

Hope this helps you! Goodluck :smiley:

2 Likes

thank you very much to both of you!
It works very well. I also added a get function in the map function in the “set variable” tool in order to get the value according to the idvalue of the Get a card.


I’m gonna need to copy/paste the “get custom field”+“array aggregator” for each dropdown list but at least it works.
Thanks again!
The whole scenario now looks like this:

3 Likes

@Barbara_Carrolaggi Good you solved it, happy to hear!

One thing you could do to limit your operations and increase your efficiency is use the “Get custom fields for board” API call. This is not a module in Make so you will have to make the API call but it will provide you with all custom fields & all options of each field:

Here is the API endpoint:

/boards/{{3.id}}/customFields

Happy to help!

3 Likes

I’ll look into it. Thank you again!