Foolproof Business Mileage Tracker with Automatic and IFTTT

Bret Fisher
4 min readMay 7, 2016

I drive my own car for my business and need to track my mileage for tax time. I suck at tracking it. I needed help. This is how I finally fixed it.

But I Just Wanted a Business Trip Tracker. I’m Also Lazy.

Yea I’ve tried MileIQ, calendar scanners, and others. They were either too complex, too unreliable, or required me to remember to preform an action before or after every trip (total deal killer). I needed something more in my face.

Enter Automatic: its hardware and core features work great. It knows when you turn off the car so there’s no accidental “trip ended” if you’re stuck in traffic. It auto-combines trips with stops under 15 minutes. In the data export, it gives you images of the route, and all the details you’d expect. What data it did report, was flawless.

But I bought it to automate my work mileage reporting, and its default features for that (and existing 3rd party apps) haven’t solved that problem.

Limitations of Automatic App

  • It requires you to manually open the app at the end of each trip and “tag” that trip as business. You have to remember to do this if you didn’t tap on the mobile notification.
  • You can’t easily tell if old trips are already marked.
  • You can’t see this info or edit it on the website. The only way to see it is dump all trip data to one big csv from the website.
  • You can’t add a reason for the business trip.

I needed something that would be in my face when I get out of the car and force me to answer the question “Was that a work trip, and if so, what for?”.

What about a SMS text? We don’t ignore those as easy. And what if I could just reply to it with a reason?

Turns out that works! I could do this with a combo of the Automatic device, IFTTT, a Google Sheet, and some texting. The result is when I get out of my car, I get a text that I reply to with the business reason for the trip, and at years end I have a spreadsheet with all the details ready for tax reporting.

The Detailed Workflow

  • Turn off the car.
  • 1st IFTTT: Automatic kicks off a IFTTT recipe, which dumps the “trip” into a row of a Google Sheet with just the info I need for mileage reporting: time started, distance, start location, end location, and link to map of route.
  • But I’m still missing two key parts. Was it business, and what was it for… So:
  • 2nd IFTTT: Automatic kicks off a IFTTT recipe to send me a text: (car name) completed a x.xx mile trip. Reply with “#b x.xx (reason)” if business.
  • This all works with multiple users and multiple cars. Automatic knows who the driver is based on which phone is auto connected via bluetooth. Both wife and I have Automatic accounts and our own Google Sheets and IFTTT recipes to kick this off… so it always texts the correct person.
  • If it was business, I reply with a reason, starting with #b, which kicks off a 3rd IFTTT recipe. If it wasn’t business, I do nothing.
  • 3rd IFTTT: see’s the #b and puts the reason on a new row of Google Sheet.
  • At tax time I SUM the mileage column and report that on taxes. I figure it’ll take me under an hour at tax time… and 20 seconds per business trip.

Other Details

  • Since this requires 2 IFTTT workflows writing to a single Google Sheet, each work trip is actually spread across two Google Sheet rows. Later I can combine rows (I’m lazy, so that means I’ll put it off till tax time).
  • But why reply with mileage? If I see rows out of order, I can use the mileage I sent in reason text to match up the two rows. Once matched, I delete lines not marked for business. (I wish this part was smoother, but it’s just once a year).
  • If both of us are in car, the Automatic only connects to one phone (randomly, which ever connects first to Automatic via bluetooth).
  • You still need the Automatic app to link to your car’s device, and auto-upload trips to their site each time, but after initial device setup you’ll never need to open it for business trip documentation.

Quick Links To IFTTT Recipes for Setting This Up Yourself

--

--

Bret Fisher

DevOps and Docker Sysadmin :: Docker Captain :: Entrepreneur, Dogs, Whiskey, Sci-Fi, Coffee, Volunteering, Open Source :: http://bretfisher.com