{Feature Request} - API for automation and integrationw with other web services like IFTTT and Zapier

#1

Hi. I’ve enjoyed watching habitify roll out and gain stability and features (looking forward to web!)

My hope is that the web implementation uses an API that you plan on making public. There’s a lot of automation that i would like build to better manage my various habits.

If you release an API, then integrating it into services like Zapier and IFTTT would be trivial for users. I would love to do things like:

  • if rescue time has seen me on duolingo.com or in the duolingo app for more than 5 min today, make the “learn french” a “success” for the day.

  • if my fitness pal has less than 100 grams of fat logged for the day , make the “stick to diet” habit a success for the day.

  • if i have at least 60 active minutes in a day, then mark the “be active” habit as good.

  • when the “go to the gym” habit is successful for the day, add “small desert” to the grocery list

  • when i break a new habit streak record on habitify, add “reward desert” to my grocery list

Etc.

Basically, i’d really like an API that allows me to enumerate my habits and check/set the state of each. It would be awesome if i could register a callback for events to be sent my way, but can build my own polling mechanism if needed.

I am very much OK with an API token being a “premium” feature. I would happily pay to automate some of my habit tracking workflows.

3 Likes
#2

Extending this idea, I would love an API I can use to pull data through Python or other languages for personal analysis / coding.

Basically a “developer API” page, where the user can generate an authorization key to use when making API requests, like lots of other services out there.

#4

Hi there!

Thanks for the feedback! The idea of API has been bouncing back and forth a lot during our meetings but it has not been implemented because there are more features that fit the mass need. For this year, we have a roadmap that does not include API, so probably it will hit the list next year!

Just curious, now that the API is not yet implemented, how are you doing those automations?

1 Like
#5

Heyy!

The idea sounds nice. Compared to the method of exporting a csv file with all the raw data, which one would you prefer and why?

1 Like
#6

I understand, but please please add an API eventually! There are no other habit tracking apps that have an API except Habitica, and I’m not a big fan of their platform. Your app would be unique and I would be willing to pay more for an API.

Right now I manually export the CSV every couple days. I want to use the data to create a personal dashboard of health statistics. You can see my demo / proof-of-concept here: https://ekerstein.com/live.

Eventually I would like to build a dashboard with habit statistics that update automatically from a Python script via the Habitify API. :wink: In that case I would never need to use the CSV again (but I would recommend to still keep it because it’s user-friendly).

1 Like
#7

@AlanNg: I understand that you have no plans for an API soon… as you have more to do (looks like you’re going to ditch the buggy mac app for electron wrapper of your web…) but can you at least document what the _a and _k … etc variables are that go across the web-socket connection? I can build my own “un official” API easily enough, but having to guess where/how the UUIDs map back to human friendly things is a major time-suck. You don’t have to document any new features or hidden endpoints… just a few words about what each field in the web-socket frame means. The api is already public (chrome web inspector on the web app…) just not super useable unless you have the time to invest in reversing the JS app to determine the meanings of the various frames.

my usecases for an API are similar to the custom dashboard that was linked above. The author said that it was built in python and used data from a periodic Habitify -> CSV dump. I hadn’t thought about going this approach and i might consider writing a simple CSV -> my dashboard’s API tool and a simple python headless browser script to jump through through the authentication hoops and dump the CSV…

In addition to populating personal correlation dashboards (e.g.: does sleep have anything to do with how many habits i complete the next day? What about mood and diet and the number of things on my. calendar…?) i have some additional things that i’d like to automate:

  • if the 1100-1500 block of my food journal has less than $24 grams of sugar and $30 grams of fat, then automatically make the “eat a healthy lunch” habit complete.

  • I want the Practice Duolingo habit to mirror the “streaks” component of Duolingo. This way i don’t have to mark the habit complete after finishing a few lessons in duolingo. Currently, Duolingo does not have an official API and i have joined the many voices asking their support team to prioritize API development… but for now i am making due with the API that i’ve been able to reverse engineer from their web app.

  • Some other automations similar to above, but using some google calendar data which is already linked to my Zapier.com automations. Ideally any habitify API would also be something i can access from Zapier

1 Like
#8

Just vísit your site. Huge respect Ekerstein! Definitely will consult you when releasing API feature and the use of it! What apps are you also using to track your sleep, workout, calories burned and such?

#9

I’m using the WHOOP Strap fitness tracker for my sleep and activities.

#10

Sounds like an interesting project. Do you have a Github or plans to release any part of it?

#11

We only use Github for our landing page not our app at the moment. To be honest I’m not so sure, gotta ask Peter the co-founder about the future plan :slight_smile:

#12

Yesss, this or Google sheets auto upload