Install hubot from npm, if you don't already have it. Note the explicit version reference. The version # of hubot-hipchat is kept in line with hubot. If your hubot's version is greater than hubot-hipchat's, that means it hasn't been tested and may not work!

% npm install --global coffee-script hubot@v2.7.5

Create a new hubot if necessary:

% hubot --create <path>

Switch to the new hubot directory:

% cd <above path>

Install hubot dependencies:

% npm install

Install the hipchat adapter:

% npm install --save hubot-hipchat

Edit Procfile and change it to use the hipchat adapter. You can also remove the -n Hubot arg as the bot will automatically fetch its @mention name from HipChat.

Set the password to the password chosen when you created the bot's account.

% heroku config:add HUBOT_HIPCHAT_PASSWORD="..."

If using HipChat Server Beta, you need to set xmppDomain to btf.hipchat.com.
% heroku config:add HUBOT_HIPCHAT_XMPP_DOMAIN="btf.hipchat.com"

Deploy and start the bot:

% git push heroku master
% heroku ps:scale web=1

This will tell Heroku to run 1 of the web process type which is described in the Procfile.

You should see the bot join all rooms it has access to (or are specified in HUBOT_HIPCHAT_ROOMS, see below). If not, check the output of heroku logs. You can also use heroku config to check the config vars and heroku restart to restart the bot. heroku ps will show you its current process state.

Assuming your bot's name is "Hubot", the bot will respond to commands like "@hubot help". It will also respond in 1-1 chat ("@hubot" must be omitted there, so just use "help" for example).

To configure the commands the bot responds to, you'll need to edit the hubot-scripts.json file (valid script names here) or add scripts to the scripts/ directory.

To deploy an updated version of the bot, simply commit your changes and run git push heroku master again.

Bonus: Add a notification hook to Heroku so a notification is sent to a room whenever the bot is updated: https://www.hipchat.com/help/page/heroku-integration

Optional. This is a comma separated list of room JIDs that you want your bot to join. You can leave this blank or set it to "All" to have your bot join every room. Room JIDs look like "123_development@conf.hipchat.com" and can be found in the XMPP/Jabber account settings - just add "@conf.hipchat.com" to the end of the room's "XMPP/Jabber Name".