Readme

An example, created in 10 minutes, of how to use intend.do's custom intention sources.

What it does

It's like the Intend.do WorkFlowy integration, pulling in stuff you need to do today, but for Beeminder instead of WorkFlowy! (Intend already has an extensive Beeminder integration which does almost everything else you can imagine, including allowing you to create goals and automatically add data to beeminder when you complete an intention in Intend that matches a particular regex or other criteria.)

How to use it

You need both an Intend and a Beeminder account. They're each systems for tracking goals, but Beeminder is for quantitative &/ hard commitments, and Intend is for qualitative &/ soft commitments (Intend was called Complice back when that article was written).

  1. Get your auth_token from Beeminder here.
  2. Go here
  3. Enter the following:
    • icon url: https://intend.do/img/apps/beeminder/beeminder-icon.png
    • xx: bm
    • App Name: Beeminder
    • GET Intentions from: https://malcolmocean-beemindergoalsduetoday.web.val.run?beeminder_auth_token=YOUR_AUTH_TOKEN
      • note you need to include your own auth token from step 1
      • add &includeTomorrow=1 if you want reminders about tomorrow's deadlines too, not just today's
    • PUT completions to: [leave this blank]
  4. Hit save.
  5. Reload your today page, go to enter intentions, and observe that a new button has appeared labelled "Pull from Beeminder"! Push that button and it'll access the Beeminder API via this val.

How this was created

The main prompt was

endpoint that when a GET request hits it with a provided beeminder_auth_token, it hits up the beeminder API (docs at https://api.beeminder.com/) with that auth_token and returns a multiline string that looks like this, one line per goal due today:

šŸ) +5 pushups by 13:00 for swole
šŸ) -0.4 lbs by 21:00 for weight

(ie "delta needed", "yunits", "deadline", "goalslug")

however it took "delta needed" and "yunits" for granted and those are the wrong variable names... but that was soon fixed by pasting in the "goal definition" section of the Beeminder API for reference. then I added:

great. now add a thing where if you add &includeTomorrow=1 then it also includes items due tomorrow, with "due tomorrow at XX:00" in the line

and

now have it get the user's timezone and use that for due dates

and it just got those right first thing.

fwiw, I'm not 100% certain it actually referenced the beeminder API docs by fetching them from the url I provided, or if it just got it somehow from having seen enough examples.

Future ideas

My goals don't derail at midnight. If yours do, double-check that this app's use of "today" handles that. Or set it up to be a "within X hours" range, although that's a bit weird for other reasons.

It wouldn't be that hard to have some sort of system where it knows which of your Beeminder goals go with which of your Intend goals, but that was out of scope for this demo.

Code
HTTP
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Comments
Nobody has commented on this val yet: be the first!