Hi! I’m fairly to the Trello API community so sorry if this question is silly. I was wondering how to add options to a pre-defined custom field (Text custom field) with a post request that also creates a card.
I got the post request to create a card, and it would be really awesome if I knew how to add to the custom field options that is unique for each created card; based on what I set it in the post reqeust.
function createTrelloCard(items) {
var data = { "value": { "text": "Hello, world!" } }
var payload = {"name":items,
"desc":"description",
"pos":"bottom",
"due": "",
"idList":"LISTID",
"customField" : data, // I attempt custom field here.
//"labels": ,
//"idMembers": ,
//"idCardSource": ,
};
var url = 'https://api.trello.com/1/cards?key=[APPKEY]&token=[TOKEN]' //optional... -&cards=open&lists=open'-
var options = {"method" : "post",
"payload" : payload};
UrlFetchApp.fetch(url, options);
}