Gamifying Highrise tasks with Habitica and Zapier

In my last monthly review, one of my stated goals was to "figure out how to best use Habitica". I mentioned that "it is not yet my primary to-do list and I haven't built any integrations to turn it into that". My tasks are spread across different sources and building synchronization between them and Habitica is difficult, as it would encompass syncing task content and completion state in both directions. Also, if I think about it more, this is not actually what I want and need; I don't necessarily need those lists appear in different places, I just want to leverage Habitica's gamification and collect gold and experience for my avatar.

This is why I came up with a different solution: creating a single "Task completed" habit and automatically vote it up - which can happen any number of times for habits in Habitica - when a task in another system is marked completed.

Lately I've used Highrise for managing tasks. Highrise is a CRM but it also includes the ability to create, manage and check off tasks which can be attached to elements such as contacts, cases and even notes. Thus, Highrise is one system that I want to integrate with Habitica automatically. I'm using Zapier for this purpose, with a bit of clever hacking and magic thrown in :)

Here's how it's done:

  1. Habitica's Zapier integration is in beta, which means you won't see a Habitica app when you search for it in Zapier. You can find a Beta invite link on the Habitica wiki.
  2. Once you click on that link Zapier starts a new zap with Habitica as the trigger channel. We need Habitica as the action, not the trigger, so we can change the trigger app. If you select Highrise here you'll notice that there's no "Task completed" trigger, so we can't use that. Choose the "RSS by Zapier" app instead and select the "New Item in Feed" trigger.
  3. Get the Atom feed for your latest activity in Highrise. It's located at /recordings.atom on your Highrise subdomain; for example mine's at https://lukasrosenstock.highrisehq.com/recordings.atom. Enter that into the "Feed URL" field. Don't worry because it's in Atom format and the Zapier app asks for RSS, it seems to understand this feed format just fine.
  4. Find your authentication token on the "Integrations" tab of the "My info" page of your account settings in Highrise. Copy it into the "Username" field. For "Password", enter any value, e.g. X. Continue on Zapier and test the step.
  5. Add a "Filter" step on Zapier. Choose "Only continue if ..." and set it up to check for the "Title" field and whether the text contains the string "Task completed". This is important, because otherwise everything in your activity feed, such as notes and comments, will also score. It may also break at any time if Highrise decides to change the format of their Atom feeds. Continue and test the step. zapier_habitica_filter_setup.png
  6. Add an "Action" step on Zapier and search for the "Habitica" app. The action is "Score Task".
  7. Connect Zapier to Habitica. This is unfortunately not an automated OAuth dance so you will be shown a page where you need to paste your User ID and API token from the API settings page in Habitica.
  8. Create a habit in Habitica. You can use any caption but I recommend something that marks it clearly as something that is automated and not for manual triggering; for example I put the words "Automated by Zapier" in the habit and put the whole caption in parentheses.
  9. Find out the Task ID for your new task. The default web UI of Habitica doesn't show it, but you can use Task Adjustor for this purpose. Again you need your User ID and API token to log in and then click on "toggle developer data".
  10. Copy the Task ID into your zap and choose direction "Up". Continue.
  11. This is an optional step you can skip, however to add some more motivation you can set up another "Action" step with a different Zapier app to send a notification to yourself to let you know the task has been scored. I'm currently using Pushbullet for this purpose.

And that's it! Any completed task in Highrise will be scored in Habitica within 15 minutes. Keep those gold and experience coming! Thank you for your interested and reading up to here.

Setting up this integration and writing this post took me less than 4 pomodoro sessions.