Triage Your Email in the Car with Siri
Installing a CarPlay system into my ten year-old Subaru is easily one of the best purchases I've made in years in terms of how it's changed the way I go about my day. Right up there with the original iPhone. I know lots of folks who swear by their iPad, and, sure, I like mine. But iPad has always seemed like a product in search of a problem. CarPlay feels like a product that is a solution.
CarPlay has made my morning and afternoon commutes far more enjoyable. And with so much dead time between home and work, I'm now trying to see if I can make some of that a bit more productive, too.
I've got a big ass post about using Siri Shortcuts with OmniFocus coming soon (I hope), but for now I want to talk about email.
I understand that Apple wants to limit what's possible while driving for safety reasons, but Siri's constant "I'm sorry, I can't help you with that while you're driving" responses are slightly maddening. All I want is for Siri to read my unread emails.
If I cheat and leave my phone unlocked while barreling down the interstate at 75mph, Siri will read my recent email. But that's kind of it. I can't perform common actions like archiving, deleting, marking as read/unread, etc. I can't even reply. (Or if you can, I haven't discovered the correct voice incantation to make Siri do so.) You can compose and send a new email though, so there's that at least.
Nonetheless, what I'm really after during my morning commute is the ability to triage my inbox and prepare for my daily standup call that happens as soon as I arrive at work. Between the time I wake up and when I finish dropping my kids off at school and start my drive in, I simply don't have time to read everything that came in overnight or from my coworkers in earlier timezones.
What I want is to process and clear out all the junk (not in the literal spam email sense) and get a handle on any messages that need action before the people who sent them blindside me about their status during our phone call.
So, I built something to do that. I call it Voxmail, and it's free on GitHub.
There are two components.
- A 49-step Siri Shortcut that you install on your iPhone.
- A small PHP script that you can throw onto most any web server that the Shortcut communicates with. Other than two Composer requirements that deal with speaking to email servers, it's plain, vanilla PHP. It doesn't even need a database.
When you run the Shortcut, it connects to the PHP script, which fetches your email and returns it in a format optimized for the Shortcut to read, parse, and let you take action on.
Siri will speak a summary of your unread messages and then allow you to take action on each individual email. You can listen to the full email body. Or, you can archive, delete, mark as spam, mark as read or unread, and send a reply.
I've been using the script for a week or two and it's fast, reliable, and awesome. At least with Fastmail. I have no idea how it will perform against a Frankensteined IMAP implementation like Gmail. But I'd love feedback! Also, it doesn't support Exchange. So sorry. Pull requests are welcome, though!
How does it work in practice? Here's a demo video...
And here's another showing CarPlay in action...
Note: In this example I'm propping my iPhone precariously on top of my gear shift against the air vents. I'm just doing this so you can see the status of the emails updating live from the Siri Shortcut, to the server, and back down to my phone's mail client. My voice commands and Siri's output are going through CarPlay - not the phone. This all works with your phone happily locked and in your pocket. (And also on your watch and AirPods, too!)
And here's the ridiculous Shortcut in all its glory.
Of course, you may be thinking: "Hey, you're an app developer! Why didn't you write an app to do this?"
I thought about it. I've actually written an iOS email client before, so I knew MailCore would be up to the task. And I've seen amazingly deep Siri integrations from other iOS developers like OmniFocus.
But I've done some basic Siri programming for my clients, and it was a royal pain in the ass to setup and debug. There's no way I could have prototyped and built this project to the point it's at in 7h 56m over the course of a weekend like I did. (I know the time down to the minute because Timing.app is amazing.)
And that's not because of Swift or Xcode, etc. Swift's static typing would have actually saved my butt a few times when I did some dumb PHP things. It's all the damn hoops Apple makes you jump through just to run a bespoke app on your own device.
I wanted to build this for myself - not to make money or distribute through the App Store. And being an open source project, I sure wasn't going to make pro-but-not-actually-developer-users who want to use it deal with certificates, provisioning profiles, etc. This whole Siri Shortcut / PHP script solution is a complete hack, but it's easier than the alternative. Ok. Rant over.
So, go visit Voxmail on GitHub and give it a try. I'd love your feedback.
And if all of this was somehow already possible natively with Siri and I just wasn't asking the right questions, boy do I feel dumb.