Trying to get a trigger when a Trello card is created through Trello API

Hello,

I’m trying to trigger my script when a card is added to a list on Trello, I’ve been looking at online resources to try and get an idea how to go about this, however, can’t seem to find any that trigger the script when a card is added to the list.

The idea is that a card gets added to the list which sends a trigger to the script recieving the data from the card and then it’ll use that to create a Discord message with button options. If anyone has some ideas that can send me in the right direction, that’d be appreciated.

Thank you.

Hi @Anelson7751 thanks for your question.

Are you using the npm package trello - npm?

The link above shows which API functions are available, so it might be that your trigger isn’t available.

Would it be easier you think to grab all the cards in a list and see which ones are new?

It’s not really looking like I can grab an event from Trello whenever something is changed in Trello, I’d have to make a request to the API. And I don’t think I can send a packet through the API from Trello to the script.

Hi @Anelson7751 what about using a webhook service such as IFTTT which can be triggered when something is added to a Trello board? You can connect node and IFTTT in a similar way to this article: https://hackernoon.com/learn-how-to-use-webhooks-by-connecting-nodejs-ifttt-and-twitter-k0w3121