· Pretty Good Hat · archive · about·

Wunderlist is a super application and my wife and I use it for almost everything list-like. But I don’t love adding items to lists using the web app’s interface: I want something non-clicky that I can capture items to from anywhere. So I was quite happy to find that they offer a developer API!

Getting a developer account and openauth key for your own sample application is easy, and with a little tinkering I put together a pair of Alfred workflows for adding items to my inbox and grocery lists.

Add to Wunderlist in Alfred - screenshot

I’d like to improve on the workflow so that it can call an external config file or shell variable instead of having the auth key hardcoded in the workflow as it is now; that will let me share the thing as a package, too. Meanwhile, if you want to try this out, you’ll need your own developer account and sample application with authorization key from Wunderlist. Then you can make an Alfred workflow that runs the following in bash (insert your own CLIENTKEY, ACCESSTOKEN, and LISTID):

curl -s -H 'Content-Type: application/json' -H 'X-Client-ID: CLIENTKEY' -H 'X-Access-Token: ACCESSTOKEN' -d '{"title":"{query}","list_id":LISTID}' -X POST 'https://a.wunderlist.com/api/v1/tasks'

Pretty sweet.