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

Trello Power-Ups : create a "Link Card"

grub5 May 12, 2024

Hello,

I am currently developing a Trello Power-Up and would like to manage so-called "link cards".

https://support.atlassian.com/trello/docs/link-cards/

I can create cards with all different parameters, as referred in API section :

https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-post

 

BUT, I didn't find any way to make the card be a "link card" automatically at creation time.

And surprisingly, I found no difference in data returned by API, between normal cards and link cards...

 

Is there any way ?

 

Thanks :)

3 answers

1 accepted

1 vote
Answer accepted
grub5 November 21, 2024

I think I found my answer : the card attribute in the API is "cardRole", can be set to "link" or  "".

Seems to do the job ;-)

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.
November 21, 2024

@grub5 

Now I understand your question and thanks for the information on “card role” 

0 votes
Dreamsuite Mike
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2024

Hi @grub5 

I'm not fully sure of your question but I will try to answer

 

The "connect cards" part of Trello is just a client side button that attaches the source card to the card you just attached...

You can do this also via the API...

  1. Create a new card and add this card URL to the source card
  2. Add the source card URL to the new card

 

You can determine if a card has attached trello cards by using /cards/{id}/attachments and filtering on the URL

You can also check by this attribute to see if there is a linked card, from Get a Card:

"badges": 
{
"attachmentsByType":
{
"trello":
{
"board": 0,
"card": 1
}
}
}

 

grub5 May 13, 2024

Hi @Dreamsuite Mike ,

Thanks for your answer :).

The feature I was referring to is when you just paste an URL in a Trello card (ex. Youtube video), and Trello automatically transform it as a "link card".

Such "link card" displays a preview of the content as cover (ex. Youtube video caption), and the card become clickable.

This is described as a different "card type" in documentation, rather than as a card property : https://support.atlassian.com/trello/docs/card-types/

 

I guess my question would be : is there a way to get/update the card type with the API (separator, link card, ...) ?

 

 

Dreamsuite Mike
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 13, 2024

Sorry, I misunderstood and thought it was to do with linked cards...

Link cards I am sure is a client-side action and thus isn't part of the API.  However, so long as cards created by the API are supported as smartlinks, the client side will process them. 

There is no card-type attribute as part of the API

 

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.
May 12, 2024

@grub5 

 

But if you are referring to ‘card’ created when you copy and paste a url it creates a link to the target and when convert it to a card, it will be just another card with the card name being the url. I believed the link card is managed by Trello app itself. 

Each card has a card url and you can access the card via the url (or the shortUrl) from within Trello. So if you are referring to two cards as linked then each of them has in their attachment the url of the linked card. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events