Trello Label + Discord Role Integration

Hello,

I’m looking to create an automation that looks for when certain labels are added to cards on Trello, and then apply a role to the user on Discord.

I was able to create this process with Zapier, but hoping to replicate it with make. From what I can tell, Make can’t use a label being applied as a trigger for a process, but I could be wrong.

  1. Label is applied to a card
  2. Card has Discord username in a custom field in Trello
  3. Find the Discord user (by their username) to pull their Discord ID
  4. Apply the Discord role

Trigger:
Trello card “Eric” is given the dark green label called “Spinach”
Goal:
Discord user EricDiscord now has the Spinach role on Discord

Since make cannot use a label being applied to a card as a trigger, I was thinking of another possible route, but I am not certain how to map it in make:

Trigger:
Trello card “Eric” is given the dark green label called “Spinach” and moved to list “Label Change”
make can use card moved to a list as a trigger
Goal:
Discord user EricDiscord now has the Spinach role on Discord

The problem with this is the moved to a list trigger, because I need different Trello labels to eventually give different Discord roles, but I am not certain how to get a label from a card (I know there is a get a label module, but I am having trouble figuring out how to use it). I think I need several if statements essentially (if label X applied, give X role on discord. If label Y applied, give Y role on discord, etc.).

This is what I am working with so far:

And this is my flow in Zapier:

I am currently on the free plan, but am willing to upgrade to core or possibly pro if I can get this scenario to work.

Much appreciate,
Eric

Hello Eric, and welcome to the Make community!

I have checked the Trello integration and apparently, you could use the webhook trigger “Watch activities / Update Card”. It’s not ideal since it triggers the scenario each time the cards are modified, but it does work for Label changes.

When your scenario is triggered, you get all information about the Card, including the Ids of the label; you can use this information to filter out the changes that are not related to Label.

Here is an example:

In this screenshot, you can see that there is a data.card.idlabels array, as well as a Data.Old.idLabels array. The second is important, since “Old” gives the element that was changed (and that triggered the scenario).

image
In this second example, I changed “description”. Hence, we see that we have Data.Old.desc instead of Data.Old.idLabels.

It means that you can filter and keep only the events when Data.Old.idLabels exists.


In your scenario, you can add a filter to say “Only go when Data.Old.idLabels exists”.


Your scenario would look like this.

Another option is to use a Scheduled scenario, to search all cards that have been modified since the last time your scenario ran, and then check the labels to see if they are different from the roles in discord, but it’s not the simplest way.

Note that you will get the ID of the labels, so you may need to use “Trello/List Labels” or to use a switch function to map IDs with Role names in Discord.

Let me know if you are stuck anywhere.

Best regards

2 Likes

Good morning Benjamin,

Thank you very much for the suggestion. I won’t have time to test this until the weekend, but I really appreciate it and will let you know if I have any issues when I get back to it.

Eric

2 Likes