You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
In the following URL, It is enough to create a new card with multiple members by assigning a array whose element is the ID of members by strings.
https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-post
---------------------------
idMembers
Array<string>
Comma-separated list of member IDs to add to the card
---------------------------
But, I can't create new card in this way, and the error is {"message":"Invalid objectId","error":"ERROR"} .
How can I create ? It is helpful to show a sample code to do this.
My code is as follows:
var payload =
{"key": "XXXXXXXXXXXXXXXXXXXXXX",
"token": "XXXXXXXXXXXXXXXXXXXXXX",
"idList" : "XXXXXXXXXXXXXXXXXXXXXX",
"name" : "aaa",
"idMembers": ["Mr. aaa","Mr. bbb"],
var option =
{"method":"POST",
"payload":payload
};
UrlFetchApp.fetch(URL,option);
@Fujiyama Yoshinori the idMembers needs to be a comma separated list of member IDs, not member names or usernames.
Here's an example written in Trellinator:
https://gist.github.com/iaindooley/20925ee9690aae643ad473622d1ff608
Here's the implementation of Card.create:
https://github.com/iaindooley/trellinator-libs/blob/master/Card.js#L1628
You can read more about Trellinator here:
You can also try the above code snippet here:
Thank you for your answer.
I have retried in the following way by referring URL above:
var payload =
{"key": "XXXXXXXXXXXXXXXXXXXXXX",
"token": "XXXXXXXXXXXXXXXXXXXXXX",
"idList" : "XXXXXXXXXXXXXXXXXXXXXX",
"name" : "aaa",
"idMembers": "Mr. aaa's ID,Mr. bbb's ID", // not array
var option =
{"method":"POST",
"payload":payload
};
UrlFetchApp.fetch(URL,option);
In this way, no error has occurred and I can get the result what I wanted.
Very thank you !!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Community! My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. I'll be sharing with you a series of videos with my top tips on how to best use Trello...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.