Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I search custom field value of which I know ID of custom Field.

gaurav January 9, 2021

HI,

Could you please API to search custom field value across all card and Board.

I have requirement.

Trello have LIST => Customer List.

Inside List there will be many cards which save customer data which include Custom Field Last Contact Date, and Mobile number.

Now I know the ID of both field, now when agent call to customer I need to update Last Contact Date, but for it I need to search Mobile number associated to which card and get Card ID of it, so that I can update LAST contact Date and Time.

I get all data by using below API but then it too much data to process.

https://api.trello.com/1/boards/5fe314f766XXXXXXXXXXXXX/?fields=S Last Contact Date&cards=visible&card_fields=name&customFields=true&card_customFieldItems=true&key=XXXXXXXXXXXXXXXXXXXXXXXXXXX&token=XXXXXXXXXXXXXXXXXXXX

Is there any API which which can search number directly and provide me Card ID, idValue, required to update LAST Contact field.

2 answers

0 votes
gaurav January 9, 2021

@milynnus 

Is there any possibility doing this by using webhook, as I see I can monitor Board , but for CARD, I need to know card ID .
Is there any way that webhook can send data whenever card is created and when updated.

No need to monitor card with ID.

milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2021

@gaurav You use webhook to capture events on the board and then decide on what to do. In your case you want, you want to update a field on a certain card based on the value of the CF on that card. 

milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2021

@gaurav use idModel = board id and action == createCard (check the action value please)

gaurav January 10, 2021

@milynnus 

Ok, yes it did send data when mobile number is added to card , so I think this way is better way to to save data in database, though need to process data everytime when anything is updated in Board.

it would be really nice if there is API to search data based on either CustomField ID .

0 votes
milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2021

@gaurav 

Short answer to your API question is not that I know off. 

You are right and depending on how many cards you have on the board, you can easily hit the data limits set by Trello.

If this is something that you do often, you probably have to set up a tinydb or just a dictionary (I write in python)of card_id and mobile number so that you get to the card with a client.get_card(table['<mobile>]).get_custom_field_by_name('last_update_details') <using py-trello>

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events