Keeping your Quantified Self Honest with Exist.io, Beeminder and Zapier

Jt Gleason
8 min readSep 23, 2018

--

Apps like Exist.io are great for capturing data from multiple places and helping you perform correlation and analysis on what behaviors drive objectives in your life. But like all tools, they cannot help you if you don’t use them. Consistent usage is key in order to have the best data for Exist.io to perform correlations and analysis on your behalf and driving you towards successful achievement of your goals. So that raises the question, “How do I make myself use the darn thing consistently?”

Beeminder bills itself as “Goal setting with teeth” and it certainly lives up to that name. You add a goal in Beeminder and they track when you derail from that goal. When they do, they charge you money. That money continues to scale up until the pain of losing the money is commensurate with your general level of laziness. It is basically placing a bet against your darker self.

By doing this, it takes away all the natural human impulses like “I can do it tomorrow,” “No one will know that I skipped a day,” and “At least the money is going to charity.” You made the bet with your darker self, and Beeminder is there to keep you honest. I’ve used this for language learning with some of their native integrations and had great results sticking to my goals with it.

In the world of Quantified Self apps, devices and tools, there is a huge problem around them hoarding your data and not integrating with any other service. You enter all of this awesome data about your activities in a tool and it sits there, locked up, unable to be analyzed or used by other services. Sometimes, this is just due to resource constraints by the tool makers themselves. Other times, it feels like it is to lock in a customer into one particular vendor. Enter tools like Zapier that can help bridge that gap.

Zapier is a tool that can perform actions based on datasources and actions provided by other parts of the web. It is a simple-to-use glue technology that allows you to easily create these data and action links where without having to write and maintain huge backend software yourself. It can sync from many different data sources or run code on your behalf to link disparate services like Exist.io and Beeminder so you can use these Quantified Self tools in the most effective manner.

The goal of this project is to automatically link my Beeminder goal to use Exist.io every day in an automated manner. I’m taking the simplest approach here that when I add the “daily mood” to Exist.io, a core feature, I want to notify Beeminder that this event has taken place and use that as proof that I have engaged with the app. More complicated integrations are certainly possible but this seemed like a great MVP to get off the ground and ensure that I was engaging the tools that I was using to track and analyze my goals.

The design for this system is very simple and I’ll list it out in the flowchart below. Every day, at 11:55pm, Zapier will check Exist.io and ensure that I’ve updated it and added my mood. If I have, it will notify Beeminder that I’m “on track.” If not, the notice will not go out and I’ll be one step closer to losing my bet with myself!

Account Creation and API Keys

First, you’ll need accounts on all three systems.

  1. Signup for Exist.io
  2. Signup for Beeminder
  3. Signup for Zapier

After that, there is one piece of special data that you’ll need from Exist.io in order to link up to Zapier and Beeminder. That is an API Token to allow Zapier to call Exist.io on your behalf. So to get that, I’m going to use an online tool to capture the token. For this step, I need to call out that the steps listed here are not a good security practice. If you know what you are doing, you can obtain this the correct way. However, the vast majority of users simply cannot perform these basic actions due to lack of training and tools on their computer. I feel it is a fundamental flaw in internet security UX that I hope companies will take seriously in the future.

To get this API Token, we will use the Online CURL tool. First, add 2 options and set them to “data” (the -d option). You will add the following 3 strings to the fields on that page, with your personal values filled in their respective places.

https://exist.io/api/1/auth/simple-token/
username=YOUR_USERNAME
password=YOUR_PASSWORD
It should look like this

Click the “Start your CURL” button and you will see a response like the following

The value inside of the quotes is your API Token, save it for later

Setting up your Beeminder Goal

Now you go to Beeminder and setup your “Daily Exist Goal”. Click the + button and add a “Do More” goal. Set it to 1 Unit per Day with a unit of “entry”. Name your goal and set the initial “sting” and the maximum charge. Click Finish and now the goal is live!

Setting up the Zapier Integration

To complete this automated flow of Exist.io checkins to Beeminder Goal, we will use Zapier to send this data from Exist.io to Beeminder. First, let’s make a new Zap.

Zaps are run based on a “Trigger.” In this case, the Trigger is going to be 11:55pm Every Day. Zap Provides a Schedule Trigger to facilitate that.

Set it to every day and use the custom value of 11:55pm instead of the regular list of hourly values.

Now we will add an action that follows after the Trigger of 11:55pm comes around. This will be a Code action in Javascript to talk to the Exist.io API. So select this type of button and pick Javascript.

Select Javascript and add the following code, entering your values for YOUR_USERNAME and YOUR_API_KEY. This code calls the Exist.io API and fetches the latest moods. If the mood has been entered for that day (the first entry), it returns “true” to the next step and if it was not entered for that day, it returns “false”. Make sure to test this and select a value as we use that value in the next step during setup.

Technical readers will want to know why I had to use Javascript instead of using the Webhook integration. The reason is that I was not able to get a successful call back from /attributes/mood via a pull based Webhook. If someone can solve this, you can do this without code.

fetch('https://exist.io/api/1/users/YOUR_USERNAME/attributes/mood/',
{ headers: {"Authorization": "Token YOUR_API_KEY"} })
.then(function(res) {
return res.json();
}).then(function(json) {
var moods = json["results"];
if(moods[0]["value"] !== null) {
callback(null, {result: true} );
} else {
callback(null, {result: false} );
}
}).catch(callback);

Now, we need to filter an action based on that value. If it is true, we will tell Beeminder that we used Exist.io. If it is false, we will tell Beeminder nothing and we will be one day closer to being “stung”. Click the little plus button in Zapier and choose “Filter”. Set it to “Only Continue if…” and in the next step, pick the “Code” step and select “Result” with the boolean value of “True”.

Finally, we are ready to setup and ping Beeminder. This will be the action to update Beeminder if the Exist.io has told Zapier via the API if we have engaged with the application. Click the plus button and add a Beeminder Action.

The beeminder action is well… a logo for the app…

During setup, you’ll be able to link your Zapier and Beeminder account. Then you’ll be able to select your new “Daily Exists Goal” and put in a value of one. There is a “Test integration” button there but if you do that, you’ll get a free “point” so I recommend that you simply name your Zap, enable it and wait to see if everything is operational.

And you are all set up and ready to go! Every day at 11:55pm, Zapier will check if you have updated your Exist.io goals and let Beeminder know. You don’t have to do anything else, it all will work like magic.

Magic is defined as significant engineering resources of three independent companies along with your efforts in linking them. Toy not included.

Conclusion

If you want to meet your goals, it is good to have accountability systems in place. If you are tracking your goals with Quantified Self apps, you have definitely noticed the data wall around your entries and the lack of integrations out there. I hope that this post has shown with a little effort, you can roll your own tooling with Zapier and make even more effective use of some great tools like Exist.io and Beeminder to help keep you honest ensure that you hit all of your goals. Thanks for reading and I hope you found this useful!

--

--

Jt Gleason

Sr. Director of Developer Relations, Twitch. Follow me @entropyfails on Twitter