Forums

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

How to send all custom fields on POST request ?

Laurent Lacoste August 10, 2023

Hi,

I have created a button on a card with http post request.

Works fine, I can send card variables to other external system.

But I want also to send all the custom fields added on this card with my http post request.

Is it possible to do that instead of adding every custom field one by one?

Thanks

L.

1 answer

1 accepted

0 votes
Answer accepted
Daydreamer Mike
Community Champion
August 10, 2023

Hi @Laurent Lacoste 

From the questions you have been asking recently, sounds like you are doing some interesting things in Trello....

Is it just the custom field value you are looking to put into your http post?


In your payload, you can use "{{%customfield1name}}", {{%customfield2name}}

Where customfieldXname is the name of your custom field.

 

Alternatively, can you do an HTTP get for the Trello card and process it before doing an HTTP post:

https://api.trello.com/1/cards/{cardidlong}/customFieldItems?key=APIKey&token=APIToken

Laurent Lacoste August 10, 2023

Yes I'm doing some automation pipelines between trello and other tools ;-)

to do that, I need to send custom fields labels + value to external tools.

about the payload, yes I am already doing this "{{%customfield1name}}", "{{%customfield2name}}" ,etc .. but I need add every custom field one by one.

I was wondering if a trick exist to call all the custom fields thanks to one variable ?

Daydreamer Mike
Community Champion
August 10, 2023

I did a bit of research and it looks like Trello doesn't have a mechanism to pull all data from the array using the HTTP get of customFieldItems. I would have expected you could have used {httpresoponse[].value} to return the array of values but it doesn't work. However {httpresponse[1].value} does return the value of the array element '1'.

Have you considered using something like make.com?  I have been playing a lot with it and one feature I love are array aggregators and filters so you can parse exact array elements...

Laurent Lacoste August 10, 2023

Ok understood.

Yes I'm already in touch with make and I did some tests, sounds good.

but I want, also, to limit the number of tools used inside the pipeline.

for the moment I can add custom fields one by one insite post request, it's not important.

but an array cuold be helpful and make sense.

thanks for the feedback

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events