Wednesday, March 13, 2013

Lifehack: Google Now (Voice Actions) to Astrid grocery list.

Figured out a process to quickly add items to my grocery list on Astrid using Google Now. That way I can press the microphone button on my phone and quickly set a reminder for later when I’m in the store.

I first tried using an IFTTT recipe to email new tasks to Astrid but regular expressions aren’t supported and there just wasn’t enough control.

The process ended up being a bit convoluted, at least in the background:

  1. When you say “note to self” in the mic it emails your Gmail account.
  2. Gmail filters for those emails and forwards to a procmail server.
  3. Procmail pipes the email to a Python script.
  4. Python extracts the grocery list items and sends a message to new@astrid.com
  5. Astrid interprets the email and creates a task.

Gmail filters and forwards can be setup in your email settings but the procmail and python bits depend on you having a server to run the stuff on and a benevolent sysadmin (thanks, Keenan).

The end result is I can say “note to self we need bacon, lettuce, tomato” and in a moment or two my grocery list on Astrid has bacon, lettuce, and tomato as three new tasks.

Notes

  1. nasty-gyalxxx reblogged this from danielmclaren
  2. danielmclaren posted this