Skip to main content

-> Create an Action

We're going to make the simplest possible action - one that just logs out your bot's Trello username.


Navigate to the actions page and click the "+" in the bottom right of the browser window.

Add an Action

Name Your Action#

Call this action "myFirstAction".

Yes, that's right - the first letter is small and all the words join together with no spaces. That's because it's actually a function name and BenkoBot will enforce strict "camel case" naming conventions for all functions. Don't worry, you'll probably get used to it.

Give Your Action a Name

Gaze at the Code#

No need to do anything else for now, the code we're going to use is the default 'boilerplate' for a new action anyway. You can delete all the comments if you feel confident doing that. Leave this bit:

console.log("Welcome to BenkoBot " + new Trellinator().username());

Run It#

Scroll down and click the "RUN CODE" button (we could save it but we're not going to).

Run Your Action

After some short time you will see the output of that console.log statement. Your bot went off to the Trello API and got its own Trello username. Clever little bot.

It Ran

It's worth noting that actions are very, very, very powerful and you need to be very, very, very careful. You could delete all your Trello boards, for example, if you ran some code specifically to do that. This is a quickstart so we're just going to leave it at logging out your bot's Trello username.

Check out the "Example | Actions" list on the community board for some ideas. You can install them by clicking on the "magic links" in the Trello cards.