Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I am not able to add comment to the card.

I am trying to create a card and add labels and comments to the card through the python program. I am able to create the card. However, I am not able to add comments to the card created. I am passing the card_id as a parameter to the function. I am getting an invalid id error. Can someone help me with this? I am attaching my code for reference. 

def create_card(list_idcard_name):    url = f""    querystring = {"name": card_name, "idList": list_id, "key": key, "token": token}    response = requests.request("POST", url, params=querystring)    card_id = response.json()["id"]    print("create card")    print(response.json())    return card_id

def add_comment(comment, card_id):    url = "{id}/actions/comments"    querystring = {"key": key, "token": token, "text": comment,"id": card_id}    response = requests.request("POST", url, params=querystring)    #comment_data = response.json()    #return comment_data    return response.text

1 answer

1 accepted

1 vote
Answer accepted
Iain Dooley Community Leader Oct 05, 2020

@Kowshik Prasad Navilur the id of the card should appear in the URL where you currently have {id}

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Trello

Taco Tuesday: Your favorite Trello blog takeaway

Hello friends! From the community that brought you Welcome Wednesday, Throwback Thursday and Friday Fun, welcome to Taco Tuesday, a weekly discussion about all things Trello. The best part? One Tac...

328 views 13 12
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you