Does Butler have the ability to modify a card's cover?
Asked by brad.patera:

With the recent change to allow for full card covers and colors I would like to setup a Butler rule or similar to where when a label on a card changes, the full card changes to match the label color. Is there a rule or automation available to allow this?

Something like:

when the green label is added to a card

add the green color to the card cover


Answers:
author: David Bakkers
body: Hello [@brad.patera](/t5/user/viewprofilepage/user-id/3952688)

Although Butler currently can't change a card's cover directly via an Action, you can do it indirectly using Butler's cool new [HTTP requests](https://help.trello.com/article/1203-issuing-http-requests-with-butler) Action to send a suitable PUT request to the [Trello REST API to update the card](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-put) and set the values you want for the cover.

To do this, create a Butler rule, add the Trigger you want, then add an Action of the type Content and the sub-type *'put to url with payload':*

![Trello Butler card cover Action.png](https://community.atlassian.com/t5/image/serverpage/image-id/136751i0FAB127D5DCA67A9/image-size/large?v=v2&px=999 "Trello Butler card cover Action.png")

The url would be the REST API endpoint for cards, followed by the [variable](https://help.trello.com/article/1157-variables) *'{cardid}'* that will be substituted by Butler with the ID of the referenced card. The url would be:

```
https://api.trello.com/1/cards/{cardid}
```

The payload would be the JSON formatted request that would contain your REST API key, token, and the values you want to set for the card's cover. For example, this payload would change the card's cover to green, full size:

```
{"key" : "[your_rest_key_here]","token" : "[your_rest_token_here]","cover" : {"color" : "green","size" : "full" }}
```

Here is an example of a rule with that Action described above being Triggered when a new card is created on the board:

![Trello Butler card cover rule #1.png](https://community.atlassian.com/t5/image/serverpage/image-id/136748i9D3CF0C7C947E4A8/image-size/large?v=v2&px=999 "Trello Butler card cover rule #1.png")

Here is a closer look at the rule, showing the Action in more detail:

![Trello Butler card cover rule #2.png](https://community.atlassian.com/t5/image/serverpage/image-id/136749i83F203FB7372E371/image-size/large?v=v2&px=999 "Trello Butler card cover rule #2.png")

You can set the Trigger to be whatever or criteria you want. By altering the HTTP request's payload, you could set the card cover's color, size, text brightness etc.

**WARNING!!** This method puts your personal REST API key and token in plain text inside a Butler rule. Anyone who has the rights to read your rules would be able to see potentially sensitive credential information. Use with caution.

comments: author: Jesse
body: Following some of the guides and finally generating the tokens I was able to get this command working for my own use. Being very green to this entire area of API use and JSON formatting I have been struggling to use the same format for editing other aspects of a cover card.  

How could I use this method to also change the "name" of the cover card?


author: Esme Crutchley
body: Hi [@brad.patera](/t5/user/viewprofilepage/user-id/3952688)

Welcome to the Community!

As the new features are *really* new, there aren't Butler rules for them yet.

[@Blair at Atlassian](/t5/user/viewprofilepage/user-id/418104) posted a reply to a similar question [here](https://community.atlassian.com/t5/Trello-questions/Is-there-a-way-to-automate-cover-colors/qaq-p/1395396?utm_campaign=subscription_search_answer&utm_content=topic&utm_medium=email&utm_source=atlcomm) (the original question was about automating card covers), and his reply has all the details about how to make a feature request and the roadmaps that Trello have (with all the links to the boards and feature sites).

Hope that's helpful!

Esme :)

comments: author: brad.patera
body: Thank you so much, appreciate the link and details!


Tags: butler