27.6.13

Integrating Trello dashboards with HipChat

HipChat + Trellooooo

NOTE:
- This post describes a polling based solution to displaying trello updates inside of hipchat.
- Our dear freind valentin has come up with a PUSH based mechanism for directly sending trello updates into HipChat, directly from the Trello API, see https://github.com/einvalentin/trello-hipchat.    PS thanks valentin for the update  :)......................



HipChat and Trello play nice together, thanks to this project https://github.com/rasky/trello-hipchat.git.

Here's how to glue em up:
  1. Log into your trello account, you will need to be logged in to create application tokens which you will transfer into the script below.  
  2. Log into your hipchat account to.  You will need to get unique room ids to define where you want updates to post to.
  3. Clone this simple little python script by mister rasky.  git clone https://github.com/rasky/trello-hipchat.git
  4. Go to https://trello.com/1/appKey/generate, and copy the key.  This key will be used for all access.  Now, the trick is that you ALSO have to get a token.
    1. Get a token authorized from your personal account.  You will go to this URL - and substitute the key obtained above into <YOUR_APP_KEY> in this URL : https://trello.com/1/authorize?key=<YOUR_APP_KEY>&name=MyFirstTrelloApp&expiration=never&response_type=token.  Don't worry about the "name".  Its just a unique identifier for the app you are using.  Note also that I use "never" as the expiration here, so that the token created will never expire.
  5. Setup your trello credentials : Copy the key/token from (3) above into the trello-hipchat.cfg.sample script, and rename it to trello-hipchat.cfg
  6. Update your room id from hipchat: You want trello updates to post to a hipchat room.   First you need the unique room id.  Go to hipchat.com -> admin -> rooms .  You can get room ID there.  Once you get the ids, replace the ROOM* entries in trello-hipchat.cfg with your Room id.
  7. Update your board names from trello which you want to monitor.  You can monitor as many boards as you want.  And you can have all boards paste to the same hipchat room, if you want. Once You get your board ids from trello, update the BOARD* entries in the trello-hipchat.cfg script.
  8. Now that your config file is working, you just need to intermittently run the above script.  Setup a crontab as specified in the README file in the cloned source https://github.com/rasky/trello-hipchat.git 
  9. Finally, Test your trello-hipchat integration. Move some board items around, and run tail -f /var/log/messages , and wait a minute.  You should either see errors in /var/log/messages, or else, you should see messages streaming into the rooms you defined in (5) above.


2 comments:

  1. Hi Jay,

    I am not sure if this is still relevant for you, but I just coded up a slightly different solution for the same problem. This one is using the Trello Webhook API to receive "push" alerts from Trello and forwards them into a hipchat room.

    I like it better, because it does not poll trello all the time and messages go through to hipchat nearly instantaneous. It would be great if you would mention it in the article as well because it is the first hit if you google for Trello Hipchat Integration :-)

    Thanks,
    Valentin

    PS: https://github.com/einvalentin/trello-hipchat

    ReplyDelete
  2. Thanks valentin ........... done :) . will give this a try soon. FYI your "push" based solution: What does the "pushing?" Does trello do it for you? If so thats really nice, no need for a third server in the middle.

    ReplyDelete